]> git.proxmox.com Git - mirror_edk2.git/commitdiff
The PCI HotPlug Init Protocol returns a list of Root HPC, but it is possible that...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 Nov 2010 07:16:02 +0000 (07:16 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 Nov 2010 07:16:02 +0000 (07:16 +0000)
This check-in fix the issue by adding a flag to indicate if a HPC is found during PCI enumeration or not. This check-in also adds a debug message if any found HPC failed with initialization.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11081 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c

index 61172be78e67dee991666e01a2bd40671ec7ac00..257874b8b03ed43b7dfada351dac65263d53ceaa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI Hot Plug support functions implementation for PCI Bus module..\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -254,7 +254,7 @@ AllRootHPCInitialized (
   do {\r
     for (Index = 0; Index < gPciRootHpcCount; Index++) {\r
 \r
-      if (!gPciRootHpcData[Index].Initialized) {\r
+      if (gPciRootHpcData[Index].Found && !gPciRootHpcData[Index].Initialized) {\r
         break;\r
       }\r
     }\r
index ae4a8d9eab68d393c13e7459135f15d86fa7f8a3..1fb9ba972091502b98160f4f3ace81fb253b3742 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI Hot Plug support functions declaration for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, 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
@@ -25,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 typedef struct {\r
   EFI_EVENT Event;\r
+  BOOLEAN   Found;\r
   BOOLEAN   Initialized;\r
   VOID      *Padding;\r
 } ROOT_HPC_DATA;\r
index 4717140255c1bce3970c4e71a9ca160d601d2b88..eee251ac71a2677857209718d82ab35c98c26d54 100644 (file)
@@ -783,6 +783,7 @@ PciScanBus (
           // Check if it is a Hotplug PCI controller\r
           //\r
           if (IsRootPciHotPlugController (PciDevice->DevicePath, &HpIndex)) {\r
+            gPciRootHpcData[HpIndex].Found = TRUE;\r
 \r
             if (!gPciRootHpcData[HpIndex].Initialized) {\r
 \r
@@ -1235,6 +1236,7 @@ PciHostBridgeEnumerator (
     Status = AllRootHPCInitialized (STALL_1_SECOND * 15);\r
 \r
     if (EFI_ERROR (Status)) {\r
+      DEBUG ((EFI_D_ERROR, "Some root HPC failed to initialize\n"));\r
       return Status;\r
     }\r
 \r