From e1b259da426b3bc0cddf7a293bc8c5c8d85c6d8d Mon Sep 17 00:00:00 2001 From: "Jiahui Cen via groups.io" Date: Tue, 19 Jan 2021 09:12:56 +0800 Subject: OvmfPkg/PciHostBridgeUtilityLib: Extend parameters of InitRootBridge() Extend parameter list of PciHostBridgeUtilityInitRootBridge() with DmaAbove4G and NoExtendedConfigSpace to prepare for sharing with ArmVirtPkg. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Anthony Perard Cc: Julien Grall Signed-off-by: Jiahui Cen Signed-off-by: Yubo Miao Message-Id: <20210119011302.10908-6-cenjiahui@huawei.com> Reviewed-by: Laszlo Ersek --- OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 5 +++++ OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 1 + OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 1 + 3 files changed, 7 insertions(+) (limited to 'OvmfPkg/Library/PciHostBridgeLib') diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 07fa981..8758d7c 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -151,6 +152,8 @@ PciHostBridgeGetRootBridges ( Attributes, Attributes, AllocationAttributes, + FALSE, + PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID, (UINT8) LastRootBridgeNumber, (UINT8) (RootBridgeNumber - 1), &Io, @@ -176,6 +179,8 @@ PciHostBridgeGetRootBridges ( Attributes, Attributes, AllocationAttributes, + FALSE, + PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID, (UINT8) LastRootBridgeNumber, PCI_MAX_BUS, &Io, diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf index 7944f94..7245826 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf @@ -50,4 +50,5 @@ gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c index 5dfeba0..9ef39f0 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c @@ -456,6 +456,7 @@ ScanForRootBridges ( ASSERT (RootBridges != NULL); PciHostBridgeUtilityInitRootBridge ( Attributes, Attributes, 0, + FALSE, PcdGet16 (PcdOvmfHostBridgePciDevId) != INTEL_Q35_MCH_DEVICE_ID, (UINT8) PrimaryBus, (UINT8) SubBus, &Io, &Mem, &MemAbove4G, &mNonExistAperture, &mNonExistAperture, &RootBridges[*NumberOfRootBridges] -- cgit v1.1