diff options
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c index 51055e157a..05c5203d82 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
#include "DxeIpl.h"
+#include "X64/VirtualMemory.h"
@@ -36,6 +37,7 @@ HandOffToDxeCore ( VOID *BaseOfStack;
VOID *TopOfStack;
EFI_STATUS Status;
+ UINTN PageTables;
//
// Allocate 128KB for the Stack
@@ -51,11 +53,18 @@ HandOffToDxeCore ( TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
//
+ // Create page table and save PageMapLevel4 to CR3
+ //
+ PageTables = CreateIdentityMappingPageTables ();
+
+ //
// End of PEI phase singal
//
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
ASSERT_EFI_ERROR (Status);
+ AsmWriteCr3 (PageTables);
+
//
// Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.
//
|