mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
OvmfPkg: SmmControl2Dxe: Avoid double initialization
This change adds a build time PCD to prevent the SmmControl2Dxe driver from re-initialization the MM related registers. This register is to be used when MmControlPei is already executed in PEI phase and completed setting up the MM control registers. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
parent
8ac270e812
commit
cf4534c9da
3 changed files with 14 additions and 7 deletions
|
|
@ -485,3 +485,7 @@
|
|||
|
||||
## This feature flag indicates the firmware build needs the qemu variable service.
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuVarsRequire|FALSE|BOOLEAN|0x77
|
||||
|
||||
## Informs modules whether the platform firmware supports Standalone MM.
|
||||
#
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdStandaloneMmEnable|FALSE|BOOLEAN|0x100065
|
||||
|
|
|
|||
|
|
@ -201,13 +201,15 @@ SmmControl2DxeEntryPoint (
|
|||
// this bit is clear after each reset.
|
||||
//
|
||||
SmiEnableVal = IoRead32 (mSmiEnable);
|
||||
if ((SmiEnableVal & ICH9_SMI_EN_APMC_EN) != 0) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a: this Q35 implementation lacks SMI\n",
|
||||
__func__
|
||||
));
|
||||
goto FatalError;
|
||||
if (!FeaturePcdGet (PcdStandaloneMmEnable)) {
|
||||
if ((SmiEnableVal & ICH9_SMI_EN_APMC_EN) != 0) {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a: this Q35 implementation lacks SMI\n",
|
||||
__func__
|
||||
));
|
||||
goto FatalError;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
|
||||
[FeaturePcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdStandaloneMmEnable
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue