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
This commit is contained in:
andrewfish 2011-07-14 02:31:02 +00:00
parent c4c085a2a6
commit e47f0da408
3 changed files with 20 additions and 7 deletions

View File

@ -45,7 +45,7 @@
[Sources.X64] [Sources.X64]
X64/VirtualMemory.h X64/VirtualMemory.h
X64/VirtualMemory.c X64/VirtualMemory.c
X64/DxeLoadFunc.c X64/DxeLoadFunc.c
[Sources.IPF] [Sources.IPF]
Ipf/DxeLoadFunc.c Ipf/DxeLoadFunc.c
@ -90,6 +90,9 @@
[FeaturePcd.IA32] [FeaturePcd.IA32]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
[FeaturePcd.X64]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables
[FeaturePcd] [FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress

View File

@ -52,18 +52,22 @@ HandOffToDxeCore (
TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT); TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT); TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
// if (FeaturePcdGet (PcdDxeIplBuildPageTables)) {
// Create page table and save PageMapLevel4 to CR3 //
// // Create page table and save PageMapLevel4 to CR3
PageTables = CreateIdentityMappingPageTables (); //
PageTables = CreateIdentityMappingPageTables ();
}
// //
// End of PEI phase signal // End of PEI phase signal
// //
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi); Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
ASSERT_EFI_ERROR (Status); 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. // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.

View File

@ -364,6 +364,12 @@
# #
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE|BOOLEAN|0x0001003b gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE|BOOLEAN|0x0001003b
##
# This feature flag specifies whether DxeIpl should rebuild page tables. This flag only
# makes sense in the case where the DxeIpl and the DxeCore are both X64.
#
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|TRUE|BOOLEAN|0x0001003c
[PcdsFixedAtBuild] [PcdsFixedAtBuild]
## Dynamic type PCD can be registered callback function for Pcd setting action. ## Dynamic type PCD can be registered callback function for Pcd setting action.
# PcdMaxPeiPcdCallBackNumberPerPcdEntry indicate maximum number of callback function # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicate maximum number of callback function