diff --git a/xtoskrnl/ar/amd64/archsup.S b/xtoskrnl/ar/amd64/archsup.S index 080ea12..2142c6e 100644 --- a/xtoskrnl/ar/amd64/archsup.S +++ b/xtoskrnl/ar/amd64/archsup.S @@ -467,9 +467,11 @@ ApEnterLongMode: /* Save the pointer to PROCESSOR_START_BLOCK */ movq %rdi, %rcx - pushq %rdi - /* Call the EntryPoint routine */ + /* Allocate 32 bytes of shadow space */ + subq $32, %rsp + + /* Fetch the EntryPoint address and call the routine */ movq PROCESSOR_START_BLOCK_EntryPoint(%rdi), %rax call *%rax