diff --git a/MdeModulePkg/Core/Dxe/SysCall/X64/InitializeMsr.c b/MdeModulePkg/Core/Dxe/SysCall/X64/InitializeMsr.c index af451fe547..c3bcc33919 100644 --- a/MdeModulePkg/Core/Dxe/SysCall/X64/InitializeMsr.c +++ b/MdeModulePkg/Core/Dxe/SysCall/X64/InitializeMsr.c @@ -111,7 +111,7 @@ MakeUserPageTableTemplate ( // PageDirectory1GEntry->Uint64 = (UINT64)PageAddress | PageTableInfo->AddressEncMask; PageDirectory1GEntry->Bits.ReadWrite = 1; - PageDirectory1GEntry->Bits.Present = 1; + PageDirectory1GEntry->Bits.Present = 0; PageDirectory1GEntry->Bits.MustBe1 = 1; } } else { diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm index 49f6267982..31e1a70780 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm @@ -63,11 +63,14 @@ global ASM_PFX(UserPageTable) ASM_PFX(UserPageTable): resq 1 -ALIGN 4096 global ASM_PFX(mSwitchCr3Flag) ASM_PFX(mSwitchCr3Flag): db 0x0 +ALIGN 4096 +Padding: + db 0x0 + DEFAULT REL SECTION .text