OvmfPkg/PciHostBridgeLib: Scan for root bridges when running over Xen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gary Lin <glin@suse.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <Library/PciHostBridgeLib.h>
|
||||
#include <Library/PciLib.h>
|
||||
#include <Library/QemuFwCfgLib.h>
|
||||
#include "PciHostBridge.h"
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
@@ -113,7 +114,6 @@ STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 };
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Memory allocation failed.
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
InitRootBridge (
|
||||
IN UINT64 Supports,
|
||||
@@ -217,6 +217,10 @@ PciHostBridgeGetRootBridges (
|
||||
PCI_ROOT_BRIDGE_APERTURE Mem;
|
||||
PCI_ROOT_BRIDGE_APERTURE MemAbove4G;
|
||||
|
||||
if (PcdGetBool (PcdPciDisableBusEnumeration)) {
|
||||
return ScanForRootBridges (Count);
|
||||
}
|
||||
|
||||
Attributes = EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO |
|
||||
EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO |
|
||||
EFI_PCI_ATTRIBUTE_ISA_IO_16 |
|
||||
|
Reference in New Issue
Block a user