X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FLibrary%2FPciHostBridgeLib%2FXenSupport.c;h=920417950ad93df3e9749f6ae7359d054af58820;hp=21896637e051a1c2f4ef5348ef741289ec6b02f4;hb=e33305ea6c6a7c9946ca4ec60aa270764a91ab8f;hpb=49effaf26ec952905bc7710587c6a58437864cdf diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c index 21896637e0..920417950a 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c @@ -30,7 +30,7 @@ STATIC VOID PcatPciRootBridgeBarExisted ( - IN UINT64 Address, + IN UINTN Address, OUT UINT32 *OriginalValue, OUT UINT32 *Value ) @@ -180,7 +180,7 @@ ScanForRootBridges ( UINT8 Device; UINT8 Function; UINTN NumberOfDevices; - UINT64 Address; + UINTN Address; PCI_TYPE01 Pci; UINT64 Attributes; UINT64 Base; @@ -202,8 +202,13 @@ ScanForRootBridges ( for (PrimaryBus = 0; PrimaryBus <= PCI_MAX_BUS; PrimaryBus = SubBus + 1) { SubBus = PrimaryBus; Attributes = 0; + + ZeroMem (&Io, sizeof (Io)); + ZeroMem (&Mem, sizeof (Mem)); + ZeroMem (&MemAbove4G, sizeof (MemAbove4G)); + ZeroMem (&PMem, sizeof (PMem)); + ZeroMem (&PMemAbove4G, sizeof (PMemAbove4G)); Io.Base = Mem.Base = MemAbove4G.Base = PMem.Base = PMemAbove4G.Base = MAX_UINT64; - Io.Limit = Mem.Limit = MemAbove4G.Limit = PMem.Limit = PMemAbove4G.Limit = 0; // // Scan all the PCI devices on the primary bus of the PCI root bridge //