]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c
MdeModulePkg: PciHostBridgeDxe: don't assume extended config space
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciHostBridgeDxe / PciRootBridgeIo.c
index 932aefd5d621fe8593f2981240b3589a4a8e5b6c..cda9b49b39258cf895796f33f172e6fdd631f49a 100644 (file)
@@ -80,6 +80,7 @@ CreateRootBridge (
   DEBUG ((EFI_D_INFO, "%s\n", DevicePathStr = ConvertDevicePathToText (Bridge->DevicePath, FALSE, FALSE)));\r
   DEBUG ((EFI_D_INFO, "  Support/Attr: %lx / %lx\n", Bridge->Supports, Bridge->Attributes));\r
   DEBUG ((EFI_D_INFO, "    DmaAbove4G: %s\n", Bridge->DmaAbove4G ? L"Yes" : L"No"));\r
+  DEBUG ((EFI_D_INFO, "NoExtConfSpace: %s\n", Bridge->NoExtendedConfigSpace ? L"Yes" : L"No"));\r
   DEBUG ((EFI_D_INFO, "     AllocAttr: %lx (%s%s)\n", Bridge->AllocationAttributes,\r
           (Bridge->AllocationAttributes & EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM) != 0 ? L"CombineMemPMem " : L"",\r
           (Bridge->AllocationAttributes & EFI_PCI_HOST_BRIDGE_MEM64_DECODE) != 0 ? L"Mem64Decode" : L""\r
@@ -155,6 +156,7 @@ CreateRootBridge (
   RootBridge->Supports = Bridge->Supports;\r
   RootBridge->Attributes = Bridge->Attributes;\r
   RootBridge->DmaAbove4G = Bridge->DmaAbove4G;\r
+  RootBridge->NoExtendedConfigSpace = Bridge->NoExtendedConfigSpace;\r
   RootBridge->AllocationAttributes = Bridge->AllocationAttributes;\r
   RootBridge->DevicePath = DuplicateDevicePath (Bridge->DevicePath);\r
   RootBridge->DevicePathStr = DevicePathStr;\r
@@ -351,7 +353,7 @@ RootBridgeIoCheckParameter (
       Address = PciRbAddr->Register;\r
     }\r
     Base = 0;\r
-    Limit = 0xFFF;\r
+    Limit = RootBridge->NoExtendedConfigSpace ? 0xFF : 0xFFF;\r
   }\r
 \r
   if (Address < Base) {\r