Serge Gautherie
94b8095ba2
[NTOS:KE] KiTrap0EHandler(): Use MI_IS_WRITE_ACCESS()
2021-11-04 23:20:21 +03:00
Rafał Mikrut
54d5ad7533
[NTOS:KE] Fix copy paste bug in exception helper routine for ARM ( #4005 )
2021-10-07 23:04:19 +03:00
Hermès Bélusca-Maïto
6e9ff14e26
[NTOS:KD64,KE] IRQL is automatically adjusted during calls to KdEnterDebugger() and KdExitDebugger(). ( #3942 )
...
Addendum to 608032bd
and 835c3023
.
The IRQL is actually raised by KeFreezeExecution() and lowered by
KeThawExecution(), always to HIGH_IRQL on MP systems, or if necessary
on UP. These functions are called respectively by KdEnterDebugger()
and KdExitDebugger().
2021-09-12 18:20:32 +02:00
Victor Perevertkin
6ef6fabfc5
[FREELDR][NTOS][HALPPC][SDK] Remove PowerPC code
...
Remove PowerPC-related code from the kernel, HAL, SDK and
Freeloader.
2021-08-15 15:35:51 +03:00
James Tabor
a81ad376a1
Check for PAE
...
Checking for PAE and set some logic later to support it.
2021-08-08 20:37:06 -05:00
Jérôme Gardou
42bec35f65
[NTOS:KE] Also rewrite KeZeroPages in assembly for amd64
...
Let's stick with "rep movsq" until we are able to have more precise benchmarks
2021-08-04 17:48:39 +02:00
Jérôme Gardou
51258295bd
[NTOS:KE] Rewrite KeZeroPages in assembly
...
We spend a lot of time in this function, let's optimize it.
2021-08-04 17:48:39 +02:00
Timo Kreuzer
a3763c61dc
[PSDK][NDK] Use hex to define MIN/MAX constants like in native SDK
...
This fixes use of unary minus operator on unsigned type warning.
2021-07-23 22:03:48 +02:00
Jérôme Gardou
37d0a9c3f4
[NTOS:KE] Unconditionally check IRQL when acquiring & releasing spinlock at DISPATCH_LEVEL
2021-06-29 11:49:20 +02:00
Jérôme Gardou
f30136bc79
[NTOS:KE] Test spinlock ownership on both UP & MP build
...
There is no reason not to, and this avoids introducing bugs stupidly.
2021-06-29 11:49:20 +02:00
Jérôme Gardou
e312a40ae2
[NTOS:KE] Implement KeAcquireInStackQueuedSpinLockForDpc & KeReleaseInStackQueuedSpinLockForDpc
2021-06-29 11:49:20 +02:00
Jérôme Gardou
c6e9fea844
[NTOSKRNL] Deduplicate some symbols
2021-06-24 18:48:31 +02:00
Jérôme Gardou
41de1bd724
[NTOS:KE] Do not allow waiting at IRQL >= DISPATCH_LEVEL when providing a timeout in KeWaitForMultipleObjects
...
CORE-6473
2021-06-21 11:42:01 +02:00
Timo Kreuzer
f4d47faeb7
[NTOS:KE] Fix usage of KTHREAD::SwapBusy
2021-06-19 12:17:18 +02:00
Timo Kreuzer
a011d19ed2
[NTOS:KE] Fix some locking issues
2021-06-19 12:17:18 +02:00
Timo Kreuzer
2ed56fa794
[NTOS] Fix build with CONFIG_SMP
2021-06-19 12:17:18 +02:00
Victor Perevertkin
34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces
2021-06-11 15:33:08 +03:00
Timo Kreuzer
7f2e0ece5a
[NTOS:KE/x64] Handle shared interrupts
2021-06-04 09:19:13 +02:00
Timo Kreuzer
f1ed97d6cc
[NTOS:KE/x64] Implement KiSetTrapContext
...
KiSetTrapContext is an asm wrapper around RtlSetUnwindContext, which first stores an exception frame to assure that all non-volatile registers were put on the stack, then calls RtlSetUnwindContext to update their first saving positions on the stack and finally restore the exception frame to potentially load any updated registers, that haven't been saved elsewhere on the stack.
2021-06-02 18:25:36 +02:00
Timo Kreuzer
90a0e426ed
[NTOS:KE] Add IRQL checks and fix KiInitiateUserApc
2021-05-28 11:52:42 +02:00
Timo Kreuzer
3d18831c19
[NTOS:KE] Improve KiSystemCallEntry64
2021-05-28 11:52:42 +02:00
Timo Kreuzer
69e8cb635a
[NTOS:KE] Fix stack alignment issues
2021-05-28 11:52:42 +02:00
Timo Kreuzer
2a2d0903bf
[NTOS:KE] Remove duplicated EFlag definitions
2021-05-28 11:52:42 +02:00
Jérôme Gardou
0395049986
[NTOS:KE] Do not call MmSetPageProtect for the Pentium Lock Errata
...
CORE-17589
2021-05-21 10:52:55 +02:00
Jérôme Gardou
3adf450867
[REACTOS] Addendum to 5c7ce4475e
- Fix MSVC 2015 build
...
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes
CORE-17540
2021-05-12 11:04:29 +02:00
Jérôme Gardou
3726b992ed
[NTOS:KDBG] Begin port for amd64.
...
Not really functional, but it prints debug output.
Take this as an opportunity to add consistancy between some i386 & amd64 intrinsics
2021-04-28 13:10:23 +02:00
Jérôme Gardou
5e29e98f91
[NTOS:KE] Explicitly use sysretq instruction
2021-04-28 13:10:23 +02:00
Hermès Bélusca-Maïto
3ad573f92f
[NTOS:KE] Both KeFindConfigurationEntry() and KeFindConfigurationNextEntry() functions are exported by NTOSKRNL, so they definitively must NOT be in the discardable INIT section!!
...
Noticed while reviewing c7d1ff4a
.
2021-04-10 00:43:52 +02:00
Jérôme Gardou
0d3825862f
[NTOS:KE] Rewrite KiSystemCallTrampoline in assembly
...
Instead of making assumptions about what the compiler does with forced-inline functions
2021-04-06 17:57:18 +02:00
Jérôme Gardou
187ca32175
[NTOS:KE] Use PNT_TIB as argument in KeSetTebBase
2021-03-24 11:09:20 +01:00
Serge Gautherie
e0400e7810
[NTOS:KE] KiIdleLoop(): Propagate DECLSPEC_NORETURN to callers
2021-03-05 00:43:15 +03:00
Serge Gautherie
5f1d79f0c5
[NTOS:KE] KiIdleLoop(): Add DECLSPEC_NORETURN, Remove FASTCALL
2021-03-05 00:43:15 +03:00
Jérôme Gardou
4e4c47cccc
[NTOS:KE] Generate proper frame info for trap handler in GCC builds
...
CORE-8531
2021-03-02 14:37:39 +01:00
Jérôme Gardou
158235bdd5
[NTOS:KE] Fix EIP only when the breakpoint is a break
...
Fixes ntdll:exception winetest crash
ROSTESTS-80
2021-02-01 16:39:39 +01:00
Hervé Poussineau
ae4ce99e00
[ASM x64] Fix usage of macro .allocstack
...
.allocstack only accepts one 'size' parameter."
2021-01-28 20:31:16 +01:00
Hervé Poussineau
ff7035d940
[ASM x64] Change ; by /* */ for comments
...
Syntax with semi-colon is not supported by gas.
2021-01-07 21:12:11 +01:00
Hervé Poussineau
e581123c35
[NTOSKRNL] Correctly use SEH2 macros (fixes GCC x64 compilation)
2021-01-05 19:24:23 +01:00
Hervé Poussineau
c2946ced92
[NTOS:KD] Remove some now useless tests on _WINKD_
2020-11-16 08:55:03 +01:00
Victor Perevertkin
5c7ce4475e
[REACTOS] Cleanup INIT and some PAGE section allocations
...
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Timo Kreuzer
bdd4d5d8d8
[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread
2020-10-31 14:23:16 +01:00
Timo Kreuzer
f66a7e2e48
[NTOS:KE:X64] Zero out the context in KiDispatchException
2020-10-31 14:23:16 +01:00
Timo Kreuzer
637183a12c
[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit, too)
2020-10-31 14:23:16 +01:00
Timo Kreuzer
2a8c680dbe
[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser
2020-10-31 14:23:16 +01:00
Timo Kreuzer
1bfacf06f7
[NTOS:KE:X64] Zero out volatiles when returning from a system call
2020-10-31 14:23:16 +01:00
Timo Kreuzer
a016ccd117
[NTOS:KE:X64][ASM:X64] Fix delivery of APCs
...
- Deliver pending APCs on trap exit
- Pass the trapframe of KiApcInterrupt to KiDeliverApcs, not NULL.
- Fix parameter passing from KiSwapContext to KiSwapContextInternal and KiSwapContextResume, so that the ApcBypass parameter is not uninitialized
- Fix return value of KiSwapContextResume to correctly indicate whether we want to have APCs directly delivered or not (when there are non, or when delivery is suppressed)
2020-10-31 14:23:16 +01:00
Timo Kreuzer
fdc1261fb7
[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code
2020-10-31 14:23:16 +01:00
Timo Kreuzer
52d1bb5ec9
[NTOS:KE:X64] Simplify KiInitializeUserApc
2020-10-31 14:23:16 +01:00
Timo Kreuzer
aaa86d078e
[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c
2020-10-31 14:23:16 +01:00
Timo Kreuzer
fbdff437fd
[NTOS:KE:X64] Implement flushing the GDI batch
2020-10-31 14:23:16 +01:00
Timo Kreuzer
c86c55ace7
[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards conforming
...
The previous version (like the x86 one) used a combination of C and asm code, called from C code to switch the stack. This is problematic, since there is no guarantee what assumptions C code makes about the stack (i.e. it can place any kind of stack pointers into registers or on the stack itself.) The new algorithm returns back to the systemcall entry point in asm, which then calls KiConvertToGuiThread, which is also asm and calls KeSwitchKernelStack ...
2020-10-31 14:23:16 +01:00