Align stack as required by the ABI
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 45s
Builds / ExectOS (i686) (push) Successful in 43s

This commit is contained in:
Aiken Harris 2025-07-28 17:57:16 +02:00 committed by CodingWorkshop Signing Team
parent 2ca708fe43
commit 6130a34587
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -60,6 +60,6 @@ KeStartXtSystem(IN PKERNEL_INITIALIZATION_BLOCK Parameters)
/* Raise to HIGH runlevel */
KeRaiseRunLevel(HIGH_LEVEL);
/* 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);
/* Switch the boot stack, setting the pointer to the top of the buffer and aligning it as required by the ABI */
KepSwitchBootStack(((ULONG_PTR)&ArKernelBootStack + KERNEL_STACK_SIZE) & ~(STACK_ALIGNMENT - 1));
}