4 Services - PEI
4.1 Introduction
A PEI Service is defined as a function, command, or other capability created by the PEI Foundation
during a phase that remains available after the phase is complete. Because the PEI phase has no
permanent memory available until nearly the end of the phase, the range of PEI Foundation Services
created during the PEI phase cannot be as rich as those created during later phases.
Table 5 shows the PEI Services described in this section:
PEI Service是由PEI Foundation创建的一组功能或者命令或者其他的能力,并且在PEI Foundation完成后仍可以继续使用。因为在PEI阶段是没有可以使用的永久内存的,直到PEI阶段的末尾才有,PEI阶段创建的PEI Foundation Services不如后面几个阶段来的丰富。
Table 5. PEI Services
PPI Services: | Manages PEIM-to-PEIM Interface (PPIs) to facilitate intermodule calls 管理PEIM到PEIM之间的接口(PPIs)来方便PEIM内部间的交流和调用。接口的安装和查找在处于临时内存的database中。 |
Boot Mode Services: | Manages the boot mode (S3, S5, normal boot, diagnostics, etc.) of the 管理系统的启动模式(S3 S5 通常启动 诊断) |
HOB Services: | Creates data structures called Hand-Off Blocks (HOBs) that are used to 创建一个称为HOBs的数据结构,在PI结构中用于传递信息到下一个阶段(DXE)。 |
Firmware Volume Services: | Walks the Firmware File Systems (FFS) in firmware volumes to find PEIMs 在FV中的FFS里查找PEIM,以及其它在flash设备中的firmware文件 |
PEI Memory Services: | Provides a collection of memory management services for use both before 在永久内存被发现的前后,提供一组内存管理的服务。 |
Status Code Services: | Provides common progress and error code reporting services (for 提供常见的进度和错误码报告服务(例如:0x80端口或串口进行简单的文本输出用于debug)。 |
Reset Services: | Provides a common means by which to initiate a warm or cold restart of 对于系统是冷启动还是热启动提供一组通用的初始化方法。 |
The calling convention for PEI Services is similar to PPIs. See “PEIM-to-PEIM Communication”
on page 116 for more details on PPIs.
The means by which to bind a service call into a service involves a dispatch table,
EFI_PEI_SERVICES.A pointer to the table is passed into the PEIM entry point.
调用PEI Services的俗称约定与PPI的类似。将服务调用绑定到服务的方法涉及到调度表EFI_PEI_SERVICES。指向表的指针被传递到PEIM入口点。