]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug that the device claiming too much resource cannot be rejected by the...
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2013 08:02:29 +0000 (08:02 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2013 08:02:29 +0000 (08:02 +0000)
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Elvin Li<elvin.li@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14043 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c

index c6fe51bf5870eb261c69738466797c5c56d4612d..76e35ff038cfd547d94627c0cba211b2bdcef3ae 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI eunmeration implementation on entire PCI bus system for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -1035,6 +1035,11 @@ PciHostBridgeAdjustAllocation (
     //\r
     Status = RejectPciDevice (PciResNode->PciDev);\r
     if (Status == EFI_SUCCESS) {\r
+      DEBUG ((\r
+        EFI_D_ERROR,\r
+        "PciBus: [%02x|%02x|%02x] was rejected due to resource confliction.\n",\r
+        PciResNode->PciDev->BusNumber, PciResNode->PciDev->DeviceNumber, PciResNode->PciDev->FunctionNumber\r
+        ));\r
 \r
       //\r
       // Raise the EFI_IOB_EC_RESOURCE_CONFLICT status code\r
@@ -1867,7 +1872,7 @@ NotifyPhase (
                             );\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
 }\r
 \r
 /**\r
index 4e73b8f569423a7707a468f405fe1430945d80f9..9e1184e00a28a2133f9e929d9203466c12abfc74 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal library implementation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -568,6 +568,12 @@ PciHostBridgeResourceAllocator (
                                 RootBridgeDev->Handle,\r
                                 AcpiConfig\r
                                 );\r
+        //\r
+        // If SubmitResources returns error, PciBus isn't able to start.\r
+        // It's a fatal error so assertion is added.\r
+        //\r
+        DEBUG ((EFI_D_INFO, "PciBus: HostBridge->SubmitResources() - %r\n", Status));\r
+        ASSERT_EFI_ERROR (Status);\r
       }\r
 \r
       //\r
@@ -598,6 +604,7 @@ PciHostBridgeResourceAllocator (
     // Notify platform to start to program the resource\r
     //\r
     Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeAllocateResources);\r
+    DEBUG ((EFI_D_INFO, "PciBus: HostBridge->NotifyPhase(AllocateResources) - %r\n", Status));\r
     if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {\r
       //\r
       // If Hot Plug is not supported\r