Commit Graph

589 Commits (056c9df854817670dc4fb9c095cba29c99089ac8)

Author SHA1 Message Date
Zebediah Figura c750ae6b9d ntoskrnl.exe: Protect the two relocated pages independently.
They may have different protection flags.

This fixes a regression introduced by 22dfb0df10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49198
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 19:50:48 +02:00
Paul Gofman 42ce4910a4 ntoskrnl.exe: Support 'xor Ev, Gv' opcode for x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 16:51:57 +02:00
Paul Gofman e7778dd9f9 ntoskrnl.exe: Support 'or Ev, Gv' opcode for x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 16:51:55 +02:00
Paul Gofman b40be1d43b ntoskrnl.exe: Emulate full user shared data area range.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:13:16 +02:00
Alexandre Julliard cb36b615e1 ntoskrnl.exe: Avoid a few more ntdll forwards.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Alex Henrie 474d1f0b2d ntdll: Implement RtlIpv6StringToAddress(Ex)[AW].
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Alexandre Julliard 5bb9f86dbe ntdll: Implement RtlFormatMessage().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 14:43:27 +02:00
Rémi Bernon a1c46c3806 server: Add USD support with timestamp updates.
The USD page is created when the first process (wineboot.exe) completes
its creation, using its provided user_shared_data for initialization.

The server maps the page write-only and the clients map it read-only,
then the server updates the timestamps every 16 ms.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29168
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:57:56 +02:00
Zebediah Figura 7addca95b5 ntoskrnl.exe: Move the BroadcastSystemMessage() call to plugplay_send_event().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:49:18 +02:00
Zebediah Figura d80101f17a ntoskrnl.exe: Broadcast device notifications to registered handlers.
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:48:06 +02:00
Jacek Caban 92e40853d8 ntoskrnl.exe: Export _chkstk from importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Zebediah Figura 0e09d5ea74 ntoskrnl.exe: Implement IoIs32bitProcess().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49088
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Zebediah Figura 74f820fccc ntdll: Export RtlCopyMemoryNonTemporal.
Needed by Blindwrite 7's kernel driver.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Zebediah Figura 22dfb0df10 ntoskrnl.exe: Protect relocated pages one at a time.
Blindwrite 7's ezplay.sys has sections which are consecutive in memory but not
page aligned.  Thus changing the protection to PROT_READWRITE one section at a
time has the effect that old_prot for all sections but the first is set to
PROT_READWRITE (actually, PROT_WRITECOPY), causing us to restore the wrong
protection and the driver to crash in its entry point.

