Add PCD for 1G page table
signed off by: jyao1 reviewed by: jfan12 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12397 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
125887e7e8
commit
378175d258
|
@ -221,11 +221,13 @@ S3CreateIdentityMappingPageTables (
|
||||||
PAGE_TABLE_1G_ENTRY *PageDirectory1GEntry;
|
PAGE_TABLE_1G_ENTRY *PageDirectory1GEntry;
|
||||||
|
|
||||||
Page1GSupport = FALSE;
|
Page1GSupport = FALSE;
|
||||||
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
if (PcdGetBool(PcdUse1GPageTable)) {
|
||||||
if (RegEax >= 0x80000001) {
|
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
||||||
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
if (RegEax >= 0x80000001) {
|
||||||
if ((RegEdx & BIT26) != 0) {
|
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
||||||
Page1GSupport = TRUE;
|
if ((RegEdx & BIT26) != 0) {
|
||||||
|
Page1GSupport = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize ## CONSUMES
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize ## CONSUMES
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize ## CONSUMES
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
#
|
#
|
||||||
|
|
|
@ -96,6 +96,9 @@
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress
|
||||||
|
|
||||||
|
[Pcd.IA32,Pcd.X64]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiLoadFilePpiGuid AND gEfiPeiMasterBootModePpiGuid
|
gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiLoadFilePpiGuid AND gEfiPeiMasterBootModePpiGuid
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,13 @@ CreateIdentityMappingPageTables (
|
||||||
PAGE_TABLE_1G_ENTRY *PageDirectory1GEntry;
|
PAGE_TABLE_1G_ENTRY *PageDirectory1GEntry;
|
||||||
|
|
||||||
Page1GSupport = FALSE;
|
Page1GSupport = FALSE;
|
||||||
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
if (PcdGetBool(PcdUse1GPageTable)) {
|
||||||
if (RegEax >= 0x80000001) {
|
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
||||||
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
if (RegEax >= 0x80000001) {
|
||||||
if ((RegEdx & BIT26) != 0) {
|
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
||||||
Page1GSupport = TRUE;
|
if ((RegEdx & BIT26) != 0) {
|
||||||
|
Page1GSupport = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -804,3 +804,7 @@
|
||||||
# default value is set to Zero. And the PCD is assumed ONLY to be accessed in DxeS3BootScriptLib Library.
|
# default value is set to Zero. And the PCD is assumed ONLY to be accessed in DxeS3BootScriptLib Library.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0|UINT64|0x00030000
|
gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0|UINT64|0x00030000
|
||||||
|
|
||||||
|
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx, PcdsDynamicHii]
|
||||||
|
## This PCD specifies whether 1G page table is enabled.
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|FALSE|BOOLEAN|0x30000047
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,9 @@
|
||||||
[Pcd.IA32]
|
[Pcd.IA32]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleCoalesceFile
|
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleCoalesceFile
|
||||||
|
|
||||||
|
[Pcd.IA32]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||||
|
|
||||||
[FeaturePcd.IA32]
|
[FeaturePcd.IA32]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,13 @@ CalculatePageTableSize (
|
||||||
BOOLEAN Page1GSupport;
|
BOOLEAN Page1GSupport;
|
||||||
|
|
||||||
Page1GSupport = FALSE;
|
Page1GSupport = FALSE;
|
||||||
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
if (PcdGetBool(PcdUse1GPageTable)) {
|
||||||
if (RegEax >= 0x80000001) {
|
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
||||||
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
if (RegEax >= 0x80000001) {
|
||||||
if ((RegEdx & BIT26) != 0) {
|
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
||||||
Page1GSupport = TRUE;
|
if ((RegEdx & BIT26) != 0) {
|
||||||
|
Page1GSupport = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -518,11 +518,13 @@ RestoreS3PageTables (
|
||||||
S3NvsPageTableAddress += SIZE_4KB;
|
S3NvsPageTableAddress += SIZE_4KB;
|
||||||
|
|
||||||
Page1GSupport = FALSE;
|
Page1GSupport = FALSE;
|
||||||
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
if (PcdGetBool(PcdUse1GPageTable)) {
|
||||||
if (RegEax >= 0x80000001) {
|
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
|
||||||
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
if (RegEax >= 0x80000001) {
|
||||||
if ((RegEdx & BIT26) != 0) {
|
AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);
|
||||||
Page1GSupport = TRUE;
|
if ((RegEdx & BIT26) != 0) {
|
||||||
|
Page1GSupport = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,5 +75,8 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiPeiReadOnlyVariable2PpiGuid
|
gEfiPeiReadOnlyVariable2PpiGuid
|
||||||
|
|
Loading…
Reference in New Issue