Compensate missing return address, which is a 4-byte on i686 and an 8-byte on amd64

This commit is contained in:
2023-11-05 20:07:13 +01:00
parent ba833422b0
commit 91ce0f9947
4 changed files with 8 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ KepSwitchBootStack(IN ULONG_PTR Stack)
"jmp _KepStartKernel@0\n"
:
: "m" (Stack),
"i" (KTRAP_FRAME_ALIGN | KTRAP_FRAME_SIZE | NPX_FRAME_SIZE),
"i" (KTRAP_FRAME_ALIGN | KTRAP_FRAME_SIZE | NPX_FRAME_SIZE | KRETURN_ADDRESS_SIZE),
"i" (CR0_EM | CR0_MP | CR0_TS),
"p" (KepStartKernel));
}