UefiCpuPkg: Disable MTRR programming for UefiPayloadPkg
The MTRRs have already been programmed by FSB. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
committed by
Tim Crawford
parent
0bef9ccd43
commit
1d70aa7a9b
@@ -2680,6 +2680,10 @@ IsMtrrSupported (
|
|||||||
CPUID_VERSION_INFO_EDX Edx;
|
CPUID_VERSION_INFO_EDX Edx;
|
||||||
MSR_IA32_MTRRCAP_REGISTER MtrrCap;
|
MSR_IA32_MTRRCAP_REGISTER MtrrCap;
|
||||||
|
|
||||||
|
if (PcdGetBool(PcdCpuDisableMtrrProgramming)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check CPUID(1).EDX[12] for MTRR capability
|
// Check CPUID(1).EDX[12] for MTRR capability
|
||||||
//
|
//
|
||||||
|
@@ -37,4 +37,4 @@
|
|||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs ## SOMETIMES_CONSUMES
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs ## SOMETIMES_CONSUMES
|
||||||
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuDisableMtrrProgramming ## CONSUMES
|
||||||
|
@@ -217,6 +217,10 @@
|
|||||||
# @Prompt SMM Code Access Check.
|
# @Prompt SMM Code Access Check.
|
||||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmCodeAccessCheckEnable|TRUE|BOOLEAN|0x60000013
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmCodeAccessCheckEnable|TRUE|BOOLEAN|0x60000013
|
||||||
|
|
||||||
|
## Disables MTRR programming in case it's already programmed by FSB.
|
||||||
|
# @Prompt Disable MTRR programming.
|
||||||
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuDisableMtrrProgramming|FALSE|BOOLEAN|0x00000017
|
||||||
|
|
||||||
## Specifies the number of variable MTRRs reserved for OS use. The default number of
|
## Specifies the number of variable MTRRs reserved for OS use. The default number of
|
||||||
# MTRRs reserved for OS use is 2.
|
# MTRRs reserved for OS use is 2.
|
||||||
# @Prompt Number of reserved variable MTRRs.
|
# @Prompt Number of reserved variable MTRRs.
|
||||||
|
@@ -140,9 +140,13 @@
|
|||||||
|
|
||||||
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuHotPlugDataAddress_HELP #language en-US "Contains the pointer to a CPU Hot Plug Data structure if CPU hot-plug is supported."
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuHotPlugDataAddress_HELP #language en-US "Contains the pointer to a CPU Hot Plug Data structure if CPU hot-plug is supported."
|
||||||
|
|
||||||
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuNumberOfReservedVariableMtrrs_PROMPT #language en-US "Number of reserved variable MTRRs"
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuDisableMtrrProgramming_PROMPT #language en-US "Number of reserved variable MTRRs"
|
||||||
|
|
||||||
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuNumberOfReservedVariableMtrrs_HELP #language en-US "Specifies the number of variable MTRRs reserved for OS use."
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuDisableMtrrProgramming_HELP #language en-US "Specifies the number of variable MTRRs reserved for OS use."
|
||||||
|
|
||||||
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuNumberOfReservedVariableMtrrs_PROMPT #language en-US "Disable MTRR programming."
|
||||||
|
|
||||||
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuNumberOfReservedVariableMtrrs_HELP #language en-US "Disables MTRR programming in case it's already programmed by FSB."
|
||||||
|
|
||||||
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuApLoopMode_PROMPT #language en-US "The AP wait loop state"
|
#string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuApLoopMode_PROMPT #language en-US "The AP wait loop state"
|
||||||
|
|
||||||
|
@@ -324,6 +324,8 @@
|
|||||||
!if $(SOURCE_DEBUG_ENABLE)
|
!if $(SOURCE_DEBUG_ENABLE)
|
||||||
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
|
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
|
||||||
!endif
|
!endif
|
||||||
|
# Disable MTRR programming
|
||||||
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuDisableMtrrProgramming|TRUE
|
||||||
|
|
||||||
[PcdsPatchableInModule.common]
|
[PcdsPatchableInModule.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
|
||||||
|
Reference in New Issue
Block a user