UEFI PEI代码分析

 

PEI代码分析

EFI_PEI_INSTALL_PPI函数原型

描述:

作用:

/**
  This service is the first one provided by the PEI Foundation.  This function 
  installs an interface in the PEI PPI database by GUID.  The purpose of the 
  service is to publish an interface that other parties can use to call 
  additional PEIMs.

  //一个由PEI Foundation发布的间接指向EFI_PEI_SERVICES table的指针
  @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table
                           published by the PEI Foundation.

  //一个指向调用者将要install的接口列表的指针 
  @param  PpiList          A pointer to the list of interfaces that the caller shall install.

  @retval EFI_SUCCESS           The interface was successfully installed.
  @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI 
                                descriptors in the list do not have the 
                                EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
  @retval EFI_OUT_OF_RESOURCES  There is no additional space in the PPI database.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_INSTALL_PPI)(
  IN CONST EFI_PEI_SERVICES            **PeiServices,
  IN CONST EFI_PEI_PPI_DESCRIPTOR      *PpiList
  );

EFI_PEI_PPI_DESCRIPTOR结构体

描述:该数据结构通过一个PEIM描述可用的service给PEI Foundation。

作用:每个PPI是由{类型GUID(名字,以后就根据这个来找到它),Function_Entry_Address}组成。

///
/// The data structure through which a PEIM describes available services to the PEI Foundation.
/// 
typedef struct {
  ///
  /// This field is a set of flags describing the characteristics of this imported table entry.
  /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one.
  ///
  UINTN     Flags;
  ///
  /// The address of the EFI_GUID that names the interface.
  ///
  EFI_GUID  *Guid;
  ///
  /// A pointer to the PPI. It contains the information necessary to install a service.
  ///
  VOID      *Ppi;
} EFI_PEI_PPI_DESCRIPTOR;

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值