To fix this, protect and unprotect one page at a time while processing it, i.e.
essentially revert 6c0a8c359.  To avoid reintroducing bug 28254, protect two
pages at a time instead of just one.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Alexandre Julliard 1028a5c15f ntoskrnl: Add missing exports for functions that are already implemented.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 22:03:16 +02:00
Andrew Eikum 7ac5b7889f ntoskrnl: Quiet down failed class installer debug message.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 21:51:31 +02:00
Zebediah Figura 09db718d99 include: Rename BaseAddress to DllBase.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:46 +02:00
Zebediah Figura feeb1c7c24 include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Jacek Caban 14df0183b0 makefiles: Explicitly import msvcrt in modules that need specific crt version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:04 +01:00
Zebediah Figura bd00dedecd ntoskrnl.exe: Implement IoOpenDeviceRegistryKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:36:23 +01:00
Brendan Shanks 3810fb1ef0 ntoskrnl: Fix emulation of RIP-relative addressing.
The target address is relative to the RIP of the next instruction, not
the current RIP.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:53:46 +01:00
Louis Lenders ba8360be4e ntoskrnl.exe: Add stub for RtlIsNtDdiVersionAvailable.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48122
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:47:54 +01:00
Alex Henrie f307e94c0e ntoskrnl: Add KeSetImportanceDpc stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48358
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:11:59 +01:00
Andrey Gusev 8cd1225497 ntoskrnl.exe/tests: Fix typos in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:06 +01:00
Alexandre Julliard 0e97fe86fd ntdll: Implement custom codepage conversion functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Zebediah Figura 993c833cf4 ntoskrnl.exe: Remove a superfluous condition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:26:30 +01:00
Chip Davis a224824782 ntoskrnl.exe: Add tests for METHOD_NEITHER ioctl behavior.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Alexandre Julliard 9ae5717ba6 ntdll: Implement RtlInitCodePageTable().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Piotr Caban 292b728908 ntoskrnl.exe: Store device state in volatile key.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 23:04:35 +01:00
Piotr Caban cc395391ed winebus: Reference PDOs added to DEVICE_RELATIONS structure.
Fixes crash caused by 81cda52d15.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Zebediah Figura 81cda52d15 ntoskrnl.exe: BusRelations is also used when devices are removed.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:53 +01:00
Zebediah Figura ca683dcaad ntoskrnl.exe: IoInvalidateDeviceRelations() receives the parent PDO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:51 +01:00
Zebediah Figura 781fc47f36 ntoskrnl.exe: Trace the call to AddDevice().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:57 +01:00
Zebediah Figura 74b98dc82b ntoskrnl.exe: Implement IRP_MN_QUERY_DEVICE_RELATIONS for root-enumerated devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:54 +01:00
Zebediah Figura 481b099345 ntoskrnl.exe: Stub IRP_MN_QUERY_CAPABILITIES for root-enumerated devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:50 +01:00
Zebediah Figura c4ec69adce ntoskrnl.exe: Implement many more properties in IoGetDeviceProperty().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:46 +01:00
Zebediah Figura 61928e8160 ntoskrnl.exe: Pass the correct output size to IoBuildDeviceIoControlRequest().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Austin English f0b09c3572 ntoskrnl.exe: Quiet a verbose FIXME.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=11908
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 18:32:17 +01:00
Alex Henrie 380d31b17a ntoskrnl: Implement IoCreateUnprotectedSymbolicLink.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47986
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:31:27 +01:00
Alexandre Julliard 2d25263a31 ntoskrnl: Export some functions on all architecture except i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Rémi Bernon 8db70e92a8 ntoskrnl.exe: Update the interface if it is already in the tree.
As we are going to reuse the same device id when re-plugging a
previously plugged SDL controller, the device interfaces are still
present in the tree and IoRegisterDeviceInterface was not updating the
device pointer.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-20 12:50:05 +02:00
Rémi Bernon e6138a52a9 ntoskrnl.exe: Use case-insensitive driver name comparison.
For instance winebus driver is sometimes referred as WineBus, when
loaded by winedevice.exe, and sometimes as winebus, when loaded from
devices. This makes Wine try to load it twice and initializes the
backend twice as well.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:42:03 +02:00
Alex Henrie 363b8809f3 ntdll: Implement RtlIpv4StringToAddress(Ex)A.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46149
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:45:18 +02:00
Francois Gouget c9f222e775 ntoskrnl/tests: Declare the driver subtest.
It may print test failures and as such should be declared by its parent.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:42:56 +02:00
Andrew Eikum 6f17f4caad ntoskrnl.exe: Add -norelay flag for _vsnprintf.
Fixes traces from services when relay logging.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 18:55:25 +02:00
André Hentschel 9220772d28 ntdll: Add RtlUnwindEx spec entry for ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 21:24:26 +02:00
Zebediah Figura ca1c153422 ntoskrnl.exe: Implement IoGetRequestorProcess().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:28 +02:00
Zebediah Figura 37652d5cc4 ntoskrnl.exe: Set the IRP thread also for create and close requests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:25 +02:00
Zebediah Figura 8ce1c66b5e ntoskrnl.exe: Stub IoRegisterBootDriverReinitialization().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:22 +02:00
Zebediah Figura da23da3952 ntoskrnl.exe: Allocate pool memory from an executable heap.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45843
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:19 +02:00