summaryrefslogtreecommitdiff
path: root/MdeModulePkg/MdeModulePkg.dec
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-19 09:36:13 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-26 05:49:15 -0700
commit065ae7d717f9e49c3be12dada109d60dead0bb90 (patch)
tree1994e75536971a096087cb43320ebe42568c5698 /MdeModulePkg/MdeModulePkg.dec
parent587e9dfbbafe7d4e772c1870b8c880c6d7a8a70c (diff)
downloadedk2-065ae7d717f9e49c3be12dada109d60dead0bb90.zip
edk2-065ae7d717f9e49c3be12dada109d60dead0bb90.tar.gz
edk2-065ae7d717f9e49c3be12dada109d60dead0bb90.tar.bz2
MdeModulePkg/PciBusDxe: make OPROM BAR degradation configurable
The 'universal' PCI bus driver in MdeModulePkg contains a quirk to degrade 64-bit PCI MMIO BARs to 32-bit in the presence of an option ROM on the same PCI controller. This quirk is highly specific to not just the X64 architecture in general, but to the PC platform in particular, given that only X64 platforms that require legacy PC BIOS compatibility require it. However, making the quirk dependent on the presence of the legacy BIOS protocol met with resistance, due to the fact that it introduces a dependency on the IntelFrameworkModulePkg package. So instead, make the quirk configurable, by introducing a feature flag PCD 'PcdPciDegradeResourceForOptionRom' which defaults to TRUE only for X64. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/MdeModulePkg.dec')
-rw-r--r--MdeModulePkg/MdeModulePkg.dec12
1 files changed, 12 insertions, 0 deletions
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 8d90f16..270088c 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -749,6 +749,18 @@
# @Prompt Turn on PS2 Mouse Extended Verification
gEfiMdeModulePkgTokenSpaceGuid.PcdPs2MouseExtendedVerification|TRUE|BOOLEAN|0x00010075
+[PcdsFeatureFlag.X64]
+ ## Indicates whether 64-bit PCI MMIO BARs should degrade to 32-bit in the presence of an option ROM
+ # On X64 platforms, Option ROMs may contain code that executes in the context of a legacy BIOS (CSM),
+ # which requires that all PCI MMIO BARs are located below 4 GB
+ # TRUE - All PCI MMIO BARs of a device will be located below 4 GB if it has an option ROM
+ # FALSE - PCI MMIO BARs of a device may be located above 4 GB even if it has an option ROM
+ # @Prompt Degrade 64-bit PCI MMIO BARs for legacy BIOS option ROMs
+ gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|TRUE|BOOLEAN|0x0001003a
+
+[PcdsFeatureFlag.IA32, PcdsFeatureFlag.ARM, PcdsFeatureFlag.AARCH64]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE|BOOLEAN|0x0001003a
+
[PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64]
## Indicates if DxeIpl should switch to long mode to enter DXE phase.
# It is assumed that 64-bit DxeCore is built in firmware if it is true; otherwise 32-bit DxeCore