Correctly initialize the boot stack pointer, as the stack grows downwards
This commit is contained in:
parent
61fcf8e0ec
commit
fdf649fcec
@ -60,6 +60,6 @@ KeStartXtSystem(IN PKERNEL_INITIALIZATION_BLOCK Parameters)
|
||||
/* Raise to HIGH runlevel */
|
||||
KeRaiseRunLevel(HIGH_LEVEL);
|
||||
|
||||
/* Switch boot stack aligning it to 4 byte boundary */
|
||||
KepSwitchBootStack((ULONG_PTR)&ArKernelBootStack & ~0x3);
|
||||
/* Switch the boot stack, setting the pointer to the top of the buffer and aligning it to a 4-byte boundary */
|
||||
KepSwitchBootStack(((ULONG_PTR)&ArKernelBootStack + KERNEL_STACK_SIZE) & ~0x3);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user