Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
r48674 r58459 2 2 Internal library implementation for PCI Bus module. 3 3 4 Copyright (c) 2006 - 201 1, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 183 183 if ((BridgeResource != NULL) && (BridgeResource->Length != 0)) { 184 184 DEBUG (( 185 EFI_D_INFO, "Type = %s; Base = 0x% x;\tLength = 0x%x;\tAlignment = 0x%x\n",185 EFI_D_INFO, "Type = %s; Base = 0x%lx;\tLength = 0x%lx;\tAlignment = 0x%lx\n", 186 186 mBarTypeStr[MIN (BridgeResource->ResType, PciBarTypeMaxType)], 187 187 BridgeResource->PciDev->PciBar[BridgeResource->Bar].BaseAddress, … … 196 196 Bar = Resource->Virtual ? Resource->PciDev->VfPciBar : Resource->PciDev->PciBar; 197 197 DEBUG (( 198 EFI_D_INFO, " Base = 0x% x;\tLength = 0x%x;\tAlignment = 0x%x;\tOwner = %s ",198 EFI_D_INFO, " Base = 0x%lx;\tLength = 0x%lx;\tAlignment = 0x%lx;\tOwner = %s ", 199 199 Bar[Resource->Bar].BaseAddress, Resource->Length, Resource->Alignment, 200 200 IS_PCI_BRIDGE (&Resource->PciDev->Pci) ? L"PPB" : … … 226 226 } 227 227 } else { 228 DEBUG ((EFI_D_INFO, " Padding:Length = 0x% x;\tAlignment = 0x%x\n", Resource->Length, Resource->Alignment));228 DEBUG ((EFI_D_INFO, " Padding:Length = 0x%lx;\tAlignment = 0x%lx\n", Resource->Length, Resource->Alignment)); 229 229 } 230 230 } … … 291 291 PCI_RESOURCE_NODE *ChildMem64Node; 292 292 PCI_RESOURCE_NODE *ChildPMem64Node; 293 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *ToText;294 293 CHAR16 *Str; 295 294 … … 310 309 )); 311 310 } else { 312 Status = gBS->LocateProtocol ( 313 &gEfiDevicePathToTextProtocolGuid, 314 NULL, 315 (VOID **) &ToText 316 ); 317 Str = NULL; 318 if (!EFI_ERROR (Status)) { 319 Str = ToText->ConvertDevicePathToText ( 320 DevicePathFromHandle (Bridge->Handle), 321 FALSE, 322 FALSE 323 ); 324 } 311 Str = ConvertDevicePathToText ( 312 DevicePathFromHandle (Bridge->Handle), 313 FALSE, 314 FALSE 315 ); 325 316 DEBUG ((EFI_D_INFO, "Root Bridge %s\n", Str != NULL ? Str : L"")); 326 317 if (Str != NULL) { … … 569 560 AcpiConfig 570 561 ); 562 // 563 // If SubmitResources returns error, PciBus isn't able to start. 564 // It's a fatal error so assertion is added. 565 // 566 DEBUG ((EFI_D_INFO, "PciBus: HostBridge->SubmitResources() - %r\n", Status)); 567 ASSERT_EFI_ERROR (Status); 571 568 } 572 569 … … 599 596 // 600 597 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeAllocateResources); 598 DEBUG ((EFI_D_INFO, "PciBus: HostBridge->NotifyPhase(AllocateResources) - %r\n", Status)); 601 599 if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) { 602 600 // … … 753 751 // Notify pci bus driver starts to program the resource 754 752 // 755 NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources); 753 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources); 754 755 if (EFI_ERROR (Status)) { 756 return Status; 757 } 756 758 757 759 RootBridgeDev = NULL; … … 892 894 // Notify the resource allocation phase is to end 893 895 // 894 NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);895 896 return EFI_SUCCESS;896 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation); 897 898 return Status; 897 899 } 898 900 … … 1437 1439 // Notify the bus allocation phase is about to start 1438 1440 // 1439 NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation); 1441 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation); 1442 1443 if (EFI_ERROR (Status)) { 1444 return Status; 1445 } 1440 1446 1441 1447 DEBUG((EFI_D_INFO, "PCI Bus First Scanning\n")); … … 1525 1531 // Notify the bus allocation phase is about to start for the 2nd time 1526 1532 // 1527 NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation); 1533 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation); 1534 1535 if (EFI_ERROR (Status)) { 1536 return Status; 1537 } 1528 1538 1529 1539 DEBUG((EFI_D_INFO, "PCI Bus Second Scanning\n")); … … 1563 1573 // Notify the resource allocation phase is to start 1564 1574 // 1565 NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation); 1575 Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation); 1576 1577 if (EFI_ERROR (Status)) { 1578 return Status; 1579 } 1566 1580 1567 1581 RootBridgeHandle = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.