Revision: 14483
http://sourceforge.net/p/edk2/code/14483
Author: niruiyu
Date: 2013-07-18 07:21:35 +0000 (Thu, 18 Jul 2013)
Log Message:
-----------
The PCI host bridge can signal failures in its initialization to
the PCI Bus driver through the function call NotifyPhase().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <[email protected]>
Reviewed-by: Ruiyu Ni <[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-07-18
06:20:33 UTC (rev 14482)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c 2013-07-18
07:21:35 UTC (rev 14483)
@@ -82,8 +82,12 @@
//
// Notify the pci bus enumeration is about to begin
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginEnumeration);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginEnumeration);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Start the bus allocation phase
//
@@ -105,8 +109,12 @@
//
// Notify the pci bus enumeration is about to complete
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeEndEnumeration);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndEnumeration);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Process P2C
//
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c 2013-07-18 06:20:33 UTC
(rev 14482)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c 2013-07-18 07:21:35 UTC
(rev 14483)
@@ -759,8 +759,12 @@
//
// Notify pci bus driver starts to program the resource
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
RootBridgeDev = NULL;
RootBridgeHandle = 0;
@@ -898,9 +902,9 @@
//
// Notify the resource allocation phase is to end
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);
- return EFI_SUCCESS;
+ return Status;
}
/**
@@ -1443,8 +1447,12 @@
//
// Notify the bus allocation phase is about to start
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
DEBUG((EFI_D_INFO, "PCI Bus First Scanning\n"));
RootBridgeHandle = NULL;
while (PciResAlloc->GetNextRootBridge (PciResAlloc, &RootBridgeHandle) ==
EFI_SUCCESS) {
@@ -1531,8 +1539,12 @@
//
// Notify the bus allocation phase is about to start for the 2nd time
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
DEBUG((EFI_D_INFO, "PCI Bus Second Scanning\n"));
RootBridgeHandle = NULL;
while (PciResAlloc->GetNextRootBridge (PciResAlloc, &RootBridgeHandle) ==
EFI_SUCCESS) {
@@ -1569,8 +1581,12 @@
//
// Notify the resource allocation phase is to start
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
RootBridgeHandle = NULL;
while (PciResAlloc->GetNextRootBridge (PciResAlloc, &RootBridgeHandle) ==
EFI_SUCCESS) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits