OvmfPkg: introduce PcdCsmEnable feature flag
In the DXE phase and later, it is possible for a module to dynamically
determine whether a CSM is enabled. An example can be seen in commit
855743f717
("OvmfPkg: prevent 64-bit MMIO BAR degradation if there is no
CSM", 2016-05-25).
SEC and PEI phase modules cannot check the Legacy BIOS Protocol however.
For their sake, introduce a new feature PCD that simply reflects the
CSM_ENABLE build flag.
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien@xen.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1512
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200129214412.2361-11-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
committed by
mergify[bot]
parent
9108fc17b0
commit
50f911d25d
@ -276,3 +276,8 @@
|
||||
# runtime OS from tampering with firmware structures (special memory ranges
|
||||
# used by OVMF, the varstore pflash chip, LockBox etc).
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|FALSE|BOOLEAN|0x1e
|
||||
|
||||
## Informs modules (including pre-DXE-phase modules) whether the platform
|
||||
# firmware contains a CSM (Compatibility Support Module).
|
||||
#
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|FALSE|BOOLEAN|0x35
|
||||
|
@ -428,6 +428,9 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
||||
!ifdef $(CSM_ENABLE)
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
|
||||
!endif
|
||||
!if $(SMM_REQUIRE) == TRUE
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
|
||||
|
@ -433,6 +433,9 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
||||
!ifdef $(CSM_ENABLE)
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
|
||||
!endif
|
||||
!if $(SMM_REQUIRE) == TRUE
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
|
||||
|
@ -433,6 +433,9 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
||||
!ifdef $(CSM_ENABLE)
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
|
||||
!endif
|
||||
!if $(SMM_REQUIRE) == TRUE
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
|
||||
|
@ -361,6 +361,9 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
||||
!ifdef $(CSM_ENABLE)
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
|
||||
!endif
|
||||
|
||||
[PcdsFixedAtBuild]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
|
||||
|
Reference in New Issue
Block a user