Commit Graph

623 Commits

Author SHA1 Message Date
Paul Gofman d0d1601e6c ntoskrnl.exe/tests: Avoid race condition in test driver.
Might fix random driver crash on testbot Win8 machine.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:49:08 +02:00
Paul Gofman 64946e5543 ntoskrnl.exe/tests: Add a test for accessing process memory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman ee7a5b28c9 ntoskrnl.exe: Add stub for KeUnstackDetachProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman 6f4e73d082 ntoskrnl.exe: Add stub for KeStackAttachProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman c9a55908a5 ntoskrnl.exe: Zero copied size in MmCopyVirtualMemory() stub.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman e58073dbf8 ntoskrnl.exe: Implement PsGetProcessSectionBaseAddress() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman 5d92cf7dbf ntoskrnl.exe: Call load image notify routines for driver modules.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 16:17:32 +02:00
Paul Gofman 26fbff05a1 ntoskrnl.exe: Implement image load notify routines registration.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:24 +02:00
Paul Gofman eb7f784761 ntoskrnl.exe: Implement IoReuseIrp() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:16 +02:00
Paul Gofman 9effc3f963 ntoskrnl.exe: Add stub for ExUnregisterCallback() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:09 +02:00
Paul Gofman 7bc99ae125 ntoskrnl.exe: Add stub for ExRegisterCallback() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:04 +02:00
Paul Gofman 1cad86fced ntoskrnl.exe: Return STATUS_SUCCESS from ExCreateCallback() stub.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:59 +02:00
Paul Gofman 4ae92fdaf6 ntoskrnl.exe: Fix ObRegisterCallbacks() function parameter definition.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:55 +02:00
Paul Gofman 6870f13704 ntoskrnl.exe/tests: Add more timer tests.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman a4a903f97a ntoskrnl.exe: Support DPCs with timers.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 6cb3588969 ntoskrnl.exe: Cancel active timer before setting it.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 4584ffadda ntoskrnl.exe: Avoid leaking events on multipe KeSetTimerEx() calls.
As the consequent testing shows we can't just close the events on timer
reset. That would result in wrong wait results for current waiters.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 68a03b6393 ntoskrnl.exe: Reimplement KeSetTimerEx() on top of thread pool.
This is needed to call the DPC callbacks later as SetWaitableTimer()
will call the callback only when the thread is in alertable
wait state.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman ba98574207 ntoskrnl.exe: Add KeSetTimer() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman e49be2db28 ntoskrnl.exe: Partially implement KeInitializeDpc() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 4c81f499a6 ntoskrnl.exe/tests: Add basic test for DPC call.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:18:28 +02:00
Paul Gofman 4921d24627 ntoskrnl.exe: Add KeSignalCallDpcSynchronize() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:18:22 +02:00
Paul Gofman 1adc1b1ecf ntoskrnl.exe: Add KeGenericCallDpc() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:30 +02:00
Paul Gofman 73d915fd8e ntoskrnl.exe: Add KeSignalCallDpcDone() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:22 +02:00
Paul Gofman 8daad8963e ntoskrnl.exe: Import KeGetCurrentProcessorNumber() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:16 +02:00
Paul Gofman cda4fa293e ntoskrnl.exe: Implement KeRevertToUserAffinityThread() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 7d4f4783a5 ntoskrnl.exe: Implement KeRevertToUserAffinityThreadEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 631227563b ntoskrnl.exe: Implement KeSetSystemAffinityThread() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman c3bc7689b1 ntoskrnl.exe: Add KeSetSystemAffinityThreadEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 25f4da665d ntoskrnl.exe: Fix KeQueryActiveProcessors() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Alex Henrie 0af08318b7 ntdll: Implement RtlIpv6AddressToString(Ex)[AW].
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46788
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:12:12 +02:00
Paul Gofman 6ceb6c7f47 ntoskrnl.exe: Return zero for unknown msr registers.
rdmsr should fault if called with the register not supported
by CPU. But until we want to support the full range of CPU
specific registers returning zero is probably a better
fallback.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 21:17:13 +02:00
Paul Gofman 2716e215df ntoskrnl.exe: Add KeQueryActiveProcessorCountEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:20:02 +02:00
Paul Gofman b91b4b6de1 ntoskrnl.exe: Add KdRefreshDebuggerNotPresent() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:19:36 +02:00
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