]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Print resource allocation/bar programming when PciBus driver does PCI BUS enumeration.
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Aug 2011 09:08:09 +0000 (09:08 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Aug 2011 09:08:09 +0000 (09:08 +0000)
Signed-off-by: niruiyu
Reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12087 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h

index d77982c02afdd96263d07b9185590edc3e1241e5..239835eab75fc3a7cd67a5d32e9b2b930fa1d5e4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/IncompatiblePciDeviceSupport.h>\r
 #include <Protocol/PciOverride.h>\r
 #include <Protocol/PciEnumerationComplete.h>\r
 #include <Protocol/IncompatiblePciDeviceSupport.h>\r
 #include <Protocol/PciOverride.h>\r
 #include <Protocol/PciEnumerationComplete.h>\r
+#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -127,6 +128,12 @@ struct _PCI_BAR {
 #define PCI_CARD_PREFETCHABLE_MEMORY_0_ENABLE BIT8\r
 #define PCI_CARD_PREFETCHABLE_MEMORY_1_ENABLE BIT9\r
 \r
 #define PCI_CARD_PREFETCHABLE_MEMORY_0_ENABLE BIT8\r
 #define PCI_CARD_PREFETCHABLE_MEMORY_1_ENABLE BIT9\r
 \r
+#define RB_IO_RANGE                           1\r
+#define RB_MEM32_RANGE                        2\r
+#define RB_PMEM32_RANGE                       3\r
+#define RB_MEM64_RANGE                        4\r
+#define RB_PMEM64_RANGE                       5\r
+\r
 #define PPB_BAR_0                             0\r
 #define PPB_BAR_1                             1\r
 #define PPB_IO_RANGE                          2\r
 #define PPB_BAR_0                             0\r
 #define PPB_BAR_1                             1\r
 #define PPB_IO_RANGE                          2\r
index 3c581ec27d9277802bbfd78415e1de5a4a1fe39c..8c557f2fd760ec840896d5040e5b193bb1d547c4 100644 (file)
@@ -5,7 +5,7 @@
 #  space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable\r
 #  hot plug supporting.\r
 #\r
 #  space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable\r
 #  hot plug supporting.\r
 #\r
-#  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -97,6 +97,7 @@
   gEfiPciRootBridgeIoProtocolGuid                 ## CONSUMED\r
   gEfiIncompatiblePciDeviceSupportProtocolGuid    ## CONSUMED\r
   gEfiLoadFile2ProtocolGuid                       ## CONSUMED\r
   gEfiPciRootBridgeIoProtocolGuid                 ## CONSUMED\r
   gEfiIncompatiblePciDeviceSupportProtocolGuid    ## CONSUMED\r
   gEfiLoadFile2ProtocolGuid                       ## CONSUMED\r
+  gEfiDevicePathToTextProtocolGuid                ## CONSUMED\r
 \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport\r
 \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport\r
index 2dd5889afcd6b216468a9d08584e51b9ecf03feb..620933779c458c95fb47e41cf6e80d4ef9f749fa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI emumeration support functions implementation for PCI Bus module.\r
 \r
 /** @file\r
   PCI emumeration support functions implementation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -14,6 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "PciBus.h"\r
 \r
 \r
 #include "PciBus.h"\r
 \r
+extern CHAR16  *mBarTypeStr[];\r
+\r
 /**\r
   This routine is used to check whether the pci device is present.\r
 \r
 /**\r
   This routine is used to check whether the pci device is present.\r
 \r
@@ -211,6 +213,15 @@ PciSearchDevice (
 \r
   PciIoDevice = NULL;\r
 \r
 \r
   PciIoDevice = NULL;\r
 \r
+  DEBUG ((\r
+    EFI_D_INFO,\r
+    "PciBus: Discovered %s @ [%02x|%02x|%02x]\n",\r
+    IS_PCI_BRIDGE (Pci) ?     L"PPB" :\r
+    IS_CARDBUS_BRIDGE (Pci) ? L"P2C" :\r
+                              L"PCI",\r
+    Bus, Device, Func\r
+    ));\r
+\r
   if (!IS_PCI_BRIDGE (Pci)) {\r
 \r
     if (IS_CARDBUS_BRIDGE (Pci)) {\r
   if (!IS_PCI_BRIDGE (Pci)) {\r
 \r
     if (IS_CARDBUS_BRIDGE (Pci)) {\r
@@ -304,6 +315,46 @@ PciSearchDevice (
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Dump the PCI BAR information.\r
+\r
+  @param PciIoDevice     PCI IO instance.\r
+**/\r
+VOID\r
+DumpPciBars (\r
+  IN PCI_IO_DEVICE                    *PciIoDevice\r
+  )\r
+{\r
+  UINTN                               Index;\r
+\r
+  for (Index = 0; Index < PCI_MAX_BAR; Index++) {\r
+    if (PciIoDevice->PciBar[Index].BarType == PciBarTypeUnknown) {\r
+      continue;\r
+    }\r
+\r
+    DEBUG ((\r
+      EFI_D_INFO,\r
+      "   BAR[%d]: Type = %s; Alignment = 0x%x;\tLength = 0x%x;\tOffset = 0x%02x\n",\r
+      Index, mBarTypeStr[MIN (PciIoDevice->PciBar[Index].BarType, PciBarTypeMaxType)],\r
+      PciIoDevice->PciBar[Index].Alignment, PciIoDevice->PciBar[Index].Length, PciIoDevice->PciBar[Index].Offset\r
+      ));\r
+  }\r
+\r
+  for (Index = 0; Index < PCI_MAX_BAR; Index++) {\r
+    if ((PciIoDevice->VfPciBar[Index].BarType == PciBarTypeUnknown) && (PciIoDevice->VfPciBar[Index].Length == 0)) {\r
+      continue;\r
+    }\r
+\r
+    DEBUG ((\r
+      EFI_D_INFO,\r
+      " VFBAR[%d]: Type = %s; Alignment = 0x%x;\tLength = 0x%x;\tOffset = 0x%02x\n",\r
+      Index, mBarTypeStr[MIN (PciIoDevice->VfPciBar[Index].BarType, PciBarTypeMaxType)],\r
+      PciIoDevice->VfPciBar[Index].Alignment, PciIoDevice->VfPciBar[Index].Length, PciIoDevice->VfPciBar[Index].Offset\r
+      ));\r
+  }\r
+  DEBUG ((EFI_D_INFO, "\n"));\r
+}\r
+\r
 /**\r
   Create PCI device instance for PCI device.\r
 \r
 /**\r
   Create PCI device instance for PCI device.\r
 \r
@@ -377,6 +428,8 @@ GatherDeviceInfo (
       Offset = PciIovParseVfBar (PciIoDevice, Offset, BarIndex);\r
     }\r
   }\r
       Offset = PciIovParseVfBar (PciIoDevice, Offset, BarIndex);\r
     }\r
   }\r
+\r
+  DEBUG_CODE (DumpPciBars (PciIoDevice););\r
   return PciIoDevice;\r
 }\r
 \r
   return PciIoDevice;\r
 }\r
 \r
@@ -529,6 +582,8 @@ GatherPpbInfo (
 \r
   GetResourcePaddingPpb (PciIoDevice);\r
 \r
 \r
   GetResourcePaddingPpb (PciIoDevice);\r
 \r
+  DEBUG_CODE (DumpPciBars (PciIoDevice););\r
+\r
   return PciIoDevice;\r
 }\r
 \r
   return PciIoDevice;\r
 }\r
 \r
@@ -598,6 +653,8 @@ GatherP2CInfo (
                          EFI_BRIDGE_PMEM32_DECODE_SUPPORTED |\r
                          EFI_BRIDGE_IO32_DECODE_SUPPORTED;\r
 \r
                          EFI_BRIDGE_PMEM32_DECODE_SUPPORTED |\r
                          EFI_BRIDGE_IO32_DECODE_SUPPORTED;\r
 \r
+  DEBUG_CODE (DumpPciBars (PciIoDevice););\r
+\r
   return PciIoDevice;\r
 }\r
 \r
   return PciIoDevice;\r
 }\r
 \r
@@ -2035,22 +2092,15 @@ CreatePciIoDevice (
                               );\r
           DEBUG ((\r
             EFI_D_INFO,\r
                               );\r
           DEBUG ((\r
             EFI_D_INFO,\r
-            "PCI B%x.D%x.F%x - ARI forwarding enabled\n",\r
-            (UINTN)Bridge->BusNumber,\r
-            (UINTN)Bridge->DeviceNumber,\r
-            (UINTN)Bridge->FunctionNumber\r
+            " ARI: forwarding enabled for PPB[%02x:%02x:%02x]\n",\r
+            Bridge->BusNumber,\r
+            Bridge->DeviceNumber,\r
+            Bridge->FunctionNumber\r
             ));\r
         }\r
       }\r
 \r
             ));\r
         }\r
       }\r
 \r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI ARI B%x.D%x.F%x - ARI Cap offset - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)PciIoDevice->AriCapabilityOffset\r
-        ));\r
+      DEBUG ((EFI_D_INFO, " ARI: CapOffset = 0x%x\n", PciIoDevice->AriCapabilityOffset));\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
@@ -2066,6 +2116,7 @@ CreatePciIoDevice (
                NULL\r
                );\r
     if (!EFI_ERROR (Status)) {\r
                NULL\r
                );\r
     if (!EFI_ERROR (Status)) {\r
+      UINT32    SupportedPageSize;\r
       UINT16    VFStride;\r
       UINT16    FirstVFOffset;\r
       UINT16    Data16;\r
       UINT16    VFStride;\r
       UINT16    FirstVFOffset;\r
       UINT16    Data16;\r
@@ -2102,18 +2153,9 @@ CreatePciIoDevice (
                    EfiPciIoWidthUint32,\r
                    PciIoDevice->SrIovCapabilityOffset + EFI_PCIE_CAPABILITY_ID_SRIOV_SUPPORTED_PAGE_SIZE,\r
                    1,\r
                    EfiPciIoWidthUint32,\r
                    PciIoDevice->SrIovCapabilityOffset + EFI_PCIE_CAPABILITY_ID_SRIOV_SUPPORTED_PAGE_SIZE,\r
                    1,\r
-                   &PciIoDevice->SystemPageSize\r
+                   &SupportedPageSize\r
                    );\r
                    );\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - SupportedPageSize - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        PciIoDevice->SystemPageSize\r
-        ));\r
-\r
-      PciIoDevice->SystemPageSize = (PcdGet32 (PcdSrIovSystemPageSize) & PciIoDevice->SystemPageSize);\r
+      PciIoDevice->SystemPageSize = (PcdGet32 (PcdSrIovSystemPageSize) & SupportedPageSize);\r
       ASSERT (PciIoDevice->SystemPageSize != 0);\r
 \r
       PciIo->Pci.Write (\r
       ASSERT (PciIoDevice->SystemPageSize != 0);\r
 \r
       PciIo->Pci.Write (\r
@@ -2123,14 +2165,6 @@ CreatePciIoDevice (
                    1,\r
                    &PciIoDevice->SystemPageSize\r
                    );\r
                    1,\r
                    &PciIoDevice->SystemPageSize\r
                    );\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - SystemPageSize - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        PciIoDevice->SystemPageSize\r
-        ));\r
       //\r
       // Adjust SystemPageSize for Alignment usage later\r
       //\r
       //\r
       // Adjust SystemPageSize for Alignment usage later\r
       //\r
@@ -2150,15 +2184,6 @@ CreatePciIoDevice (
                    1,\r
                    &FirstVFOffset\r
                    );\r
                    1,\r
                    &FirstVFOffset\r
                    );\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - FirstVFOffset - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)FirstVFOffset\r
-        ));\r
-\r
       PciIo->Pci.Read (\r
                    PciIo,\r
                    EfiPciIoWidthUint16,\r
       PciIo->Pci.Read (\r
                    PciIo,\r
                    EfiPciIoWidthUint16,\r
@@ -2166,15 +2191,6 @@ CreatePciIoDevice (
                    1,\r
                    &PciIoDevice->InitialVFs\r
                    );\r
                    1,\r
                    &PciIoDevice->InitialVFs\r
                    );\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - InitialVFs - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)PciIoDevice->InitialVFs\r
-        ));\r
-\r
       PciIo->Pci.Read (\r
                    PciIo,\r
                    EfiPciIoWidthUint16,\r
       PciIo->Pci.Read (\r
                    PciIo,\r
                    EfiPciIoWidthUint16,\r
@@ -2182,15 +2198,6 @@ CreatePciIoDevice (
                    1,\r
                    &VFStride\r
                    );\r
                    1,\r
                    &VFStride\r
                    );\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - VFStride - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)VFStride\r
-        ));\r
-\r
       //\r
       // Calculate LastVF\r
       //\r
       //\r
       // Calculate LastVF\r
       //\r
@@ -2201,22 +2208,16 @@ CreatePciIoDevice (
       // Calculate ReservedBusNum for this PF\r
       //\r
       PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);\r
       // Calculate ReservedBusNum for this PF\r
       //\r
       PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);\r
+\r
       DEBUG ((\r
         EFI_D_INFO,\r
       DEBUG ((\r
         EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - reserved bus number - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)PciIoDevice->ReservedBusNum\r
+        " SR-IOV: SupportedPageSize = 0x%x; SystemPageSize = 0x%x; FirstVFOffset = 0x%x;\n",\r
+        SupportedPageSize, PciIoDevice->SystemPageSize >> 12, FirstVFOffset\r
         ));\r
         ));\r
-\r
       DEBUG ((\r
         EFI_D_INFO,\r
       DEBUG ((\r
         EFI_D_INFO,\r
-        "PCI SR-IOV B%x.D%x.F%x - SRIOV Cap offset - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)PciIoDevice->SrIovCapabilityOffset\r
+        "         InitialVFs = 0x%x; ReservedBusNum = 0x%x; CapOffset = 0x%x\n",\r
+        PciIoDevice->InitialVFs, PciIoDevice->ReservedBusNum, PciIoDevice->SrIovCapabilityOffset\r
         ));\r
     }\r
   }\r
         ));\r
     }\r
   }\r
@@ -2229,14 +2230,7 @@ CreatePciIoDevice (
                NULL\r
                );\r
     if (!EFI_ERROR (Status)) {\r
                NULL\r
                );\r
     if (!EFI_ERROR (Status)) {\r
-      DEBUG ((\r
-        EFI_D_INFO,\r
-        "PCI MR-IOV B%x.D%x.F%x - MRIOV Cap offset - 0x%x\n",\r
-        (UINTN)Bus,\r
-        (UINTN)Device,\r
-        (UINTN)Func,\r
-        (UINTN)PciIoDevice->MrIovCapabilityOffset\r
-        ));\r
+      DEBUG ((EFI_D_INFO, " MR-IOV: CapOffset = 0x%x\n", PciIoDevice->MrIovCapabilityOffset));\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
index e7219f1f0137e99efe53d2d3f9f310552af157ae..810229ff61b42ac193dadea2c20db7ddae695238 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal library implementation for PCI Bus module.\r
 \r
 /** @file\r
   Internal library implementation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -14,6 +14,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "PciBus.h"\r
 \r
 \r
 #include "PciBus.h"\r
 \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
+CHAR16 *mBarTypeStr[] = {\r
+  L"Unknow",\r
+  L"  Io16",\r
+  L"  Io32",\r
+  L" Mem32",\r
+  L"PMem32",\r
+  L" Mem64",\r
+  L"PMem64",\r
+  L"    Io",\r
+  L"   Mem",\r
+  L"Unknow"\r
+  };\r
 \r
 /**\r
   Retrieve the PCI Card device BAR information via PciIo interface.\r
 \r
 /**\r
   Retrieve the PCI Card device BAR information via PciIo interface.\r
@@ -153,6 +166,200 @@ RemoveRejectedPciDevices (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
+/**\r
+  Dump the resourc map of the bridge device.\r
+\r
+  @param[in] BridgeResource   Resource descriptor of the bridge device.\r
+**/\r
+VOID\r
+DumpBridgeResource (\r
+  IN PCI_RESOURCE_NODE     *BridgeResource\r
+  )\r
+{\r
+  LIST_ENTRY               *Link;\r
+  PCI_RESOURCE_NODE        *Resource;\r
+  PCI_BAR                  *Bar;\r
+\r
+  if ((BridgeResource != NULL) && (BridgeResource->Length != 0)) {\r
+    DEBUG ((\r
+      EFI_D_INFO, "Type = %s; Base = 0x%x;\tLength = 0x%x;\tAlignment = 0x%x\n",\r
+      mBarTypeStr[MIN (BridgeResource->ResType, PciBarTypeMaxType)],\r
+      BridgeResource->PciDev->PciBar[BridgeResource->Bar].BaseAddress,\r
+      BridgeResource->Length, BridgeResource->Alignment\r
+      ));\r
+    for ( Link = BridgeResource->ChildList.ForwardLink\r
+        ; Link != &BridgeResource->ChildList\r
+        ; Link = Link->ForwardLink\r
+        ) {\r
+      Resource = RESOURCE_NODE_FROM_LINK (Link);\r
+      if (Resource->ResourceUsage == PciResUsageTypical) {\r
+        Bar = Resource->Virtual ? Resource->PciDev->VfPciBar : Resource->PciDev->PciBar;\r
+        DEBUG ((\r
+          EFI_D_INFO, " Base = 0x%x;\tLength = 0x%x;\tAlignment = 0x%x;\tOwner = %s ",\r
+          Bar[Resource->Bar].BaseAddress, Resource->Length, Resource->Alignment,\r
+          IS_PCI_BRIDGE (&Resource->PciDev->Pci)     ? L"PPB" :\r
+          IS_CARDBUS_BRIDGE (&Resource->PciDev->Pci) ? L"P2C" :\r
+                                                       L"PCI"\r
+          ));\r
+\r
+        if ((!IS_PCI_BRIDGE (&Resource->PciDev->Pci) && !IS_CARDBUS_BRIDGE (&Resource->PciDev->Pci)) ||\r
+            (IS_PCI_BRIDGE (&Resource->PciDev->Pci) && (Resource->Bar < PPB_IO_RANGE)) ||\r
+            (IS_CARDBUS_BRIDGE (&Resource->PciDev->Pci) && (Resource->Bar < P2C_MEM_1))\r
+            ) {\r
+          //\r
+          // The resource requirement comes from the device itself.\r
+          //\r
+          DEBUG ((\r
+            EFI_D_INFO, " [%02x|%02x|%02x:%02x]\n",\r
+            Resource->PciDev->BusNumber, Resource->PciDev->DeviceNumber,\r
+            Resource->PciDev->FunctionNumber, Bar[Resource->Bar].Offset\r
+            ));\r
+        } else {\r
+          //\r
+          // The resource requirement comes from the subordinate devices.\r
+          //\r
+          DEBUG ((\r
+            EFI_D_INFO, " [%02x|%02x|%02x:**]\n",\r
+            Resource->PciDev->BusNumber, Resource->PciDev->DeviceNumber,\r
+            Resource->PciDev->FunctionNumber\r
+            ));\r
+        }\r
+      } else {\r
+        DEBUG ((EFI_D_INFO, " Padding:Length = 0x%x;\tAlignment = 0x%x\n", Resource->Length, Resource->Alignment));\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+/**\r
+  Find the corresponding resource node for the Device in child list of BridgeResource.\r
+  \r
+  @param[in] Device         Pointer to PCI_IO_DEVICE.\r
+  @param[in] BridgeResource Pointer to PCI_RESOURCE_NODE.\r
+  \r
+  @return !NULL  The corresponding resource node for the Device.\r
+  @return NULL   No corresponding resource node for the Device.\r
+**/\r
+PCI_RESOURCE_NODE *\r
+FindResourceNode (\r
+  IN PCI_IO_DEVICE     *Device,\r
+  IN PCI_RESOURCE_NODE *BridgeResource\r
+  )\r
+{\r
+  LIST_ENTRY               *Link;\r
+  PCI_RESOURCE_NODE        *Resource;\r
+\r
+  for ( Link = BridgeResource->ChildList.ForwardLink\r
+      ; Link != &BridgeResource->ChildList\r
+      ; Link = Link->ForwardLink\r
+      ) {\r
+    Resource = RESOURCE_NODE_FROM_LINK (Link);\r
+    if (Resource->PciDev == Device) {\r
+      return Resource;\r
+    }\r
+  }\r
+\r
+  return NULL;\r
+}\r
+\r
+/**\r
+  Dump the resource map of all the devices under Bridge.\r
+  \r
+  @param[in] Bridge     Bridge device instance.\r
+  @param[in] IoNode     IO resource descriptor for the bridge device.\r
+  @param[in] Mem32Node  Mem32 resource descriptor for the bridge device.\r
+  @param[in] PMem32Node PMem32 resource descriptor for the bridge device.\r
+  @param[in] Mem64Node  Mem64 resource descriptor for the bridge device.\r
+  @param[in] PMem64Node PMem64 resource descriptor for the bridge device.\r
+**/\r
+VOID\r
+DumpResourceMap (\r
+  IN PCI_IO_DEVICE     *Bridge,\r
+  IN PCI_RESOURCE_NODE *IoNode,\r
+  IN PCI_RESOURCE_NODE *Mem32Node,\r
+  IN PCI_RESOURCE_NODE *PMem32Node,\r
+  IN PCI_RESOURCE_NODE *Mem64Node,\r
+  IN PCI_RESOURCE_NODE *PMem64Node\r
+  )\r
+{\r
+  EFI_STATUS                       Status;\r
+  LIST_ENTRY                       *Link;\r
+  PCI_IO_DEVICE                    *Device;\r
+  PCI_RESOURCE_NODE                *ChildIoNode;\r
+  PCI_RESOURCE_NODE                *ChildMem32Node;\r
+  PCI_RESOURCE_NODE                *ChildPMem32Node;\r
+  PCI_RESOURCE_NODE                *ChildMem64Node;\r
+  PCI_RESOURCE_NODE                *ChildPMem64Node;\r
+  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *ToText;\r
+  CHAR16                           *Str;\r
+\r
+  DEBUG ((EFI_D_INFO, "PciBus: Resource Map for "));\r
+\r
+  Status = gBS->OpenProtocol (\r
+                  Bridge->Handle,\r
+                  &gEfiPciRootBridgeIoProtocolGuid,\r
+                  NULL,\r
+                  NULL,\r
+                  NULL,\r
+                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((\r
+      EFI_D_INFO, "Bridge [%02x|%02x|%02x]\n",\r
+      Bridge->BusNumber, Bridge->DeviceNumber, Bridge->FunctionNumber\r
+      ));\r
+  } else {\r
+    Status = gBS->LocateProtocol (\r
+                    &gEfiDevicePathToTextProtocolGuid,\r
+                    NULL,\r
+                    (VOID **) &ToText\r
+                    );\r
+    Str = NULL;\r
+    if (!EFI_ERROR (Status)) {\r
+      Str = ToText->ConvertDevicePathToText (\r
+                      DevicePathFromHandle (Bridge->Handle),\r
+                      FALSE,\r
+                      FALSE\r
+                      );\r
+    }\r
+    DEBUG ((EFI_D_INFO, "Root Bridge %s\n", Str != NULL ? Str : L""));\r
+    if (Str != NULL) {\r
+      FreePool (Str);\r
+    }\r
+  }\r
+\r
+  DumpBridgeResource (IoNode);\r
+  DumpBridgeResource (Mem32Node);\r
+  DumpBridgeResource (PMem32Node);\r
+  DumpBridgeResource (Mem64Node);\r
+  DumpBridgeResource (PMem64Node);\r
+  DEBUG ((EFI_D_INFO, "\n"));\r
+\r
+  for ( Link = Bridge->ChildList.ForwardLink\r
+      ; Link != &Bridge->ChildList\r
+      ; Link = Link->ForwardLink\r
+      ) {\r
+    Device = PCI_IO_DEVICE_FROM_LINK (Link);\r
+    if (IS_PCI_BRIDGE (&Device->Pci)) {\r
+\r
+      ChildIoNode     = (IoNode     == NULL ? NULL : FindResourceNode (Device, IoNode));\r
+      ChildMem32Node  = (Mem32Node  == NULL ? NULL : FindResourceNode (Device, Mem32Node));\r
+      ChildPMem32Node = (PMem32Node == NULL ? NULL : FindResourceNode (Device, PMem32Node));\r
+      ChildMem64Node  = (Mem64Node  == NULL ? NULL : FindResourceNode (Device, Mem64Node));\r
+      ChildPMem64Node = (PMem64Node == NULL ? NULL : FindResourceNode (Device, PMem64Node));\r
+\r
+      DumpResourceMap (\r
+        Device,\r
+        ChildIoNode,\r
+        ChildMem32Node,\r
+        ChildPMem32Node,\r
+        ChildMem64Node,\r
+        ChildPMem64Node\r
+        );\r
+    }\r
+  }\r
+}\r
+\r
 /**\r
   Submits the I/O and memory resource requirements for the specified PCI Host Bridge.\r
 \r
 /**\r
   Submits the I/O and memory resource requirements for the specified PCI Host Bridge.\r
 \r
@@ -244,7 +451,7 @@ PciHostBridgeResourceAllocator (
                    RootBridgeDev,\r
                    0,\r
                    FeaturePcdGet (PcdPciBridgeIoAlignmentProbe) ? 0x1FF: 0xFFF,\r
                    RootBridgeDev,\r
                    0,\r
                    FeaturePcdGet (PcdPciBridgeIoAlignmentProbe) ? 0x1FF: 0xFFF,\r
-                   0,\r
+                   RB_IO_RANGE,\r
                    PciBarTypeIo16,\r
                    PciResUsageTypical\r
                    );\r
                    PciBarTypeIo16,\r
                    PciResUsageTypical\r
                    );\r
@@ -253,7 +460,7 @@ PciHostBridgeResourceAllocator (
                       RootBridgeDev,\r
                       0,\r
                       0xFFFFF,\r
                       RootBridgeDev,\r
                       0,\r
                       0xFFFFF,\r
-                      0,\r
+                      RB_MEM32_RANGE,\r
                       PciBarTypeMem32,\r
                       PciResUsageTypical\r
                       );\r
                       PciBarTypeMem32,\r
                       PciResUsageTypical\r
                       );\r
@@ -262,7 +469,7 @@ PciHostBridgeResourceAllocator (
                        RootBridgeDev,\r
                        0,\r
                        0xFFFFF,\r
                        RootBridgeDev,\r
                        0,\r
                        0xFFFFF,\r
-                       0,\r
+                       RB_PMEM32_RANGE,\r
                        PciBarTypePMem32,\r
                        PciResUsageTypical\r
                        );\r
                        PciBarTypePMem32,\r
                        PciResUsageTypical\r
                        );\r
@@ -271,7 +478,7 @@ PciHostBridgeResourceAllocator (
                       RootBridgeDev,\r
                       0,\r
                       0xFFFFF,\r
                       RootBridgeDev,\r
                       0,\r
                       0xFFFFF,\r
-                      0,\r
+                      RB_MEM64_RANGE,\r
                       PciBarTypeMem64,\r
                       PciResUsageTypical\r
                       );\r
                       PciBarTypeMem64,\r
                       PciResUsageTypical\r
                       );\r
@@ -280,7 +487,7 @@ PciHostBridgeResourceAllocator (
                        RootBridgeDev,\r
                        0,\r
                        0xFFFFF,\r
                        RootBridgeDev,\r
                        0,\r
                        0xFFFFF,\r
-                       0,\r
+                       RB_PMEM64_RANGE,\r
                        PciBarTypePMem64,\r
                        PciResUsageTypical\r
                        );\r
                        PciBarTypePMem64,\r
                        PciResUsageTypical\r
                        );\r
@@ -597,19 +804,11 @@ PciHostBridgeResourceAllocator (
     // Create the entire system resource map from the information collected by\r
     // enumerator. Several resource tree was created\r
     //\r
     // Create the entire system resource map from the information collected by\r
     // enumerator. Several resource tree was created\r
     //\r
-    GetResourceMap (\r
-      RootBridgeDev,\r
-      &IoBridge,\r
-      &Mem32Bridge,\r
-      &PMem32Bridge,\r
-      &Mem64Bridge,\r
-      &PMem64Bridge,\r
-      &IoPool,\r
-      &Mem32Pool,\r
-      &PMem32Pool,\r
-      &Mem64Pool,\r
-      &PMem64Pool\r
-      );\r
+    IoBridge     = FindResourceNode (RootBridgeDev, &IoPool);\r
+    Mem32Bridge  = FindResourceNode (RootBridgeDev, &Mem32Pool);\r
+    PMem32Bridge = FindResourceNode (RootBridgeDev, &PMem32Pool);\r
+    Mem64Bridge  = FindResourceNode (RootBridgeDev, &Mem64Pool);\r
+    PMem64Bridge = FindResourceNode (RootBridgeDev, &PMem64Pool);\r
 \r
     //\r
     // Program IO resources\r
 \r
     //\r
     // Program IO resources\r
@@ -651,6 +850,26 @@ PciHostBridgeResourceAllocator (
       PMem64Bridge\r
       );\r
 \r
       PMem64Bridge\r
       );\r
 \r
+    IoBridge    ->PciDev->PciBar[IoBridge    ->Bar].BaseAddress = IoBase;\r
+    Mem32Bridge ->PciDev->PciBar[Mem32Bridge ->Bar].BaseAddress = Mem32Base;\r
+    PMem32Bridge->PciDev->PciBar[PMem32Bridge->Bar].BaseAddress = PMem32Base;\r
+    Mem64Bridge ->PciDev->PciBar[Mem64Bridge ->Bar].BaseAddress = Mem64Base;\r
+    PMem64Bridge->PciDev->PciBar[PMem64Bridge->Bar].BaseAddress = PMem64Base;\r
+\r
+    //\r
+    // Dump the resource map for current root bridge\r
+    //\r
+    DEBUG_CODE (\r
+      DumpResourceMap (\r
+        RootBridgeDev,\r
+        IoBridge,\r
+        Mem32Bridge,\r
+        PMem32Bridge,\r
+        Mem64Bridge,\r
+        PMem64Bridge\r
+        );\r
+    );\r
+\r
     FreePool (AcpiConfig);\r
   }\r
 \r
     FreePool (AcpiConfig);\r
   }\r
 \r
@@ -741,8 +960,6 @@ PciScanBus (
         continue;\r
       }\r
 \r
         continue;\r
       }\r
 \r
-      DEBUG((EFI_D_INFO, "Found DEV(%02d,%02d,%02d)\n", StartBusNumber, Device, Func ));\r
-\r
       //\r
       // Get the PCI device information\r
       //\r
       //\r
       // Get the PCI device information\r
       //\r
@@ -930,7 +1147,6 @@ PciScanBus (
             EfiPciBeforeChildBusEnumeration\r
             );\r
 \r
             EfiPciBeforeChildBusEnumeration\r
             );\r
 \r
-          DEBUG((EFI_D_INFO, "Scan  PPB(%02d,%02d,%02d)\n", PciDevice->BusNumber, PciDevice->DeviceNumber,PciDevice->FunctionNumber));\r
           Status = PciScanBus (\r
                     PciDevice,\r
                     (UINT8) (SecondBus),\r
           Status = PciScanBus (\r
                     PciDevice,\r
                     (UINT8) (SecondBus),\r
index 6fa4001a6265d936fb59135e47d9f2a162d7f1a8..e17f4bae4466b3af40f391630d8c40bc12a14e8b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI resouces support functions implemntation for PCI Bus module.\r
 \r
 /** @file\r
   PCI resouces support functions implemntation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -724,17 +724,6 @@ CreateVfResourceNode (
 {\r
   PCI_RESOURCE_NODE *Node;\r
 \r
 {\r
   PCI_RESOURCE_NODE *Node;\r
 \r
-  DEBUG ((\r
-    EFI_D_INFO,\r
-    "PCI-IOV B%x.D%x.F%x - VfResource (Bar - 0x%x) (Type - 0x%x) (Length - 0x%x)\n",\r
-    (UINTN)PciDev->BusNumber,\r
-    (UINTN)PciDev->DeviceNumber,\r
-    (UINTN)PciDev->FunctionNumber,\r
-    (UINTN)Bar,\r
-    (UINTN)ResType,\r
-    (UINTN)Length\r
-    ));\r
-\r
   Node = CreateResourceNode (PciDev, Length, Alignment, Bar, ResType, ResUsage);\r
   if (Node == NULL) {\r
     return Node;\r
   Node = CreateResourceNode (PciDev, Length, Alignment, Bar, ResType, ResUsage);\r
   if (Node == NULL) {\r
     return Node;\r
@@ -1403,17 +1392,6 @@ ProgramVfBar (
                 );\r
 \r
     Node->PciDev->VfPciBar[Node->Bar].BaseAddress = Address;\r
                 );\r
 \r
     Node->PciDev->VfPciBar[Node->Bar].BaseAddress = Address;\r
-\r
-    DEBUG ((\r
-      EFI_D_INFO,\r
-      "PCI-IOV B%x.D%x.F%x - VF Bar (Offset - 0x%x) 32Mem (Address - 0x%x)\n",\r
-      (UINTN)Node->PciDev->BusNumber,\r
-      (UINTN)Node->PciDev->DeviceNumber,\r
-      (UINTN)Node->PciDev->FunctionNumber,\r
-      (UINTN)(Node->PciDev->VfPciBar[Node->Bar]).Offset,\r
-      (UINTN)Address\r
-      ));\r
-\r
     break;\r
 \r
   case PciBarTypeMem64:\r
     break;\r
 \r
   case PciBarTypeMem64:\r
@@ -1440,17 +1418,6 @@ ProgramVfBar (
                 );\r
 \r
     Node->PciDev->VfPciBar[Node->Bar].BaseAddress = Address;\r
                 );\r
 \r
     Node->PciDev->VfPciBar[Node->Bar].BaseAddress = Address;\r
-\r
-    DEBUG ((\r
-      EFI_D_INFO,\r
-      "PCI-IOV B%x.D%x.F%x - VF Bar (Offset - 0x%x) 64Mem (Address - 0x%lx)\n",\r
-      (UINTN)Node->PciDev->BusNumber,\r
-      (UINTN)Node->PciDev->DeviceNumber,\r
-      (UINTN)Node->PciDev->FunctionNumber,\r
-      (UINTN)(Node->PciDev->VfPciBar[Node->Bar]).Offset,\r
-      (UINT64)Address\r
-      ));\r
-\r
     break;\r
 \r
   case PciBarTypeIo16:\r
     break;\r
 \r
   case PciBarTypeIo16:\r
@@ -1727,123 +1694,6 @@ InitializeResourcePool (
   InitializeListHead (&ResourcePool->ChildList);\r
 }\r
 \r
   InitializeListHead (&ResourcePool->ChildList);\r
 }\r
 \r
-\r
-/**\r
-  Get all resource information for given Pci device.\r
-\r
-  @param PciDev         Pci device instance.\r
-  @param IoBridge       Io resource node.\r
-  @param Mem32Bridge    32-bit memory node.\r
-  @param PMem32Bridge   32-bit Pmemory node.\r
-  @param Mem64Bridge    64-bit memory node.\r
-  @param PMem64Bridge   64-bit PMemory node.\r
-  @param IoPool         Link list header for Io resource.\r
-  @param Mem32Pool      Link list header for 32-bit memory.\r
-  @param PMem32Pool     Link list header for 32-bit Prefetchable memory.\r
-  @param Mem64Pool      Link list header for 64-bit memory.\r
-  @param PMem64Pool     Link list header for 64-bit Prefetchable memory.\r
-\r
-**/\r
-VOID\r
-GetResourceMap (\r
-  IN PCI_IO_DEVICE      *PciDev,\r
-  IN PCI_RESOURCE_NODE  **IoBridge,\r
-  IN PCI_RESOURCE_NODE  **Mem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **Mem64Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem64Bridge,\r
-  IN PCI_RESOURCE_NODE  *IoPool,\r
-  IN PCI_RESOURCE_NODE  *Mem32Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem32Pool,\r
-  IN PCI_RESOURCE_NODE  *Mem64Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem64Pool\r
-  )\r
-{\r
-\r
-  PCI_RESOURCE_NODE *Temp;\r
-  LIST_ENTRY        *CurrentLink;\r
-\r
-  CurrentLink = IoPool->ChildList.ForwardLink;\r
-\r
-  //\r
-  // Get Io resource map\r
-  //\r
-  while (CurrentLink != &IoPool->ChildList) {\r
-\r
-    Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
-\r
-    if (Temp->PciDev == PciDev) {\r
-      *IoBridge = Temp;\r
-    }\r
-\r
-    CurrentLink = CurrentLink->ForwardLink;\r
-  }\r
-\r
-  //\r
-  // Get Mem32 resource map\r
-  //\r
-  CurrentLink = Mem32Pool->ChildList.ForwardLink;\r
-\r
-  while (CurrentLink != &Mem32Pool->ChildList) {\r
-\r
-    Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
-\r
-    if (Temp->PciDev == PciDev) {\r
-      *Mem32Bridge = Temp;\r
-    }\r
-\r
-    CurrentLink = CurrentLink->ForwardLink;\r
-  }\r
-\r
-  //\r
-  // Get Pmem32 resource map\r
-  //\r
-  CurrentLink = PMem32Pool->ChildList.ForwardLink;\r
-\r
-  while (CurrentLink != &PMem32Pool->ChildList) {\r
-\r
-    Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
-\r
-    if (Temp->PciDev == PciDev) {\r
-      *PMem32Bridge = Temp;\r
-    }\r
-\r
-    CurrentLink = CurrentLink->ForwardLink;\r
-  }\r
-\r
-  //\r
-  // Get Mem64 resource map\r
-  //\r
-  CurrentLink = Mem64Pool->ChildList.ForwardLink;\r
-\r
-  while (CurrentLink != &Mem64Pool->ChildList) {\r
-\r
-    Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
-\r
-    if (Temp->PciDev == PciDev) {\r
-      *Mem64Bridge = Temp;\r
-    }\r
-\r
-    CurrentLink = CurrentLink->ForwardLink;\r
-  }\r
-\r
-  //\r
-  // Get Pmem64 resource map\r
-  //\r
-  CurrentLink = PMem64Pool->ChildList.ForwardLink;\r
-\r
-  while (CurrentLink != &PMem64Pool->ChildList) {\r
-\r
-    Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
-\r
-    if (Temp->PciDev == PciDev) {\r
-      *PMem64Bridge = Temp;\r
-    }\r
-\r
-    CurrentLink = CurrentLink->ForwardLink;\r
-  }\r
-}\r
-\r
 /**\r
   Destory given resource tree.\r
 \r
 /**\r
   Destory given resource tree.\r
 \r
index cd0f417e081b6143e0af9713e3abfdbad3e025fc..763ddbc4ed8ecc0fc54da5fe15afa889f1a78b86 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI resouces support functions declaration for PCI Bus module.\r
 \r
 /** @file\r
   PCI resouces support functions declaration for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -16,9 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _EFI_PCI_RESOURCE_SUPPORT_H_\r
 \r
 typedef enum {\r
 #define _EFI_PCI_RESOURCE_SUPPORT_H_\r
 \r
 typedef enum {\r
-  PciResUsageTypical            = 0,\r
-  PciResUsagePadding,\r
-  PciResUsageOptionRomProcessing\r
+  PciResUsageTypical,\r
+  PciResUsagePadding\r
 } PCI_RESOURCE_USAGE;\r
 \r
 #define PCI_RESOURCE_SIGNATURE  SIGNATURE_32 ('p', 'c', 'r', 'c')\r
 } PCI_RESOURCE_USAGE;\r
 \r
 #define PCI_RESOURCE_SIGNATURE  SIGNATURE_32 ('p', 'c', 'r', 'c')\r
@@ -382,37 +381,6 @@ InitializeResourcePool (
   IN     PCI_BAR_TYPE        ResourceType\r
   );\r
 \r
   IN     PCI_BAR_TYPE        ResourceType\r
   );\r
 \r
-/**\r
-  Get all resource information for given Pci device.\r
-\r
-  @param PciDev         Pci device instance.\r
-  @param IoBridge       Io resource node.\r
-  @param Mem32Bridge    32-bit memory node.\r
-  @param PMem32Bridge   32-bit Pmemory node.\r
-  @param Mem64Bridge    64-bit memory node.\r
-  @param PMem64Bridge   64-bit PMemory node.\r
-  @param IoPool         Link list header for Io resource.\r
-  @param Mem32Pool      Link list header for 32-bit memory.\r
-  @param PMem32Pool     Link list header for 32-bit Prefetchable memory.\r
-  @param Mem64Pool      Link list header for 64-bit memory.\r
-  @param PMem64Pool     Link list header for 64-bit Prefetchable memory.\r
-\r
-**/\r
-VOID\r
-GetResourceMap (\r
-  IN PCI_IO_DEVICE      *PciDev,\r
-  IN PCI_RESOURCE_NODE  **IoBridge,\r
-  IN PCI_RESOURCE_NODE  **Mem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem32Bridge,\r
-  IN PCI_RESOURCE_NODE  **Mem64Bridge,\r
-  IN PCI_RESOURCE_NODE  **PMem64Bridge,\r
-  IN PCI_RESOURCE_NODE  *IoPool,\r
-  IN PCI_RESOURCE_NODE  *Mem32Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem32Pool,\r
-  IN PCI_RESOURCE_NODE  *Mem64Pool,\r
-  IN PCI_RESOURCE_NODE  *PMem64Pool\r
-  );\r
-\r
 /**\r
   Destory given resource tree.\r
 \r
 /**\r
   Destory given resource tree.\r
 \r