Reviewed-By: Olivier Martin <[email protected]> > -----Original Message----- > From: Laszlo Ersek [mailto:[email protected]] > Sent: 14 February 2015 22:02 > To: [email protected]; [email protected]; Peter Maydell; Ard > Biesheuvel; Drew Jones; Wei Huang; Donald Dutile; Wei Liu > Subject: [edk2] [PATCH 19/27] 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]> > --- > ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c | > 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git > a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c > b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c > index 96391eb..421699d 100644 > --- > a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c > +++ > b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c > @@ -1072,7 +1072,15 @@ GetProposedResources( > } > > 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)); > -- > 1.8.3.1 > > > > ----------------------------------------------------------------------- > ------- > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. > Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------ 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-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
