> -----Original Message-----
> From: Gerd Hoffmann <kra...@redhat.com>
> Sent: Thursday, April 7, 2022 5:33 PM
> To: devel@edk2.groups.io
> Cc: Leif Lindholm <quic_llind...@quicinc.com>; Ard Biesheuvel
> <ardb+tianoc...@kernel.org>; Jordan Justen <jordan.l.jus...@intel.com>;
> Jian J Wang <jian.j.w...@intel.com>; Ray Ni <ray...@intel.com>; Hao A Wu
> <hao.a...@intel.com>; Gerd Hoffmann <kra...@redhat.com>; Jiewen Yao
> <jiewen....@intel.com>; Liming Gao <gaolim...@byosoft.com.cn>; Pawel
> Polawski <ppola...@redhat.com>; Chang, Abner (HPS SW/FW Technologist)
> <abner.ch...@hpe.com>; Oliver Steffen <ostef...@redhat.com>; Ard
> Biesheuvel <a...@kernel.org>
> Subject: [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not
> mandatory
> 
> io range is not mandatory according to pcie spec,
> so allow bridge configurations without io address
> space assigned.
> 
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
> Reviewed-by: Ard Biesheuvel <a...@kernel.org>
> ---
>  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> index b20bcd310ad5..51a3b987967f 100644
> --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
> @@ -1085,6 +1085,9 @@ NotifyPhase (
>                RootBridge->ResAllocNode[Index].Base   = BaseAddress;
>                RootBridge->ResAllocNode[Index].Status = ResAllocated;
>                DEBUG ((DEBUG_INFO, "Success\n"));
> +            } else if (Index == TypeIo) {
How do we tell the BaseAddress is set to UINT64 because "(BaseAddress < Limit)" 
or "gDS->AllocateMemorySpace()" returns error in AllocateResource() for TypeIo ?
Is "else if (Index == TypeIo  && RootBridge->Io.Base == MAX_UINT64)" more 
reliable? Or I missed the code logic here?

> +              /* optional on PCIe */
We should use double back slash for the comment in the function if my 
understanding of the coding standard is correct.

Abner

> +              DEBUG ((DEBUG_INFO, "No IO\n"));
>              } else {
>                ReturnStatus = EFI_OUT_OF_RESOURCES;
>                DEBUG ((DEBUG_ERROR, "Out Of Resource!\n"));
> --
> 2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88838): https://edk2.groups.io/g/devel/message/88838
Mute This Topic: https://groups.io/mt/90309345/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to