Revision: 16908
http://sourceforge.net/p/edk2/code/16908
Author: lersek
Date: 2015-02-23 16:04:00 +0000 (Mon, 23 Feb 2015)
Log Message:
-----------
ArmVirtualizationPkg/PciHostBridgeDxe: handle 0 in GetProposedResources()
When there are no devices connected to the root bridge, no resources are
needed. GetProposedResources() currently considers this an invalid
condition (the PI spec doesn't regulate it).
Emitting an empty set of EFI_ACPI_ADDRESS_SPACE_DESCRIPTORs, followed by
the required EFI_ACPI_END_TAG_DESCRIPTOR, allows
PciHostBridgeResourceAllocator() [MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c]
to advance.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Olivier Martin <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
Modified:
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
===================================================================
---
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
2015-02-23 16:03:56 UTC (rev 16907)
+++
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
2015-02-23 16:04:00 UTC (rev 16908)
@@ -1079,7 +1079,15 @@
}
if (Number == 0) {
- return EFI_INVALID_PARAMETER;
+ EFI_ACPI_END_TAG_DESCRIPTOR *End;
+
+ End = AllocateZeroPool (sizeof *End);
+ if (End == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ End->Desc = ACPI_END_TAG_DESCRIPTOR;
+ *Configuration = End;
+ return EFI_SUCCESS;
}
Buffer = AllocateZeroPool (Number *
sizeof(EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) +
sizeof(EFI_ACPI_END_TAG_DESCRIPTOR));
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits