]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/PciBus/Dxe/PciResourceSupport.c
1. Added EdkPciIncompatibleDeviceSupportLib in EdkModulePkg, this library is used...
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / PciBus / Dxe / PciResourceSupport.c
index 482ddc92741c88d040b54d37ea0e5ee2f21c6625..cd781841a1f10d32070560cae299863c9586a131 100644 (file)
@@ -1,18 +1,18 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
   PciResourceSupport.c\r
-  \r
+\r
 Abstract:\r
 \r
   PCI Bus Driver\r
@@ -1222,7 +1222,7 @@ Returns:
   case PciBarTypeMem32:\r
   case PciBarTypePMem32:\r
 \r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 (Node->PciDev->PciBar[Node->Bar]).Offset,\r
@@ -1239,7 +1239,7 @@ Returns:
 \r
     Address32 = (UINT32) (Address & 0x00000000FFFFFFFF);\r
 \r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 (Node->PciDev->PciBar[Node->Bar]).Offset,\r
@@ -1249,7 +1249,7 @@ Returns:
 \r
     Address32 = (UINT32) RShiftU64 (Address, 32);\r
 \r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 (UINT8) ((Node->PciDev->PciBar[Node->Bar]).Offset + 4),\r
@@ -1317,7 +1317,7 @@ Returns:
 \r
   case PPB_BAR_0:\r
   case PPB_BAR_1:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 (Node->PciDev->PciBar[Node->Bar]).Offset,\r
@@ -1333,7 +1333,7 @@ Returns:
   case PPB_IO_RANGE:\r
 \r
     Address32 = ((UINT32) (Address)) >> 8;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint8,\r
                 0x1C,\r
@@ -1342,7 +1342,7 @@ Returns:
                 );\r
 \r
     Address32 >>= 8;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x30,\r
@@ -1352,7 +1352,7 @@ Returns:
 \r
     Address32 = (UINT32) (Address + Node->Length - 1);\r
     Address32 = ((UINT32) (Address32)) >> 8;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint8,\r
                 0x1D,\r
@@ -1361,7 +1361,7 @@ Returns:
                 );\r
 \r
     Address32 >>= 8;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x32,\r
@@ -1376,7 +1376,7 @@ Returns:
   case PPB_MEM32_RANGE:\r
 \r
     Address32 = ((UINT32) (Address)) >> 16;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x20,\r
@@ -1386,7 +1386,7 @@ Returns:
 \r
     Address32 = (UINT32) (Address + Node->Length - 1);\r
     Address32 = ((UINT32) (Address32)) >> 16;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x22,\r
@@ -1402,7 +1402,7 @@ Returns:
   case PPB_PMEM64_RANGE:\r
 \r
     Address32 = ((UINT32) (Address)) >> 16;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x24,\r
@@ -1412,7 +1412,7 @@ Returns:
 \r
     Address32 = (UINT32) (Address + Node->Length - 1);\r
     Address32 = ((UINT32) (Address32)) >> 16;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint16,\r
                 0x26,\r
@@ -1421,7 +1421,7 @@ Returns:
                 );\r
 \r
     Address32 = (UINT32) RShiftU64 (Address, 32);\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x28,\r
@@ -1430,7 +1430,7 @@ Returns:
                 );\r
 \r
     Address32 = (UINT32) RShiftU64 ((Address + Node->Length - 1), 32);\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x2C,\r
@@ -1915,7 +1915,7 @@ Returns:
   switch (Node->Bar) {\r
 \r
   case P2C_BAR_0:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 (Node->PciDev->PciBar[Node->Bar]).Offset,\r
@@ -1928,7 +1928,7 @@ Returns:
     break;\r
 \r
   case P2C_MEM_1:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x1c,\r
@@ -1937,7 +1937,7 @@ Returns:
                 );\r
 \r
     TempAddress = Address + Node->Length - 1;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x20,\r
@@ -1950,7 +1950,7 @@ Returns:
       //\r
       // Set non-prefetchable bit\r
       //\r
-      PciIo->Pci.Read (\r
+      PciIoRead (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -1959,7 +1959,7 @@ Returns:
                   );\r
 \r
       BridgeControl &= 0xfeff;\r
-      PciIo->Pci.Write (\r
+      PciIoWrite (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -1972,7 +1972,7 @@ Returns:
       //\r
       // Set pre-fetchable bit\r
       //\r
-      PciIo->Pci.Read (\r
+      PciIoRead (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -1981,7 +1981,7 @@ Returns:
                   );\r
 \r
       BridgeControl |= 0x0100;\r
-      PciIo->Pci.Write (\r
+      PciIoWrite (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -1997,7 +1997,7 @@ Returns:
     break;\r
 \r
   case P2C_MEM_2:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x24,\r
@@ -2007,7 +2007,7 @@ Returns:
 \r
     TempAddress = Address + Node->Length - 1;\r
 \r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x28,\r
@@ -2020,7 +2020,7 @@ Returns:
       //\r
       // Set non-prefetchable bit\r
       //\r
-      PciIo->Pci.Read (\r
+      PciIoRead (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -2029,7 +2029,7 @@ Returns:
                   );\r
 \r
       BridgeControl &= 0xfdff;\r
-      PciIo->Pci.Write (\r
+      PciIoWrite (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -2041,7 +2041,7 @@ Returns:
       //\r
       // Set pre-fetchable bit\r
       //\r
-      PciIo->Pci.Read (\r
+      PciIoRead (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -2050,7 +2050,7 @@ Returns:
                   );\r
 \r
       BridgeControl |= 0x0200;\r
-      PciIo->Pci.Write (\r
+      PciIoWrite (\r
                   PciIo,\r
                   EfiPciIoWidthUint16,\r
                   0x3e,\r
@@ -2065,7 +2065,7 @@ Returns:
     break;\r
 \r
   case P2C_IO_1:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x2c,\r
@@ -2073,7 +2073,7 @@ Returns:
                 &Address\r
                 );\r
     TempAddress = Address + Node->Length - 1;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x30,\r
@@ -2088,7 +2088,7 @@ Returns:
     break;\r
 \r
   case P2C_IO_2:\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x34,\r
@@ -2097,7 +2097,7 @@ Returns:
                 );\r
 \r
     TempAddress = Address + Node->Length - 1;\r
-    PciIo->Pci.Write (\r
+    PciIoWrite (\r
                 PciIo,\r
                 EfiPciIoWidthUint32,\r
                 0x38,\r