Reviewed-By: Olivier Martin <[email protected]>

> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: 18 February 2015 21:08
> To: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> Subject: [edk2] [PATCH v2 10/28] ArmVirtualizationPkg/PciHostBridgeDxe:
> abort if there's no PCI host bridge
> 
> If VirtFdtDxe found no PCI host in the DTB, then the config space base
> address will be left at zero -- the default is set in the DSC --, and
> we
> should exit PciHostBridgeDxe immediately.
> 
> This causes gEfiPciRootBridgeIoProtocolGuid not to be installed, which
> in
> turn prevents MdeModulePkg/Bus/Pci/PciBusDxe from binding (see
> PciBusDriverBindingSupported()).
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <[email protected]>
> ---
> 
> Notes:
>     v2:
>     - drop gOvmfAcpiPlatformNoPciEnumerationProtocolGuid; now
>       OvmfPkg/AcpiPlatformDxe is informed differently about the lack of
> a
>       PCI host bridge [Jordan, Laszlo]
> 
> 
> ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.i
> nf | 1 +
>  ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
> | 6 ++++++
>  2 files changed, 7 insertions(+)
> 
> diff --git
> a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe
> .inf
> b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe
> .inf
> index bb458b3..a6f392a 100644
> ---
> a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe
> .inf
> +++
> b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe
> .inf
> @@ -59,6 +59,7 @@
>    gArmPlatformTokenSpaceGuid.PcdPciMmioBase
>    gArmPlatformTokenSpaceGuid.PcdPciMmioSize
>    gArmPlatformTokenSpaceGuid.PcdPciMmioTranslation
> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
> 
>  [depex]
>    gEfiMetronomeArchProtocolGuid
> diff --git
> a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
> b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
> index 3bdd21b..da304fc 100644
> ---
> a/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
> +++
> b/ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridge.c
> @@ -85,6 +85,7 @@ PCI_HOST_BRIDGE_INSTANCE
> mPciHostBridgeInstanceTemplate = {
>    @param ImageHandle     Handle of driver image
>    @param SystemTable     Point to EFI_SYSTEM_TABLE
> 
> +  @retval EFI_ABORTED           PCI host bridge not present
>    @retval EFI_OUT_OF_RESOURCES  Can not allocate memory resource
>    @retval EFI_DEVICE_ERROR      Can not install the protocol instance
>    @retval EFI_SUCCESS           Success to initialize the Pci host
> bridge.
> @@ -102,6 +103,11 @@ InitializePciHostBridge (
>    PCI_HOST_BRIDGE_INSTANCE    *HostBridge;
>    PCI_ROOT_BRIDGE_INSTANCE    *PrivateData;
> 
> +  if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {
> +    DEBUG ((EFI_D_INFO, "%a: PCI host bridge not present\n",
> __FUNCTION__));
> +    return EFI_ABORTED;
> +  }
> +
>    mDriverImageHandle = ImageHandle;
> 
>    mResAperture[0][0].BusBase  = PcdGet32 (PcdPciBusMin);
> --
> 1.8.3.1
> 
> 
> 
> -----------------------------------------------------------------------
> -------
> 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.c
> lktrk
> _______________________________________________
> 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

Reply via email to