]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/PcatSingleSegmentPciCfgPei/PciCfg.c
Fix bug in PciCfg to support PCI express address.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / PcatSingleSegmentPciCfgPei / PciCfg.c
index 20bee53355cf8fa8e39949bded6da6c687a5aae7..361f5be40b549c218c6eb6aa128be9282fb8b825 100644 (file)
@@ -53,7 +53,7 @@ PciCfgRead (
 {\r
   UINTN  PciLibAddress;\r
 \r
-  PciLibAddress = COMMON_TO_PCILIB_ADDRESS (Address);\r
+  PciLibAddress = PciCfgAddressConvert ((EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *) &Address);\r
        switch (Width) {\r
     case EfiPeiPciCfgWidthUint8:\r
       * (UINT8 *) Buffer = PciRead8 (PciLibAddress);\r
@@ -103,7 +103,7 @@ PciCfgWrite (
 {\r
   UINTN  PciLibAddress;\r
 \r
-  PciLibAddress = COMMON_TO_PCILIB_ADDRESS (Address);\r
+  PciLibAddress = PciCfgAddressConvert ((EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *) &Address);\r
   switch (Width) {\r
     case EfiPeiPciCfgWidthUint8:\r
       PciWrite8 (PciLibAddress, *(UINT8 *) Buffer);\r
@@ -153,7 +153,7 @@ PciCfgModify (
 {\r
   UINTN  PciLibAddress;\r
 \r
-  PciLibAddress = COMMON_TO_PCILIB_ADDRESS (Address);\r
+  PciLibAddress = PciCfgAddressConvert ((EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *) &Address);\r
        switch (Width) {\r
     case EfiPeiPciCfgWidthUint8:\r
       PciAndThenOr8 (PciLibAddress, (UINT8)~ClearBits, (UINT8)SetBits);\r