回复: [edk2-devel] [PATCH v3 7/8] MdeModulePkg/Pci MdePkg: Create service to retrieve PCI base addresses

gaoliming gaoliming at byosoft.com.cn
Sat Jan 29 01:44:24 UTC 2022



> -----邮件原件-----
> 发件人: devel at edk2.groups.io <devel at edk2.groups.io> 代表 Gerd
> Hoffmann
> 发送时间: 2022年1月28日 18:53
> 收件人: devel at edk2.groups.io; ncoleon at amazon.com
> 抄送: atugup at amazon.com; Alexander Graf <graf at amazon.de>
> 主题: Re: [edk2-devel] [PATCH v3 7/8] MdeModulePkg/Pci MdePkg: Create
> service to retrieve PCI base addresses
> 
>   Hi,
> 
> > --- a/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h
> > +++ b/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h
> > @@ -367,6 +367,33 @@ EFI_STATUS
> >    IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE
> Phase
> >    );
> >
> > +/**
> > +  Retrieves the base addresses of ost bridge resources.
> > +
> > +  @param This              The pointer to the
> EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.
> > +  @param RootBridgeHandle  The PCI root bridge handle.
> > +  @param IoBase            The pointer to PIO aperture base
> address.
> > +  @param Mem32Base         The pointer to 32-bit aperture base
> address.
> > +  @param PMem32Base        The pointer to 32-bit prefetchable
> aperture base address.
> > +  @param Mem64Base         The pointer to 64-bit aperture base
> address.
> > +  @param PMem64Base        The pointer to 64-bit prefetchable
> aperture base address.
> > +
> > +  @retval EFI_SUCCESS      Succeed.
> > +  @retval EFI_NOT_FOUND    Root bridge was not found.
> > +
> > +**/
> > +typedef
> > +EFI_STATUS
> > +(EFIAPI
> *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_RESOU
> RCES_BASES)(
> > +  IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
> > +  IN EFI_HANDLE
> RootBridgeHandle,
> > +  OUT UINT64
> *IoBase,
> > +  OUT UINT64
> *Mem32Base,
> > +  OUT UINT64
> *PMem32Base,
> > +  OUT UINT64
> *Mem64Base,
> > +  OUT UINT64
> *PMem64Base
> > +  );
> > +
> >  ///
> >  /// Provides the basic interfaces to abstract a PCI host bridge
resource
> allocation.
> >  ///
> > @@ -415,6 +442,12 @@ struct
> _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL {
> >    /// before enumeration.
> >    ///
> >
> EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_
> CONTROLLER     PreprocessController;
> > +
> > +  ///
> > +  /// Returns the aligned base addresses of the different resource
> windows
> > +  /// of the host bridge. Intended for use before resources are
submitted.
> > +  ///
> > +
> EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_RESOUR
> CES_BASES       GetResourcesBases;
> >  };
> 
> Hmm, not sure the protocol can be changed like that without risking
> breakage, the uefi protocols are the binary interface between uefi
> modules ...
> 

This protocol is defined in PI spec. Its change needs to get UEFI org
approve.
If this service is required, one new protocol can be added into MdeModulePkg
as 
edk2 implementation protocol. 

Thanks
Liming
> take care,
>   Gerd
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86195): https://edk2.groups.io/g/devel/message/86195
Mute This Topic: https://groups.io/mt/88759719/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list