From 014b472053ae31e6b9fcdb5d4ee01e29b4d44fd4 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 26 Feb 2016 23:09:46 +0100 Subject: MdeModulePkg: PciHostBridgeDxe: don't assume extended config space The "pc" ("pc-i440fx-*") machine types of QEMU don't support extended config space. Accordingly, OVMF will use the following library instances in connection with the core PciHostBridgeDxe driver: BasePciSegmentLibPci [class: PciSegmentLib] BasePciLibCf8 [class: PciLib] BasePciCf8Lib [class: PciCf8Lib] Add a new field to the PCI_ROOT_BRIDGE structure so that RootBridgeIoCheckParameter() can catch config space offsets above 0xFF on such old (emulated) platforms. Cc: Ruiyu Ni Cc: Jordan Justen Cc: Marcel Apfelbaum Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Michael Kinney Reviewed-by: Jordan Justen Reviewed-by: Marcel Apfelbaum Reviewed-by: Ruiyu Ni --- MdeModulePkg/Include/Library/PciHostBridgeLib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'MdeModulePkg/Include') diff --git a/MdeModulePkg/Include/Library/PciHostBridgeLib.h b/MdeModulePkg/Include/Library/PciHostBridgeLib.h index 16ad104a9..b67ac5e17 100644 --- a/MdeModulePkg/Include/Library/PciHostBridgeLib.h +++ b/MdeModulePkg/Include/Library/PciHostBridgeLib.h @@ -34,6 +34,10 @@ typedef struct { ///< and SetAttributes() in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. BOOLEAN DmaAbove4G; ///< DMA above 4GB memory. ///< Set to TRUE when root bridge supports DMA above 4GB memory. + BOOLEAN NoExtendedConfigSpace; ///< When FALSE, the root bridge supports + ///< Extended (4096-byte) Configuration Space. + ///< When TRUE, the root bridge supports + ///< 256-byte Configuration Space only. UINT64 AllocationAttributes; ///< Allocation attributes. ///< Refer to EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM and ///< EFI_PCI_HOST_BRIDGE_MEM64_DECODE used by GetAllocAttributes() -- cgit v1.2.3