summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/DxeIplPeim
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-14 02:31:02 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-14 02:31:02 +0000
commite47f0da4087bd00f1ee0697d0a9020ec4373e447 (patch)
tree8481f20a4657be55b2cc5142a1d3ffca604e5aa1 /MdeModulePkg/Core/DxeIplPeim
parentc4c085a2a680afc712b40e37f5aeb69ce25478ce (diff)
downloadedk2-platforms-e47f0da4087bd00f1ee0697d0a9020ec4373e447.tar.xz
MdeModulePkg: Add PcdDxeIplBuildPageTables for DxeIpl X64 to optionally not rebuild the page tables.
signed-off-by: andrewfish reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12016 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf5
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c16
2 files changed, 14 insertions, 7 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index 5c5f7e82a5..784fdf18f6 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -45,7 +45,7 @@
[Sources.X64]
X64/VirtualMemory.h
X64/VirtualMemory.c
- X64/DxeLoadFunc.c
+ X64/DxeLoadFunc.c
[Sources.IPF]
Ipf/DxeLoadFunc.c
@@ -90,6 +90,9 @@
[FeaturePcd.IA32]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
+[FeaturePcd.X64]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables
+
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
index 1b12801d67..729e1ee325 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
@@ -52,18 +52,22 @@ HandOffToDxeCore (
TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
- //
- // Create page table and save PageMapLevel4 to CR3
- //
- PageTables = CreateIdentityMappingPageTables ();
-
+ if (FeaturePcdGet (PcdDxeIplBuildPageTables)) {
+ //
+ // Create page table and save PageMapLevel4 to CR3
+ //
+ PageTables = CreateIdentityMappingPageTables ();
+ }
+
//
// End of PEI phase signal
//
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
ASSERT_EFI_ERROR (Status);
- AsmWriteCr3 (PageTables);
+ if (FeaturePcdGet (PcdDxeIplBuildPageTables)) {
+ AsmWriteCr3 (PageTables);
+ }
//
// Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.