Revision: 14043
          http://edk2.svn.sourceforge.net/edk2/?rev=14043&view=rev
Author:   niruiyu
Date:     2013-01-09 08:02:29 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
Fix the bug that the device claiming too much resource cannot be rejected by 
the PciBus driver.

Signed-off-by: Ruiyu Ni<[email protected]>
Reviewed-by: Elvin Li<[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
    trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c   2013-01-09 
05:19:43 UTC (rev 14042)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c   2013-01-09 
08:02:29 UTC (rev 14043)
@@ -1,7 +1,7 @@
 /** @file
   PCI eunmeration implementation on entire PCI bus system for PCI Bus module.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -1035,6 +1035,11 @@
     //
     Status = RejectPciDevice (PciResNode->PciDev);
     if (Status == EFI_SUCCESS) {
+      DEBUG ((
+        EFI_D_ERROR,
+        "PciBus: [%02x|%02x|%02x] was rejected due to resource confliction.\n",
+        PciResNode->PciDev->BusNumber, PciResNode->PciDev->DeviceNumber, 
PciResNode->PciDev->FunctionNumber
+        ));
 
       //
       // Raise the EFI_IOB_EC_RESOURCE_CONFLICT status code
@@ -1867,7 +1872,7 @@
                             );
   }
 
-  return EFI_SUCCESS;
+  return Status;
 }
 
 /**

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c  2013-01-09 05:19:43 UTC 
(rev 14042)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c  2013-01-09 08:02:29 UTC 
(rev 14043)
@@ -1,7 +1,7 @@
 /** @file
   Internal library implementation for PCI Bus module.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -568,6 +568,12 @@
                                 RootBridgeDev->Handle,
                                 AcpiConfig
                                 );
+        //
+        // If SubmitResources returns error, PciBus isn't able to start.
+        // It's a fatal error so assertion is added.
+        //
+        DEBUG ((EFI_D_INFO, "PciBus: HostBridge->SubmitResources() - %r\n", 
Status));
+        ASSERT_EFI_ERROR (Status);
       }
 
       //
@@ -598,6 +604,7 @@
     // Notify platform to start to program the resource
     //
     Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeAllocateResources);
+    DEBUG ((EFI_D_INFO, "PciBus: HostBridge->NotifyPhase(AllocateResources) - 
%r\n", Status));
     if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
       //
       // If Hot Plug is not supported

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to