Beyond BIOS: Implementing the Unified Extensible Firmware Interface with Intel's Framework

Small is Beautiful
E.F. Schumacher
The pre-EFI initialization (PEI) phase of execution has two primary roles in a platforms life: determine the source of the restart and provide a minimum amount of permanent memory for the ensuing DXE phase. "Small", "minimal", etc are terms often used for PEI code because of hardware resource constraints that limit the programming environment. Specifically, the Pre-EFI Initialization (PEI) phase provides a standardized method of loading and invoking specific initial configuration routines for the processor, chipset, and system board. The PEI phase occurs after the Security (SEC) phase. The primary purpose of code operating in this phase is to initialize enough of the system to allow instantiation of the Driver Execution Environment (DXE) phase. At a minimum, the PEI phase is responsible for determining the system boot path and initializing and describing a minimum amount of system RAM and firmware volume(s) that contain the DXE Foundation and DXE Architectural Protocols. As an application of Occam's Razor to the system design, the minimum amount of activity should be orchestrated and located in this phase of execution; no more, no less.
The PEI phase is responsible for initializing enough of the system to provide a stable base for subsequent phases. It is also responsible for detecting and recovering from corruption of the firmware storage space and providing the restart reason (boot-mode).
Today's PC generally starts execution in a very primitive state, from the perspective of the boot firmware, such as BIOS or the Framework. Processors might...