diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-06-03 02:16:12 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-06-03 02:16:12 +0000 |
commit | 4ecdb8690f1acc2d38805d146f31e299e444ab4a (patch) | |
tree | d5bdd2f2a9f21aa7360cdbdfd6bffc0a0e41ae98 /IntelFrameworkModulePkg | |
parent | 86b2b825c48d9524db4870b87c185f707a3b1dfa (diff) | |
download | edk2-platforms-4ecdb8690f1acc2d38805d146f31e299e444ab4a.tar.xz |
Give the output information in right place.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5317 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 206 |
1 files changed, 103 insertions, 103 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c index 587f1767d7..0df4db658c 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1222,122 +1222,122 @@ PciScanBus_WithoutHotPlugDeviceSupport ( Func
);
- if (!EFI_ERROR (Status) &&
- (IS_PCI_BRIDGE (&Pci) ||
- IS_CARDBUS_BRIDGE (&Pci))) {
+ if (!EFI_ERROR (Status)) {
+ DEBUG((EFI_D_ERROR, "Found DEV(%02d,%02d,%02d)\n", StartBusNumber, Device, Func));
+
+ if (IS_PCI_BRIDGE (&Pci) ||
+ IS_CARDBUS_BRIDGE (&Pci)) {
- DEBUG((EFI_D_ERROR, "Found DEV(%02d,%02d,%02d)\n", StartBusNumber, Device, Func ));
-
- //
- // Get the bridge information
- //
- Status = PciSearchDevice (
- Bridge,
- &Pci,
- StartBusNumber,
- Device,
- Func,
- &PciDevice
- );
-
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Add feature to support customized secondary bus number
- //
- if (*SubBusNumber == 0) {
- *SubBusNumber = *PaddedBusRange;
- *PaddedBusRange = 0;
- }
-
- (*SubBusNumber)++;
-
- SecondBus = (*SubBusNumber);
-
- Register = (UINT16) ((SecondBus << 8) | (UINT16) StartBusNumber);
-
- Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x18);
-
- Status = PciRootBridgeIoWrite (
- PciRootBridgeIo,
- &Pci,
- EfiPciWidthUint16,
- Address,
- 1,
- &Register
- );
-
- //
- // Initialize SubBusNumber to SecondBus
- //
- Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
- Status = PciRootBridgeIoWrite (
- PciRootBridgeIo,
- &Pci,
- EfiPciWidthUint8,
- Address,
- 1,
- SubBusNumber
- );
- //
- // If it is PPB, resursively search down this bridge
- //
- if (IS_PCI_BRIDGE (&Pci)) {
//
- // Temporarily initialize SubBusNumber to maximum bus number to ensure the
- // PCI configuration transaction to go through any PPB
+ // Get the bridge information
//
- Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
- Register = 0xFF;
+ Status = PciSearchDevice (
+ Bridge,
+ &Pci,
+ StartBusNumber,
+ Device,
+ Func,
+ &PciDevice
+ );
+
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Add feature to support customized secondary bus number
+ //
+ if (*SubBusNumber == 0) {
+ *SubBusNumber = *PaddedBusRange;
+ *PaddedBusRange = 0;
+ }
+
+ (*SubBusNumber)++;
+
+ SecondBus = (*SubBusNumber);
+
+ Register = (UINT16) ((SecondBus << 8) | (UINT16) StartBusNumber);
+
+ Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x18);
+
Status = PciRootBridgeIoWrite (
PciRootBridgeIo,
&Pci,
- EfiPciWidthUint8,
+ EfiPciWidthUint16,
Address,
1,
&Register
);
-
- PreprocessController (
- PciDevice,
- PciDevice->BusNumber,
- PciDevice->DeviceNumber,
- PciDevice->FunctionNumber,
- EfiPciBeforeChildBusEnumeration
- );
-
- DEBUG((EFI_D_ERROR, "Scan PPB(%02d,%02d,%02d)\n", PciDevice->BusNumber, PciDevice->DeviceNumber,PciDevice->FunctionNumber ));
- Status = PciScanBus (
- PciDevice,
- (UINT8) (SecondBus),
- SubBusNumber,
- PaddedBusRange
- );
-
- if (EFI_ERROR (Status)) {
- return EFI_DEVICE_ERROR;
+
+ //
+ // Initialize SubBusNumber to SecondBus
+ //
+ Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
+ Status = PciRootBridgeIoWrite (
+ PciRootBridgeIo,
+ &Pci,
+ EfiPciWidthUint8,
+ Address,
+ 1,
+ SubBusNumber
+ );
+ //
+ // If it is PPB, resursively search down this bridge
+ //
+ if (IS_PCI_BRIDGE (&Pci)) {
+ //
+ // Temporarily initialize SubBusNumber to maximum bus number to ensure the
+ // PCI configuration transaction to go through any PPB
+ //
+ Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
+ Register = 0xFF;
+ Status = PciRootBridgeIoWrite (
+ PciRootBridgeIo,
+ &Pci,
+ EfiPciWidthUint8,
+ Address,
+ 1,
+ &Register
+ );
+
+ PreprocessController (
+ PciDevice,
+ PciDevice->BusNumber,
+ PciDevice->DeviceNumber,
+ PciDevice->FunctionNumber,
+ EfiPciBeforeChildBusEnumeration
+ );
+
+ DEBUG((EFI_D_ERROR, "Scan PPB(%02d,%02d,%02d)\n", PciDevice->BusNumber, PciDevice->DeviceNumber,PciDevice->FunctionNumber ));
+ Status = PciScanBus (
+ PciDevice,
+ (UINT8) (SecondBus),
+ SubBusNumber,
+ PaddedBusRange
+ );
+
+ if (EFI_ERROR (Status)) {
+ return EFI_DEVICE_ERROR;
+ }
}
+
+ //
+ // Set the current maximum bus number under the PPB
+ //
+
+ Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
+
+ Status = PciRootBridgeIoWrite (
+ PciRootBridgeIo,
+ &Pci,
+ EfiPciWidthUint8,
+ Address,
+ 1,
+ SubBusNumber
+ );
+
}
-
- //
- // Set the current maximum bus number under the PPB
- //
-
- Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);
-
- Status = PciRootBridgeIoWrite (
- PciRootBridgeIo,
- &Pci,
- EfiPciWidthUint8,
- Address,
- 1,
- SubBusNumber
- );
-
}
-
if (Func == 0 && !IS_PCI_MULTI_FUNC (&Pci)) {
//
|