The UGA Protocol sections of this specification were developed in close consultation with
Microsoft as part of the Universal Graphics Adapter (UGA) initiative. Microsoft has made
significant contributions to the interface definitions presented here to ensure that they will work
well with video adapters supporting the Microsoft UGA specification. These efforts are gratefully
acknowledged.
The EFI Byte Code Virtual Machine sections (Chapter 19) of this specification were developed in
close consultation with Microsoft, LSI, Hewlett Packard, Compaq, and Phoenix Technologies. The
efforts of all contributors to these sections are gratefully acknowledged.
THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY
OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY
OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. Intel disclaims all liability, including
liability for infringement of any proprietary rights, relating to use of information in this specification. No license, express or
implied, by estoppel or otherwise, to any intellectual property rights is granted herein, except that a license is hereby granted
to copy and reproduce this specification for internal use only.
Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined."
Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising
from future changes to them.
This document contains information on products in the design phase of development. Do not finalize a design with this
information. Revised information will be published when the product is available. Verify with your local sales office that you
have the latest datasheet or specification before finalizing a design.
Intel, the Intel logo, Pentium, Itanium, and MMX are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
†
Other names and brands may be claimed as the property of others.
Intel order number: A79614-002
Copyright ¤ 1998–2002 Intel Corporation. All Rights Reserved.
ii12/01/02Version 1.10
History
Revision Revision History Date
1.0 Official release of EFI 1.10 Specification, revision 1.0. 12/01/02
Version 1.10 12/01/02 iii
Extensible Firmware Interface Specification
iv 12/01/02 Version 1.10
Contents
1 Introduction
1.1 EFI Driver Model Extensions............................................................................... 1-2
K-1. Functions Listed in Alphabetic Order .......................................................................... 1
K-2. Functions Listed Alphabetically within a Service or Protocol ......................................19
xxvi 12/01/02 Version 1.10
1
Introduction
This Extensible Firmware Interface (hereafter known as EFI) Specification describes an interface
between the operating system (OS) and the platform firmware. The interface is in the form of
data tables that contain platform-related information, and boot and runtime service calls that are
available to the OS loader and the OS. Together, these provide a standard environment for
bootinganOS.
The EFI specification is designed as a pure interface specification. As such, the specification
defines the set of interfaces and structures that platform firmware must implement. Similarly, the
specification defines the set of interfaces and structures that the OS may use in booting. How either
the firmware developer chooses to implement the required elements or the OS developer chooses to
make use of those interfaces and structures is an implementation decision left for the developer.
The intent of this specification is to define a way for the OS and platform firmware to communicate
only information necessary to support the OS boot process. This is accomplished through a formal
and complete abstract specification of the software-visible interface presented to the OS by the
platform and firmware.
®
Using this formal definition, a shrink-wrap OS intended to run on Intel
platforms will be able to boot on a variety of system designs without further platform or OS
customization. The definition will also allow for platform innovation to introduce new features and
functionality that enhance platform capability without requiring new code to be written in the OS
boot sequence.
architecture-based
Furthermore, an abstract specification opens a route to replace legacy devices and firmware code
over time. New device types and associated code can provide equivalent functionality through the
same defined abstract interface, again without impact on the OS boot support code.
The EFI specification is primarily intended for the next generation of 32-bit Intel architecture
(IA-32) and Itanium
hardware platforms from mobile systems to servers. The specification provides a core set of
services along with a selection of protocol interfaces. The selection of protocol interfaces can
evolve over time to be optimized for various platform market segments. At the same time the
specification allows maximum extensibility and customization abilities for OEMs to allow
differentiation. In this, the purpose of EFI is to define an evolutionary path from the traditional
“PC-AT”-style boot world into a legacy-API free environment.
®
-based computers. Thus, the specification is applicable to a full range of
Version 1.1012/01/021-1
Extensible Firmware Interface Specification
1.1EFI Driver Model Extensions
Access to boot devices is provided through a set of protocol interfaces. The EFI 1.02 Specification
describes these protocol interfaces in detail. However, it does not describe how these protocol
interfaces are produced by the system firmware. The EFI 1.10 Specification includes extensions to
the EFI 1.02 Specification that describe the EFI Driver Model along with additional protocol
interfaces that provide access to a richer set of boot devices. One purpose of the EFI Driver Model
is to provide a replacement for “PC-AT”-style option ROMs. It is important to point out that
drivers written to the EFI Driver Model are designed to access boot devices in the preboot
environment. They are not designed to replace the high performance OS specific drivers. The
EFI 1.10 Specification is designed to be backward compatible with the EFI 1.02 Specification.
This means that any EFI applications or drivers written to the EFI 1.02 Specification will continue
to function on system firmware that complies with the EFI 1.10 Specification.
The EFI Driver Model is designed to support the execution of modular pieces of code, also known
as drivers that run in the preboot environment. These drivers may manage or control hardware
buses and devices on the platform or they may provide some software derived platform specific
service.
The EFI Driver Model is designed to extend the EFI Specification in a way that supports device
drivers and bus drivers. These extensions are provided in the form of new protocols, new boot
services, and updated EFI boot services that are backward compatible with their original versions.
The EFI Driver Model also contains information required by EFI driver writers to design and
implement any combination of bus drivers and device drivers that a platform may need to boot an
EFI compliant OS.
The EFI Driver Model is designed to be generic and can be adapted to any type of bus or device.
The EFI 1.10 Specification describes how to write PCI bus drivers, PCI device drivers, USB bus
drivers, USB device drivers, and SCSI drivers. Additions details are provided that allow EFI
drivers to be stored in PCI option ROMs while maintaining compatibility with legacy option
ROM images.
One of the design goals in the EFI 1.10 Specification is to keep the driver images as small as
possible. However, if a driver is required to support multiple processor architectures, a driver
object file would have to be shipped for each supported processor architecture. To address this
space issue, the EFI 1.10 Specification also defines the EFI Byte Code Virtual Machine.AnEFI
driver can be compiled into a single EFI Byte Code Virtual Machine object file. EFI 1.10
complaint firmware must contain an EFI Byte Code interpreter. This allows a single EFI Byte
Code object file to be shipped that supports multiple processor architectures. Another space saving
technique is the use of compression. The EFI 1.10 Specification defines compression and
decompression algorithms that may be used to reduce the size of EFI drivers, and thus reduce the
overhead when EFI drivers are stored in ROM devices.
The information contained in the EFI 1.10 Specification can be used by OSVs, IHVs, OEMs, and
firmware vendors to design and implement EFI firmware, EFI drivers that produce standard
protocol interfaces, and EFI operating system loaders that can be used to boot EFI compliant
operating systems.
1-212/01/02Version 1.10
1.2Overview
This EFI 1.10 Specification is organized as listed in Table 1-1.
Table 1-1.Organization of the EFI Specification
Chapter/AppendixDescription
1. IntroductionIntroduces the EFI Specification and topics related to using the
specification.
2. OverviewDescribes the major components of EFI, including the boot
manager, firmware core, calling conventions, protocols, and
requirements.
3. Boot ManagerDescribes the boot manager, which is used to load EFI drivers
and EFI applications.
4. EFI System TableDescribes the EFI System Table that is passed to every EFI
driver and EFI application.
5. Services — Boot ServicesContains the definitions of the fundamental services that are
present in an EFI-compliant system before an OS is booted.
6. Services — Runtime ServicesContains definitions for the fundamental services that are
present in an EFI-compliant system before and after an OS is
booted.
7. Protocols — EFI Loaded ImageDefines the EFI Loaded Image Protocol that describes an EFI
Image that has been loaded into memory.
8. Protocols — Device Path ProtocolDefines the device path protocol and provides the information
needed to construct and manage device paths in the EFI
environment.
9. Protocols — EFI Driver ModelDescribes a generic driver model for EFI. This includes the set
of services and protocols that apply to every bus and device
type. These protocols include the Driver Binding Protocol, the
Platform Driver Override Protocol, the Bus Specific Driver
Override Protocol, the Driver Diagnostics Protocol, the Driver
Configuration Protocol, and the Component Name Protocol.
10. Protocols — Console SupportDefines the Console I/O protocols, which handle input and output
of text-based information intended for the system user while
executing in the EFI boot services environment. These protocols
include the Simple Input Protocol, the Simple Text Output
Protocol, the Universal Graphics Adapter (UGA) Protocol, the
Simple Pointer Protocol, and the Serial I/O Protocol.
Introduction
continued
Version 1.1012/01/021-3
Extensible Firmware Interface Specification
Table 1-1.Organization of the EFI Specification (continued)
Chapter/AppendixDescription
11. Protocols — Bootable Image
Support
12. Protocols — PCI Bus SupportDefines PCI Bus Drivers, PCI Device Drivers, and PCI Option
13. Protocols — SCSI Bus SupportDefines the SCSI Pass Thru Protocol that is used to abstract
14. Protocols — USB SupportDefines USB Bus Drivers and USB Device Drivers. The
15. Protocols — Network SupportDefines the protocols that provide access to network devices
16. Protocols — Debugger SupportAn optional set of protocols that provide the services required to
17. Protocols — Compression
Algorithm Specification
18. Protocols — Device I/O ProtocolDefines the Device I/O protocol, which is used by code running
Defines the protocols that provide access to bootable images
while executing in the EFI boot services environment. It also
describes the supported disk layouts including MBR, El Torito,
and the Guided Partition Table (GPT). These protocols include
the Load File Protocol, the Simple File System Protocol, the Disk
I/O Protocol, the Block I/O Protocol, and the Unicode Collation
Protocol.
ROM layouts. The protocols described include the PCI Root
Bridge I/O Protocol and the PCI I/O Protocol.
access to a SCSI channel that is produced by a SCSI host
controller.
protocols described include the USB Host Controller Protocol
and the USB I/O Protocol.
while executing in the EFI boot services environment. These
protocols include the Simple Network Protocol, the PXE Base
Code Protocol, and the Boot Integrity services (BIS) Protocol.
implement a source level debugger for the EFI environment.
The EFI DebugPort Protocol provides services to communicate
with a remote debug host. The Debug Support Protocol provides
services to hook processor exceptions, save the processor
context, and restore the processor context. These protocols can
be used in the implementation of a debug agent on the target
system that interacts with the remote debug host.
Describes in detail the EFI compression/decompression
algorithm, as well as the EFI Decompress Protocol. The EFI
Decompress Protocol provides a standard decompression
interface for use at boot time. The EFI Decompress Protocol is
used by a PCI Bus Driver to decompress EFI drivers stored in
PCI Option ROMs.
in the EFI boot services environment to access memory and I/O.
continued
1-412/01/02Version 1.10
Introduction
Table 1-1.Organization of the EFI Specification (continued)
Chapter/AppendixDescription
19. EFI Byte Code Virtual MachineDefines the EFI Byte Code virtual processor and its instruction
set. It also defines how EBC object files are loaded into
memory, and the mechanism for transitioning from native code to
EBC code and back to native code. The information in this
document is sufficient to implement an EFI Byte Code
interpreter, an EFI Byte Code compiler, and an EFI Byte Code
linker.
A. GUID and Time FormatsExplains format of EFI GUIDs (Guaranteed Unique Identifiers).
B. ConsoleDescribes the requirements for a basic text-based console
required by EFI-conformant systems to provide communication
capabilities.
C. Device Path ExamplesExamples of use of the data structures that defines various
hardware devices to the EFI boot services.
D. Status CodesLists success, error, and warning codes returned by EFI
interfaces.
E. 32/64-Bit UNDI SpecificationThis appendix defines the 32/64-bit H/W and S/W Universal
Network Driver Interfaces (UNDIs).
F. Using the Simple Pointer ProtocolThis appendix provides the suggested usage of the Simple
Pointer Protocol.
G. Using the EFI SCSI Pass Thru
Protocol
H. Compression Source CodeThe C source code to an implementation of the EFI Compression
I.Decompression Source CodeThe C source code to an implementation of the EFI
J. EFI Byte Code Virtual Machine
Opcode Summary
K. Alphabetic Function ListLists all EFI interface functions alphabetically.
ReferencesLists all necessary and/or useful specifications, web sites, and
GlossaryBriefly describes terms defined or referenced by this
IndexProvides an index to the key terms and concepts in the
This appendix provides an example on how the SCSI Pass Thru
Protocol can be used.
Algorithm.
Decompression Algorithm.
A summary of the opcodes in the instruction set of the EFI Byte
Code Virtual Machine.
other documentation that is referenced in this EFI Specification.
specification.
specification.
Version 1.1012/01/021-5
Extensible Firmware Interface Specification
1.3Goals
The “PC-AT” boot environment presents significant challenges to innovation within the industry.
Each new platform capability or hardware innovation requires firmware developers to craft
increasingly complex solutions, and often requires OS developers to make changes to their boot
code before customers can benefit from the innovation. This can be a time-consuming process
requiring a significant investment of resources.
The primary goal of the EFI specification is to define an alternative boot environment that can
alleviate some of these considerations. In this goal, the specification is similar to other existing
boot specifications. The main properties of this specification and similar solutions can be
summarized by these attributes:
• Coherent, scalable platform environment. The specification defines a complete solution
for the firmware to completely describe platform features and surface platform capabilities
to the OS during the boot process. The definitions are rich enough to cover the full range
of contemporary Intel architecture-based system designs.
• Abstraction of the OS from the firmware. The specification defines interfaces to platform
capabilities. Through the use of abstract interfaces, the specification allows the OS loader
to be constructed with far less knowledge of the platform and firmware that underlie those
interfaces. The interfaces represent a well-defined and stable boundary between the
underlying platform and firmware implementation and the OS loader. Such a boundary
allows the underlying firmware and the OS loader to change provided both limit their
interactions to the defined interfaces.
• Reasonable device abstraction free of legacy interfaces. “PC-AT” BIOS interfaces
require the OS loader to have specific knowledge of the workings of certain hardware
devices. This specification provides OS loader developers with something different—
abstract interfaces that make it possible to build code that works on a range of underlying
hardware devices without having explicit knowledge of the specifics for each device in
the range.
• Abstraction of Option ROMs from the firmware. This specification defines interfaces to
platform capabilities including standard bus types such as PCI, USB, and SCSI. The list
of supported bus types may grow over time, so a mechanism to extend to future bus types
is included. These defined interfaces and the ability to extend to future bus types are
components of the EFI Driver Model. One purpose of the EFI Driver Model is to solve a
wide range of issues that are present in existing “PC-AT” option ROMs. Like OS loaders,
drivers use the abstract interfaces so device drivers and bus drivers can be constructed
with far less knowledge of the platform and firmware that underlie those interfaces.
• Architecturally shareable system partition. Initiatives to expand platform capabilities and
add new devices often require software support. In many cases, when these platform
innovations are activated before the OS takes control of the platform, they must be
supported by code that is specific to the platform rather than to the customer’s choice of
OS. The traditional approach to this problem has been to embed code in the platform
during manufacturing (for example, in flash memory devices). Demand for such
persistent storage is increasing at a rapid rate. This specification defines persistent store
on large mass storage media types for use by platform support code extensions to
supplement the traditional approach. The definition of how this works is made clear in the
1-612/01/02Version 1.10
Introduction
specification to ensure that firmware developers, OEMs, operating system vendors, and
perhaps even third parties can share the space safely while adding to platform capability.
Defining a boot environment that delivers these attributes could be accomplished in many ways.
Indeed several alternatives, perhaps viable from an academic point of view, already existed at the
time this specification was written. These alternatives, however, typically presented high barriers
to entry given the current infrastructure capabilities surrounding Intel architecture platforms. This
specification is intended to deliver the attributes listed above while also recognizing the unique
needs of an industry that has considerable investment in compatibility and a large installed base of
systems that cannot be abandoned summarily. These needs drive the requirements for the
additional attributes embodied in this specification:
• Evolutionary, not revolutionary. The interfaces and structures in the specification are
designed to reduce the burden of an initial implementation as much as possible. While
care has been taken to ensure that appropriate abstractions are maintained in the interfaces
themselves, the design also ensures that reuse of BIOS code to implement the interfaces is
possible with a minimum of additional coding effort. In other words, on IA-32 platforms
the specification can be implemented initially as a thin interface layer over an underlying
implementation based on existing code. At the same time, introduction of the abstract
interfaces provides for migration away from legacy code in the future. Once the
abstraction is established as the means for the firmware and OS loader to interact during
boot, developers are free to replace legacy code underneath the abstract interfaces at
leisure. A similar migration for hardware legacy is also possible. Since the abstractions
hide the specifics of devices, it is possible to remove underlying hardware, and replace it
with new hardware that provides improved functionality, reduced cost, or both. Clearly
this requires that new platform firmware be written to support the device and present it to
the OS loader via the abstract interfaces. However, without the interface abstraction,
removal of the legacy device might not be possible at all.
• Compatibility by design. The design of the system partition structures also preserves all
the structures that are currently used in the “PC-AT” boot environment. Thus it is a
simple matter to construct a single system that is capable of booting a legacy OS or an
EFI-aware OS from the same disk.
• Simplifies addition of OS-neutral platform value-add. The specification defines an open
extensible interface that lends itself to the creation of platform “drivers.” These may be
analogous to OS drivers, providing support for new device types during the boot process,
or they may be used to implement enhanced platform capabilities like fault tolerance or
security. Furthermore this ability to extend platform capability is designed into the
specification from the outset. This is intended to help developers avoid many of the
frustrations inherent in trying to squeeze new code into the traditional BIOS environment.
As a result of the inclusion of interfaces to add new protocols, OEMs or firmware
developers have an infrastructure to add capability to the platform in a modular way. Such
drivers may potentially be implemented using high level coding languages because of the
calling conventions and environment defined in the specification. This in turn may help to
reduce the difficulty and cost of innovation. The option of a system partition provides an
alternative to nonvolatile memory storage for such extensions.
• Built on existing investment. Where possible, the specification avoids redefining
interfaces and structures in areas where existing industry specifications provide adequate
coverage. For example, the ACPI specification provides the OS with all the information
Version 1.1012/01/021-7
Extensible Firmware Interface Specification
necessary to discover and configure platform resources. Again, this philosophical choice
for the design of the specification is intended to keep barriers to its adoption as low as
possible.
1.4Target Audience
This document is intended for the following readers:
• IHVs and OEMs who will be implementing EFI drivers.
• OEMs who will be creating Intel architecture-based platforms intended to boot shrink-
wrap operating systems.
• BIOS developers, either those who create general-purpose BIOS and other firmware
products or those who modify these products for use in Intel architecture-based products.
• Operating system developers who will be adapting their shrink-wrap operating system
products to run on Intel architecture-based platforms.
1.5EFI Design Overview
The design of EFI is based on the following fundamental elements:
• Reuse of existing table-based interfaces. In order to preserve investment in existing
infrastructure support code, both in the OS and firmware, a number of existing
specifications that are commonly implemented on Intel architecture platforms must be
implemented on platforms wishing to comply with the EFI specification. (See the
References appendix for additional information.)
• System partition. The System partition defines a partition and file system that are
designed to allow safe sharing between multiple vendors, and for different purposes. The
ability to include a separate sharable system partition presents an opportunity to increase
platform value-add without significantly growing the need for nonvolatile platform
memory.
• Boot services. Boot services provide interfaces for devices and system functionality that
can be used during boot time. Device access is abstracted through “handles” and
“protocols.” This facilitates reuse of investment in existing BIOS code by keeping
underlying implementation requirements out of the specification without burdening the
consumer accessing the device.
• Runtime services. A minimal set of runtime services is presented to ensure appropriate
abstraction of base platform hardware resources that may be needed by the OS during its
normal operations.
1-812/01/02Version 1.10
Introduction
Figure 1-1 shows the principal components of EFI and their relationship to platform hardware and
OS software.
OPERATING SYSTEM
EFI OS LOADER
(OTHER)
SMBIOS
ACPI
INTERFACES
FROM
OTHER
REQUIRED
SPECS
EFI BOOT SERVICES
PLATFORM HARDWARE
EFI SYSTEM PARTITION
EFI RUNTIME
SERVICES
EFI OS
LOADER
OM13141
Figure 1-1. EFI Conceptual Overview
This diagram illustrates the interactions of the various components of an EFI specificationcompliant system that are used to accomplish platform and OS boot.
The platform firmware is able to retrieve the OS loader image from the EFI System Partition. The
specification provides for a variety of mass storage device types including disk, CD-ROM and
DVD as well as remote boot via a network. Through the extensible protocol interfaces, it is
possible to envision other boot media types being added, although these may require OS loader
modifications if they require use of protocols other than those defined in this document
Once started, the OS loader continues to boot the complete operating system. To do so, it may use
the EFI boot services and interfaces defined by this or other required specifications to survey,
comprehend and initialize the various platform components and the OS software that manages
them. EFI runtime services are also available to the OS loader during the boot phase.
1.6EFI Driver Model
This section describes the goals of a driver model for EFI firmware. The goal is for this driver
model to provide a mechanism for implementing bus drivers and device drivers for all types of
buses and devices. At the time of writing, the bus types that must be covered include PCI, USB,
†
SCSI, InfiniBand
, and so on.
As hardware architectures continue to evolve, the number and types of buses present in platforms
are increasing. This trend is especially true in high-end servers. However, a more diverse set of
Version 1.1012/01/021-9
Extensible Firmware Interface Specification
bus types is being designed into desktop and mobile systems and even some embedded systems.
This increasing complexity means that a simple method for describing and managing all the buses
and devices in a platform is required in the preboot environment. The EFI Driver Model provides
this simple method in the form of protocols services and boot services.
1.6.1EFI Driver Model Goals
The EFI Driver Model has the following goals:
• Compatible –TheEFI Driver Model must maintain compatibility with the EFI 1.02
Specification. This means that the EFI Driver Model must take advantage of theextensibility mechanisms in the EFI 1.02 Specification to add the required functionality
• Simple – Drivers written to the EFI Driver Model must be simple to implement and
simple to maintain. The EFI Driver Model must allow a driver writer to concentrate on
the specific device for which the driver is being developed. A driver should not be
concerned with platform policy or platform management issues. These considerations
should be left to the system firmware.
• Scalable –TheEFI Driver Model must be able to adapt to all types of platforms. These
platforms would include embedded systems; mobile and desktop systems, as well as
workstations; and servers.
• Flexible –TheEFI Driver Model must support the ability to enumerate all the devices, or
to enumerate only those devices required to boot the required OS. The minimum device
enumeration provides support for more rapid boot capability, and the full device
enumeration provides the ability to perform OS installations, system maintenance, or
system diagnostics on any boot device present in the system.
• Extensible –TheEFI Driver Model must be able to extend to future bus types as they are
defined.
• Portable – Drivers written to the EFI Driver Model must portable between platforms and
between processor architectures. Initially this is limited to platforms with IA-32 family
®
and Itanium
• Interoperable – Drivers must coexist with other drivers and system firmware and must do
so without generating resource conflicts.
• Describe Complex Bus Hierarchies –TheEFI Driver Model must be able to describe a
variety of bus topologies from very simple single bus platforms to very complex platforms
containing many buses of various types.
• Small Driver Footprint – The size of executables produced by the EFI Driver Model must
be minimized to reduce the overall platform cost. While flexibility and extensibility are
goals, the additional overhead required to support these must be kept to a minimum to
prevent the size of firmware components from becoming unmanageable.
• Address Legacy Option ROM Issues –TheEFI Driver Model must directly address and
solve the constraints and limitations of legacy option ROMs. Specifically it must be
possible to build add-in cards that support both EFI drivers and legacy option ROMs
where such cards can execute in both legacy BIOS systems and EFI conforming platforms
without modifications to the code carried on the card. The solution must provide an
evolutionary path to migrate from legacy option ROMs driver to EFI drivers.
processors, but no processor-specific assumptions are made.
1-1012/01/02Version 1.10
1.6.2Legacy Option ROM Issues
This idea of supporting a driver model came from feedback on the EFI Specification that provided a
clear, market-driven requirement for an alternative to the legacy option ROM (sometimes also
referred to as an expansion ROM). The perception is that the advent of the EFI Specification
represents a chance to escape the limitations implicit to the construction and operation of legacy
option ROM images by replacing them with an alternative mechanism that works within the
framework of the EFI Specification.
1.7Migration Requirements
Migration requirements cover the transition period from initial implementation of this specification
to a future time when all platforms and operating systems implement to this specification. During
this period, two major compatibility considerations are important:
1. The ability to continue booting legacy operating systems;
and
2. The ability to implement EFI on existing platforms by reusing as much existing firmware code
to keep development resource and time requirements to a minimum.
1.7.1Legacy Operating System Support
Introduction
The EFI specification represents the preferred means for a shrink-wrap OS and firmware to
communicate during the Intel architecture platform boot process. However, choosing to make a
platform that complies with this specification in no way precludes a platform from also supporting
existing legacy OS binaries that have no knowledge of the EFI specification.
The EFI specification does not restrict a platform designer who chooses to support both the EFI
specification and a more traditional “PC-AT” boot infrastructure. If such a legacy infrastructure is
to be implemented it should be developed in accordance with existing industry practice that is
defined outside the scope of this specification. The choice of legacy operating systems that are
supported on any given platform is left to the manufacturer of that platform.
1.7.2Supporting the EFI Specification on a Legacy Platform
The EFI specification has been carefully designed to allow for existing systems to be extended to
support it with a minimum of development effort. In particular, the abstract structures and services
defined in the EFI specification can all be supported on legacy platforms.
For example, to accomplish such support on an existing IA-32 platform that uses traditional BIOS
to support operating system boot, an additional layer of firmware code would need to be provided.
This extra code would be required to translate existing interfaces for services and devices into
support for the abstractions defined in this specification.
Version 1.1012/01/021-11
Extensible Firmware Interface Specification
1.8Conventions Used in This Document
This document uses typographic and illustrative conventions described below.
1.8.1Data Structure Descriptions
Intel architecture processors of the IA-32 family are “little endian” machines. This distinction
means that the low-order byte of a multibyte data item in memory is at the lowest address, while the
high-order byte is at the highest address. Intel Itanium processors may be configured for both
“little endian” and “big endian” operation. All implementations designed to conform to this
specification will use “little endian” operation.
In some memory layout descriptions, certain fields are marked reserved. Software must initialize
such fields to zero and ignore them when read. On an update operation, software must preserve any
reserved field.
1.8.2Protocol Descriptions
A protocol description generally has the following format:
Protocol:The formal name of the protocol interface.
Summary:A brief description of the protocol interface.
GUID:The 128-bit unique identifier for the protocol interface.
Revision Number:The revision of the protocol interface.
Protocol Interface Structure:
A “C-style” data structure definition containing the
procedures and data fields produced by this protocol
interface.
Parameters:A brief description of each field in the protocol interface
structure.
Related Definitions:The type declarations and constants that are used in the
protocol interface structure or any of its procedures.
Description:A description of the functionality provided by the
protocol interface including any limitations and caveats
of which the caller should be aware.
1-1212/01/02Version 1.10
1.8.3Procedure Descriptions
A procedure description generally has the following format:
ProcedureName():The formal name of the procedure.
Summary:A brief description of the procedure.
Prototype:A “C-style” procedure header defining the calling
sequence.
Parameters:The parameters defined in the template are described in
further detail.
Related Definitions:The type declarations and constants that are only used by
this procedure.
Description:A description of the functionality provided by the
interface including any limitations and caveats the caller
of which should be aware.
Status Codes Returned:A description of the codes returned by the interface.
Any status codes listed in this table are required to be
implemented by the procedure. Additional error codes
may be returned, but they will not be tested by standard
compliance tests, and any software that uses the
procedure cannot depend on any of the extended error
codes that an implementation may provide.
Introduction
1.8.4Instruction Descriptions
An instruction description for EBC instructions generally has the following format:
InstructionNameThe formal name of the EBC Instruction.
SYNTAX:A brief description of the EBC Instruction.
DESCRIPTION:A description of the functionality provided by the EBC
Instruction accompanied by a table that details the
instruction encoding.
OPERATION:Details the operations performed on operands.
BEHAVIORS AND RESTRICTIONS: An item by item description of the behavior
of each operand involved in the instruction
and any restrictions that apply to the
operands or the instruction.
Version 1.1012/01/021-13
Extensible Firmware Interface Specification
1.8.5Pseudo-Code Conventions
Pseudo code is presented to describe algorithms in a more concise form. None of the algorithms in
this document are intended to be compiled directly. The code is presented at a level corresponding
to the surrounding text.
In describing variables, a list is an unordered collection of homogeneous objects. A queue is an
ordered list of homogeneous objects. Unless otherwise noted, the ordering is assumed to be FIFO.
Pseudo code is presented in a C-like format, using C conventions where appropriate. The coding
style, particularly the indentation style, is used for readability and does not necessarily comply with
an implementation of the EFI Specification.
1.8.6Typographic Conventions
This document uses the typographic and illustrative conventions described below:
Plain textThe normal text typeface is used for the vast majority of the
descriptive text in a specification.
Plain text (blue)
BoldIn text, a Bold typeface identifies a processor register name. In other
ItalicIn text, an Italic typeface can be used as emphasis to introduce a new
BOLD MonospaceComputer code, example code segments, and all prototype code
BOLD Monospace
NOTE
Due to management and file size considerations, only the first occurrence of the reference on each
page is an active link. Subsequent references on the same page will not be actively linked to the
definition and will use the standard, nonunderlined BOLD Monospace typeface. Find the first
instance of the name (in the underlined BOLD Monospace
word to jump to the function or type definition.
In the electronic version of this specification, any plain text
underlined and in blue indicates an active link to the cross-reference.
instances, a Bold typeface can be used as a running head within a
paragraph.
term or to indicate a manual or specification name.
segments use a BOLD Monospace typeface with a dark red color.
These code listings normally appear in one or more separate
paragraphs, though words or segments can also be embedded in a
normaltextparagraph.
In the electronic version of this specification, words in a BOLD
Monospace typeface that is underlined and in a dark red color
indicate an active hyperlink to the definition for that function or type
definition. Click on the word to follow the hyperlink.
typeface) on the page and click on the
Italic MonospaceIn code or in text, words in Italic Monospace indicate
placeholder names for variable information that must be supplied
(i.e., arguments).
1-1412/01/02Version 1.10
Overview
EFI allows the extension of platform firmware by loading EFI driver and EFI application images.
When EFI drivers and EFI applications are loaded they have access to all EFI defined runtime and
boot services. See Figure 2-1.
2
Driver
Platform
Init
Standard
firmware
platform
initilization
EFI
EFI Image
Load
Drivers and
applications
loaded
iteratively
API specified Value add implementation
Boot Manager EFI binaries
EFI
Application
OS Loader
Boot from
ordered list
of EFIOS
loaders
Retry
EFI
Load
EFI
Bootcode
Failure
Operation
handed off
to OS loader
Boot
Services
Terminate
OS Loader
EFI API
OM13144
Figure 2-1. Booting Sequence
EFI allows the consolidation of boot menus from the OS loader and platform firmware into a single
platform firmware menu. These platform firmware menus will allow the selection of any EFI OS
loader from any partition on any boot medium that is supported by EFI boot services. An EFI OS
loader can support multiple options that can appear on the user interface. It is also possible to
include legacy boot options, such as booting from the A: or C: drive in the platform firmware
boot menus.
EFI supports booting from media that contain an EFI OS loader or an EFI-defined System Partition.
An EFI-defined System Partition is required by EFI to boot from a block device. EFI does not
require any change to the first sector of a partition, so it is possible to build media that will boot on
both legacy Intel architecture and EFI platforms.
Version 1.1012/01/022-1
Extensible Firmware Interface Specification
2.1Boot Manager
EFI contains a boot manager that allows the loading of EFI applications (including OS 1st stage
loader) or EFI drivers from any file on an EFI defined file system or through the use of an EFI
defined image loading service. EFI defines NVRAM variables that are used to point to the file to
be loaded. These variables also contain application specific data that are passed directly to the EFI
application. The variables also contain a human readable Unicode string that can be displayed to
the user in a menu.
The variables defined by EFI allow the system firmware to contain a boot menu that can point to all
the operating systems, and even multiple versions of the same operating systems. The design goal
of EFI was to have one set of boot menus that could live in platform firmware. EFI only specifies
the NVRAM variables used in selecting boot options. EFI leaves the implementation of the menu
system as value added implementation space.
EFI greatly extends the boot flexibility of a system over the current state of the art in the
PC-AT-class system. The PC-AT-class systems today are restricted to boot from the first floppy,
hard drive, CD-ROM, or network card attached to the system. Booting from a common hard drive
can cause lots of interoperability problems between operating systems, and different versions of
operating systems from the same vendor.
2.1.1EFI Images
EFI Images are a class of files defined by EFI that contain executable code. The most
distinguishing feature of EFI Images is that the first set of bytes in the EFI Image file contains an
image header that defines the encoding of the executable image.
EFI uses a subset of the PE32+ image format with a modified header signature. The modification
to signature value in the PE32+ image is done to distinguish EFI images from normal PE32
executables. The “+” addition to PE32 provides the 64-bit relocation fix-up extensions to standard
PE32 format.
For images with the EFI image signature, the Subsystem values in the PE image header are
defined below. The major differences between image types are the memory type that the firmware
will load the image into, and the action taken when the image’s entry point exits or returns. An
application image is always unloaded when control is returned from the image’s entry point. A
driver image is only unloaded if control is passed back with an EFI error code.
// PE32+ Subsystem type for EFI images
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION10
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER11
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER12
2-212/01/02Version 1.10
Overview
The Machine value that is found in the PE image file header is used to indicate the machine code
type of the image. The machine code types defined for images with the EFI image signature are
defined below. A given platform must implement the image type native to that platform and the
image type for EFI Byte Code (EBC). Support for other machine code types are optional to the
platform.
// PE32+ Machine type for EFI images
#define EFI_IMAGE_MACHINE_IA320x014c
#define EFI_IMAGE_MACHINE_IA640x0200
#define EFI_IMAGE_MACHINE_EBC0x0EBC
An EFI image is loaded into memory through the LoadImage()
Boot Service. This service loads
an image with a PE32+ format into memory. This PE32+ loader is required to load all the sections
of the PE32+ image into memory. Once the image is loaded into memory, and the appropriate
“fix-ups” have been performed, control is transferred to a loaded image at the
AddressOfEntryPoint reference according to the normal indirect calling conventions of
IA-32 or Itanium-based applications. All other linkage to and from an EFI image is done
programmatically.
2.1.2EFI Applications
EFI Applications are loaded by the EFI Boot Manager or by other EFI applications. To load an
application the firmware allocates enough memory to hold the image, copies the sections within the
application to the allocated memory and applies the relocation fix-ups needed. Once done, the
allocated memory is set to be the proper type for code and data for the image. Control is then
transferred to the application’s entry point. When the application returns from its entry point, or
when it calls the Boot Service Exit()
returned to the EFI component that loaded the application.
When the EFI Boot Manager loads an application, the image handle may be used to locate the “load
options” for the application. The load options are stored in nonvolatile storage and are associated
with the application being loaded and executed by the EFI Boot Manager.
, the application is unloaded from memory and control is
Version 1.1012/01/022-3
Extensible Firmware Interface Specification
2.1.3EFI OS Loaders
An EFI OS loader is a special type of EFI application that normally takes over control of the system
from the EFI firmware. When loaded, the OS loader behaves like any other EFI application in that
it must only use memory it has allocated from the firmware and can only use EFI services and
protocols to access the devices that the firmware exposes. If the OS Loader includes any boot
service style driver functions, it must use the proper EFI interfaces to obtain access to the bus
specific-resources. That is, I/O and memory-mapped device registers must be accessed through the
proper bus specific I/O calls like those that an EFI driver would perform.
If the OS loader experiences a problem and cannot load its operating system correctly, it can release
all allocated resources and return control back to the firmware via the Boot Service Exit()
The Exit() call allows both an error code and ExitData to be returned. The ExitData
contains both a Unicode string and OS loader-specific data to be returned.
If the OS loader successfully loads its operating system, it can take control of the system by using
the Boot Service ExitBootServices()
all boot services in the system are terminated, including memory management, and the OS loader is
responsible for the continued operation of the system.
. After successfully calling ExitBootServices(),
2.1.4EFI Drivers
call.
EFI Drivers are loaded by the EFI Boot Manager, the EFI firmware, or by other EFI applications.
To load an EFI Driver the firmware allocates enough memory to hold the image, copies the sections
within the driver to the allocated memory and applies the relocation fix-ups needed. Once done, the
allocated memory is set to be the proper type for code and data for the image. Control is then
transferred to the driver’s entry point. When the driver returns from its entry point, or when it calls
the Boot Service Exit(), the driver is optionally unloaded from memory and control is returned
to the EFI component that loaded the driver. A driver is not unloaded from memory if it returns a
status code of EFI_SUCCESS. If the driver’s return code is an error status code, then the driver is
unloaded from memory.
There are two types of EFI Drivers. These are Boot Service Drivers and Runtime Drivers. The
only difference between these two driver types is that Runtime Drivers are available after an OS
Loader has taken control of the platform with the Boot Service ExitBootServices(). Boot
Service Drivers are terminated when ExitBootServices() is called, and all the memory
resources consumed by the Boot Service Drivers are released for use in the operating system
environment.
2-412/01/02Version 1.10
2.2Firmware Core
This section provides an overview of the services defined by EFI. These include boot services and
runtime services.
2.2.1EFI Services
The purpose of the EFI interfaces is to define a common boot environment abstraction for use by
loaded EFI images, which include EFI drivers, EFI applications, and EFI OS loaders. The calls are
defined with a full 64-bit interface, so that there is headroom for future growth. The goal of this set
of abstracted platform calls is to allow the platform and OS to evolve and innovate independently of
one another. Also, a standard set of primitive runtime services may be used by operating systems.
Platform interfaces defined in this chapter allow the use of standard Plug and Play Option ROMs as
the underlying implementation methodology for the boot services. The PC industry has a huge
investment in Intel Architecture Option ROM technology, and the obsolescence of this installed
base of technology is not practical in the first generation of EFI-compliant systems. The interfaces
have been designed in such as way as to map back into legacy interfaces. These interfaces have in
no way been burdened with any restrictions inherent to legacy Option ROMs.
The EFI platform interfaces are intended to provide an abstraction between the platform and the OS
that is to boot on the platform. The EFI specification also provides abstraction between diagnostics
or utility programs and the platform; however, it does not attempt to implement a full diagnostic OS
environment. It is envisioned that a small diagnostic OS-like environment can be easily built on
top of an EFI system. Such a diagnostic environment is not described by this specification.
Overview
Interfaces added by this specification are divided into the following categories and are detailed later
in this document:
• Runtime services
• Boot services interfaces, with the following subcategories:
Global boot service interfaces
Device handle-based boot service interfaces
Device protocols
Protocol services
Version 1.1012/01/022-5
Extensible Firmware Interface Specification
2.2.2Runtime Services
This section describes EFI runtime service functions. The primary purpose of the EFI runtime
services is to abstract minor parts of the hardware implementation of the platform from the OS.
EFI runtime service functions are available during the boot process and also at runtime provided the
OS switches into flat physical addressing mode to make the runtime call. However, if the OS
loader or OS uses the Runtime Service SetVirtualAddressMap()
be able to call EFI runtime services in a virtual addressing mode. All runtime interfaces are
nonblocking interfaces and can be called with interrupts disabled if desired.
In all cases memory used by the EFI runtime services must be reserved and not used by the OS.
EFI runtime services memory is always available to an EFI function and will never be directly
manipulated by the OS or its components. EFI is responsible for defining the hardware resources
used by runtime services, so the OS can synchronize with those resources when runtime service
calls are made, or guarantee that the OS never uses those resources.
Table 2-1 lists the Runtime Services functions.
Table 2-1.EFI Runtime Services
NameDescription
GetTime()
SetTime()
GetWakeupTime()
SetWakeupTime()
GetVariable()
GetNextVariableName()
SetVariable()
SetVirtualAddressMap()
ConvertPointer()
GetNextHighMonotonicCount()
ResetSystem()
Returns the current time, time context, and time keeping
capabilities.
Sets the current time and time context.
Returns the current wakeup alarm settings.
Sets the current wakeup alarm settings.
Returns the value of a named variable.
Enumerates variable names.
Sets, and if needed creates, a variable.
Switches all runtime functions from physical to virtual addressing.
Used to convert a pointer from physical to virtual addressing.
Subsumes the platform's monotonic counter functionality.
Resets all processors and devices and reboots the system.
service, the OS will only
2-612/01/02Version 1.10
2.3Calling Conventions
Unless otherwise stated, all functions defined in the EFI specification are called through pointers in
common, architecturally defined, calling conventions found in C compilers. Pointers to the various
global EFI functions are found in the EFI_RUNTIME_SERVICES and EFI_BOOT_SERVICES
tables that are located via the EFI system table. Pointers to other functions defined in this
specification are located dynamically through device handles. In all cases, all pointers to EFI
functions are cast with the word EFIAPI. This allows the compiler for each architecture to supply
the proper compiler keywords to achieve the needed calling conventions. When passing pointer
arguments to Boot Services, Runtime Services, and Protocol Interfaces, the caller has the following
responsibilities:
1. It is the caller’s responsibility to pass pointer parameters that reference physical memory
locations. If a pointer is passed that does not point to a physical memory location(i.e. a
memory mapped I/O region), the results are unpredictable and the system may halt.
2. It is the caller’s responsibility to pass pointer parameters with correct alignment. If an
unaligned pointer is passed to a function, the results are unpredictable and the system may halt.
3. It is the caller’s responsibility to not pass in a NULL parameter to a function unless it is
explicitly allowed. If a NULL pointer is passed to a function, the results are unpredictable and
the system may hang.
Overview
Calling conventions for IA-32 or Itanium-based applications are described in more detail below.
Any function or protocol may return any valid return code.
2.3.1Data Types
Table 2-2 lists the common data types that are used in the interface definitions, and Table 2-3 lists
their modifiers. Unless otherwise specified all data types are naturally aligned. Structures are
aligned on boundaries equal to the largest internal datum of the structure and internal data are
implicitly padded to achieve natural alignment.
Table 2-2.Common EFI Data Types
MnemonicDescription
BOOLEAN
INTNSigned value of native width. (4 bytes on IA-32, 8 bytes on Itanium processor
UINTNUnsigned value of native width. (4 bytes on IA-32, 8 bytes on Itanium processor
INT81-byte signed value.
UINT81-byte unsigned value.
INT162-byte signed value.
UINT162-byte unsigned value.
Logical Boolean. 1-byte value containinga0forFALSE or a 1 for TRUE. Other
values are undefined.
instructions)
instructions)
continued
Version 1.1012/01/022-7
Extensible Firmware Interface Specification
Table 2-2.Common EFI Data Types (continued)
MnemonicDescription
INT324-byte signed value.
UINT324-byte unsigned value.
INT648-byte signed value.
UINT648-byte unsigned value.
CHAR81-byte Character.
CHAR162-byte Character. Unless otherwise specified all strings are stored in the
UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
VOIDUndeclared type.
EFI_GUID128-bit buffer containing a unique identifier value. Unless otherwise specified,
aligned on a 64-bit boundary.
EFI_STATUSStatus code. Type INTN.
EFI_HANDLEA collection of related interfaces. Type VOID *.
EFI_EVENTHandle to an event structure. Type VOID *.
EFI_LBALogical block address. Type UINT64.
EFI_TPLTask priority level. Type UINTN.
EFI_MAC_ADDRESS32-byte buffer containing a network Media Access Control address.
EFI_IPv4_ADDRESS4-byte buffer. An IPv4 internet protocol address.
EFI_IPv6_ADDRESS16-byte buffer. An IPv6 internet protocol address.
EFI_IP_ADDRESS16-byte buffer aligned on a 4-byte boundary. An IPv4 or IPv6 internet protocol
address.
<Enumerated Type>
Element of a standard ANSI C enum type declaration. Type INTN.
Table 2-3.Modifiers for Common EFI Data Types
MnemonicDescription
INDatum is passed to the function.
OUTDatum is returned from the function.
OPTIONAL
EFIAPIDefines the calling convention for EFI interfaces.
2-812/01/02Version 1.10
Passing the datum to the function is optional, and a
passed if the value is not supplied.
NULL may be
2.3.2IA-32 Platforms
All functions are called with the C language calling convention. The general-purpose registers that
are volatile across function calls are eax, ecx,andedx. All other general-purpose registers are
nonvolatile and are preserved by the target function. In addition, unless otherwise specified by the
function definition, all other registers are preserved. For example, this would include the entire
®
floating point and Intel
During boot services time the processor is in the following execution mode:
• Uniprocessor
• Protected mode
• Paging mode not enabled
• Selectors are set to be flat and are otherwise not used
• Interrupts are enabled–though no interrupt services are supported other than the EFI boot
services timer functions (All loaded device drivers are serviced synchronously by “polling.”)
• DirectionflaginEFLAGsisclear
• Other general purpose flag registers are undefined
• 128 KB, or more, of available stack space
For an operating system to use any EFI runtime services, it must:
• Preserve all memory in the memory map marked as runtime code and runtime data
• Call the runtime service functions, with the following conditions:
Called from the boot processor
In protected mode
Paging not enabled
All selectors set to be flat with virtual = physical address. If the OS Loader or OS used
SetVirtualAddressMap()
space, then this condition does not have to be met.
DirectionflaginEFLAGsclear
4 KB, or more, of available stack space
Interrupts disabled
• Synchronize processor access to the legacy CMOS registers (if there are multiple processors).
Only one processor can access the registers at any given time.
• ACPI Tables loaded at boot time must be contained in memory of type
EfiACPIReclaimMemory.
• The system firmware must not request a virtual mapping for any memory descriptor of type
EfiACPIReclaimMemory or EfiACPIMemoryNVS.
• EFI memory descriptors of type EfiACPIReclaimMemory and EfiACPIMemoryNVS
must be aligned on a 4 KB boundary and must be a multiple of 4 KB in size.
• Any EFI memory descriptor that requests a virtual mapping via the
EFI_MEMORY_DESCRIPTOR having the EFI_MEMORY_RUNTIME bit set must be aligned
on a 4 KB boundary and must be a multiple of 4 KB in size.
MMX™technology state.
to relocate the runtime services in a virtual address
Overview
Version 1.1012/01/022-9
Extensible Firmware Interface Specification
• An ACPI Memory Op-region must inherit cacheability attributes from the EFI memory map. If
the system memory map does not contain cacheability attributes, the ACPI Memory Op-region
must inherit its cacheability attributes from the ACPI name space. If no cacheability attributes
exist in the system memory map or the ACPI name space, then the region must be assumed to
be noncacheable.
• ACPI tables loaded at runtime must be contained in memory of type EfiACPIMemoryNVS or
EfiFirmareReserved. The cacheability attributes for ACPI tables loaded at runtime (via
ACPI LoadTable) should be defined in the EFI memory map. If no information about the table
location exists in the EFI memory map, the table is assumed to be noncached.
2.3.2.1Handoff State
When an IA-32 EFI OS is loaded, the system firmware hands off control to the OS in flat 32-bit
mode. All descriptors are set to their 4 GB limits so that all of memory is accessible from all
segments. The address of the IDT is not defined and thus it cannot be manipulated directly during
boot services.
Figure 2-2 shows the stack after AddressOfEntryPoint in the image’s PE32+ header has been
called on IA-32 systems. All EFI image entry points take two parameters. These are the image
handle of the EFI image, and a pointer to the EFI System Table.
Stack Location
EFI_SYSTEM_TABLE *
EFI_HANDLE
<return address>
Figure 2-2. Stack after AddressOfEntryPoint Called, IA-32
ESP + 8
ESP + 4
ESP
OM13145
2-1012/01/02Version 1.10
2.3.3Itanium®-Based Platforms
EFI executes as an extension to the SAL execution environment with the same rules as laid out by
the SAL specification.
During boot services time the processor is in the following execution mode:
• Uniprocessor
• Physical mode
• 128 KB, or more, of available stack space
• 16 KB, or more, of available backing store space
• May only use the lower 32 floating point registers
The EFI Image may invoke both SAL and EFI procedures. Once in virtual mode, the EFI OS must
switch back to physical mode to call any boot services. If SetVirtualAddressMap()
been used, then runtime service calls are made in virtual mode.
• ACPI Tables loaded at boot time must be contained in memory of type
EfiACPIReclaimMemory.
• The system firmware must not request a virtual mapping for any memory descriptor of type
EfiACPIReclaimMemory or EfiACPIMemoryNVS.
• EFI memory descriptors of type EfiACPIReclaimMemory and EfiACPIMemoryNVS
must be aligned on an 8 KB boundary and must be a multiple of 8 KB in size.
• Any EFI memory descriptor that requests a virtual mapping via the
EFI_MEMORY_DESCRIPTOR having the EFI_MEMORY_RUNTIME bit set must be aligned
on a 8 KB boundary and must be a multiple of 8 KB in size.
• An ACPI Memory Op-region must inherit cacheability attributes from the EFI memory map. If
the system memory map does not contain cacheability attributes the ACPI Memory Op-region
must inherit its cacheability attributes from the ACPI name space. If no cacheability attributes
exist in the system memory map or the ACPI name space, then the region must be assumed to
be noncacheable.
• ACPI tables loaded at runtime must be contained in memory of type EfiACPIMemoryNVS or
EfiFirmareReserved. The cacheability attributes for ACPI tables loaded at runtime (via
ACPI LoadTable) should be defined in the EFI memory map. If no information about the table
location exists in the EFI memory map, the table is assumed to be noncached.
Overview
has
Refer to the IA-64 System Abstraction Layer Specification (see the References appendix) for details.
EFI procedures are invoked using the P64 C calling conventions defined for Itanium-based
applications. Refer to the document 64 Bit Runtime Architecture and Software Conventionsfor IA-64 (see the References appendix) for more information.
Version 1.1012/01/022-11
Extensible Firmware Interface Specification
2.3.3.1Handoff State
EFI uses the standard P64 C calling conventions that are defined for Itanium-based operating
systems. Figure 2-3 shows the stack after ImageEntryPoint has been called on Itanium-based
systems. The arguments are also stored in registers: out0 contains EFI_HANDLE and out1
contains the address of the EFI_SYSTEM_TABLE.Thegp for the EFI Image will have been
loaded from the plabel pointed to by the AddressOfEntryPoint in the image’s PE32+
header. All EFI image entry points take two parameters. These are the image handle of the EFI
image, and a pointer to the EFI System Table.
Stack Location Register
EFI_SYSTEM_TABLE *
EFI_HANDLE
Figure 2-3. Stack after AddressOfEntryPoint Called, Itanium-based Systems
SP + 8
SP
out1
out0
OM13146
The SAL specification (see the References appendix) defines the state of the system registers at
boot handoff. The SAL specification also defines which system registers can only be used after
EFI boot services have been properly terminated.
2.4Protocols
The protocols that a device handle supports are discovered through the HandleProtocol()
Boot Service or the OpenProtocol() Boot Service. Each protocol has a specification that
includes the following:
• The protocol’s globally unique ID (GUID)
• The Protocol Interface structure
• The Protocol Services
To determine if the handle supports any given protocol, the protocol’s GUID is passed to
HandleProtocol() or OpenProtocol(). If the device supports the requested protocol, a
pointer to the defined Protocol Interface structure is returned. The Protocol Interface structure links
the caller to the protocol-specific services to use for this device.
2-1212/01/02Version 1.10
Overview
Figure 2-4 shows the construction of a protocol. The EFI driver contains functions specific to one
or more protocol implementations, and registers them with the Boot Service
InstallProtocolInterface()
. The firmware returns the Protocol Interface for the
protocol that is then used to invoke the protocol specific services. The EFI driver keeps private,
device-specific context with protocol interfaces.
HandleProtocol (GUID, ...)
Invoking one of
the protocol
services
Handle
Protocol Interface
Function Pointer
Function Pointer
...
Device specificcontext
EFI Driver
GUID 1
Protocol
specific
functions
GUID 2
Protocol
specific
functions
Device, or
next Driver
Figure 2-4. Construction of a Protocol
The following C code fragment illustrates the use of protocols:
// There is a global “EffectsDevice” structure.This
// structure contains information pertinent to the device.
// Connect to the ILLUSTRATION_PROTOCOL on the EffectsDevice,
// by calling HandleProtocol with the device’s EFI device handle
// and the ILLUSTRATION_PROTOCOL GUID.
EffectsDevice.Handle = DeviceHandle;
Status = HandleProtocol (
Table 2-4 lists the EFI protocols defined by this specification.
Table 2-4.EFI Protocols
ProtocolDescription
LOADED_IMAGE
DEVICE_PATH
DRIVER_BINDING
PLATFORM_DRIVER_OVERRIDE
BUS_SPECIFIC_DRIVER_OVERRIDE
DRIVER_CONFIGURATION
DRIVER_DIAGNOSTICS
COMPONENT_NAME
SIMPLE_INPUT
SIMPLE_TEXT_OUTPUT
UGA_DRAW
SIMPLE_POINTER
SERIAL_IO
LOAD_FILE
SIMPLE_FILE_SYSTEM
FILE_HANDLE
DISK_IO
BLOCK_IO
UNICODE_COLLATION
PCI_ROOT_BRIDGE_IO
PCI_IO
Provides information on the image.
Provides the location of the device.
Provides services to determine if an EFI driver supports a given
controller, and services to start and stop a given controller.
Provide a platform specific override mechanism for the selection
of the best driver for a given controller.
Provides a bus specific override mechanism for the selection of
the best driver for a given controller.
Provides user configuration options for EFI drivers and the
controllers that the EFI drivers are managing.
Provides diagnostics services for the controllers that EFI drivers
are managing.
Provides human readable names for EFI Drivers and the
controllers that the EFI drivers are managing.
Protocol interfaces for devices that support simple console style
text input.
Protocol interfaces for devices that support console style text
displaying.
Protocol interfaces for devices that support graphical output.
Protocol interfaces for devices such as mice and trackballs.
Protocol interfaces for devices that support serial character
transfer.
Protocol interface for reading a file from an arbitrary device.
Protocol interfaces for opening disk volume containing an EFI file
system.
Provides access to supported file systems.
A protocol interface that layers onto any BLOCK_IO interface.
Protocol interfaces for devices that support block I/O style
accesses.
Protocol interfaces for Unicode string comparison operations.
Protocol interfaces to abstract memory, I/O, PCI configuration,
and DMA accesses to a PCI root bridge controller.
Protocol interfaces to abstract memory, I/O, PCI configuration,
and DMA accesses to a PCI controller on a PCI bus.
continued
2-1412/01/02Version 1.10
Table 2-4.EFI Protocols (continued)
ProtocolDescription
SCSI_PASS_THRU
USB_HC
USB_IO
SIMPLE_NETWORK
PXE_BC
BIS
DEBUG_SUPPORT
DEBUG_PORT
DECOMPRESS
DEVICE_IO
EBC
Protocol interfaces for a SCSI channel that allow SCSI Request
Packets to be sent to SCSI devices.
Protocol interfaces to abstract access to a USB Host Controller.
Protocol interfaces to abstract access to a USB controller.
Provides interface for devices that support packet based
transfers.
Protocol interfaces for devices that support network booting.
Protocol interfaces to validate boot images before they are
loaded and invoked.
Protocol interfaces to save and restore processor context and
hook processor exceptions.
Protocol interface that abstracts a byte stream connection
between a debug host and a debug target system.
Protocol interfaces to decompress an image that was
compressed using the EFI Compression Algorithm.
Protocol interfaces for performing device I/O.
Protocols interfaces required to support an EFI Byte Code
interpreter.
Overview
2.5EFI Driver Model
The EFI Driver Model is intended to simplify the design and implementation of device drivers, and
produce small executable image sizes. As a result, some complexity has been moved into bus
drivers and in a larger part into common firmware services.
A device driver is required to produce a Driver Binding Protocol on the same image handle on
which the driver was loaded. It then waits for the system firmware to connect the driver to a
controller. When that occurs, the device driver is responsible for producing a protocol on the
controller’s device handle that abstracts the I/O operations that the controller supports. A bus
driver performs these exact same tasks. In addition, a bus driver is also responsible for discovering
any child controllers on the bus, and creating a device handle for each child controller found.
One assumption is that the architecture of a system can be viewed as a set of one or more
processors connected to one or more core chipsets. The core chipsets are responsible for producing
one or more I/O buses. The EFI Driver Model does not attempt to describe the processors or the
core chipsets. Instead, the EFI Driver Model describes the set of I/O buses produced by the core
chipsets, and any children of these I/O buses. These children can either be devices or additional
I/O buses. This can be viewed as a tree of buses and devices with the core chipsets at the root
of that tree.
Version 1.1012/01/022-15
Extensible Firmware Interface Specification
The leaf nodes in this tree structure are peripherals that perform some type of I/O. This could
include keyboards, displays, disks, network, etc. The nonleaf nodes are the buses that move data
between devices and buses, or between different bus types. Figure 2-5 shows a sample desktop
system with four buses and six devices.
CPU
North
Bridge
PCI Bus
USB
IDE
VGA
PCI-ISA
Bridge
USB Bus
IDE Bus
Hard
Drive
CD-ROM
1.44 MB
Floppy
Keyboard
Mouse
Bus Controller
Device Controller
Other
ISA Bus
O
M
13142
Figure 2-5. Desktop System
Figure 2-6 is an example of a more complex server system. The idea is to make the EFI Driver
Model simple and extensible so more complex systems like the one below can be described and
managed in the preboot environment. This system contains six buses and eight devices.
CPU
North
Bridge
PCI-IBA
Bridge
USB
IBA Bus
USB Bus
IBA-PCI
Bridge
KBD
SCSI
PCI Bus
Hard
Drive
Hard
Drive
CPU
VGA
MOUSE
Hard
Drive
PCI Bus
PCI-ISA
Bridge
ISA Bus
1.44 MB
Floppy
Hard
Drive
O
M
13143
Figure 2-6. Server System
2-1612/01/02Version 1.10
The combination of firmware services, bus drivers, and device drivers in any given platform is
likely to be produced by a wide variety of vendors including OEMs, IBVs, and IHVs. These
different components from different vendors are required to work together to produce a protocol for
an I/O device than can be used to boot an EFI compliant operating system. As a result, the EFIDriver Model is described in great detail in order to increase the interoperability of these
components.
This remainder of this section is a brief overview of the EFI Driver Model. It describes the legacy
option ROM issues that the EFI Driver Model is designed to address, the entry point of a driver,
host bus controllers, properties of device drivers, properties of bus drivers, and how the EFI DriverModel can accommodate hot-plug events.
2.5.1Legacy Option ROM Issues
Legacy option ROMs have a number of constraints and limitations that restrict innovation on the
part of platform designers and adapter vendors. At the time of writing, both ISA and PCI adapters
use legacy option ROMs. For the purposes of this discussion, only PCI option ROMs will be
considered; legacy ISA option ROMs are not supported as part of the EFI Specification.
The following is a list of the major constraints and limitations of legacy option ROMs. For each
issue, the design considerations that went into the design of the EFI Driver Model are also listed.
Thus, the design of the EFI Driver Model directly addresses the requirements for a solution to
overcome the limitations implicit to PC-AT-style legacy option ROMs.
Overview
2.5.1.1IA-32 16-Bit Real Mode Binaries
Legacy option ROMs typically contain 16-bit real mode code for an IA-32 processor. This means
that the legacy option ROM on a PCI card cannot be used in platforms that do not support the
execution of IA-32 real mode binaries. Also, 16-bit real mode only allows the driver to access
directly the lower 1 MB of system memory. It is possible for the driver to switch the processor into
modes other than real mode in order to access resources above 1 MB, but this requires a lot of
additional code, and causes interoperability issues with other option ROMs and the system BIOS.
Also, option ROMs that switch the processor into to alternate execution modes are not compatible
with Itanium Processors.
EFI Driver Model design considerations:
• Drivers need flat memory mode with full access to system components.
• Drivers need to be written in C so they are portable between processor architectures.
• Drivers may be compiled into a virtual machine executable, allowing a single binary driver to
work on machines using different processor architectures.
Version 1.1012/01/022-17
Extensible Firmware Interface Specification
2.5.1.2Fixed Resources for Working with Option ROMs
Since legacy option ROMs can only directly address the lower 1 MB of system memory, this means
that the code from the legacy option ROM must exist below 1 MB. In a PC-AT platform, memory
from 0x00000-0x9FFFF is system memory. Memory from 0xA0000-0xBFFFF is VGA memory,
and memory from 0xF0000-0xFFFFF is reserved for the system BIOS. Also, since system BIOS
has become more complex over the years, many platforms also use 0xE0000-0xEFFFF for system
BIOS. This leaves 128 KB of memory from 0xC0000-0xDFFFF for legacy option ROMs. This
limits how many legacy option ROMs can be run during BIOS POST.
Also, it is not easy for legacy option ROMs to allocate system memory. Their choices are to
allocate memory from Extended BIOS Data Area (EBDA), allocate memory through a Post
Memory Manager (PMM), or search for free memory based on a heuristic. Of these, only EBDA is
standard, and the others are not used consistently between adapters, or between BIOS vendors,
which adds complexity and the potential for conflicts.
EFI Driver Model design considerations:
• Drivers need flat memory mode with full access to system components.
• Drivers need to be relocatable, so they can be loaded anywhere in memory (PE/COFF Images)
• Drivers should allocate memory through the EFI boot services. These are well-specified
interfaces, and can be guaranteed to function as expected across a wide variety of platform
implementations.
2.5.1.3Matching Option ROMs to their Devices
It is not clear which controller may be managed by a particular legacy option ROM. Some legacy
option ROMs search the entire system for controllers to manage. This can be a lengthy process
depending on the size and complexity of the platform. Also, due to limitation in BIOS design, all
the legacy option ROMs must be executed, and they must scan for all the peripheral devices before
an operating system can be booted. This can also be a lengthy process, especially if SCSI buses
must be scanned for SCSI devices. This means that legacy option ROMs are making policy
decision about how the platform is being initialized, and which controllers are managed by which
legacy option ROMs. This makes it very difficult for a system designer to predict how legacy
option ROMs will interact with each other. This can also cause issues with on-board controllers,
because a legacy option ROM may incorrectly choose to manage the on-board controller.
EFI Driver Model design considerations:
• Driver to controller matching must be deterministic
• Give OEMs more control through Platform Driver Override Protocol and Driver Configuration
Protocol
• It must be possible to start only the drivers and controllers required to boot an operating system.
2-1812/01/02Version 1.10
Overview
2.5.1.4Ties to PC-AT System Design
Legacy option ROMs assume a PC-AT-like system architecture. Many of them include code that
directly touches hardware registers. This can make them incompatible on legacy-free and headless
platforms. Legacy option ROMs may also contain setup programs that assume a PC-AT-like
system architecture to interact with a keyboard or video display. This makes the setup application
incompatible on legacy-free and headless platforms.
EFI Driver Model design considerations:
• Drivers should use well-defined protocols to interact with system hardware, system input
devices, and system output devices.
2.5.1.5Ambiguities in Specification and Workarounds Born of Experience
Many legacy option ROMs and BIOS code contain workarounds because of incompatibilities
between legacy option ROMs and system BIOS. These incompatibilities exist in part because there
are no clear specifications on how to write a legacy option ROM or write a system BIOS.
Also, interrupt chaining and boot device selection is very complex in legacy option ROMs. It is not
always clear which device will be the boot device for the OS.
EFI Driver Model design considerations:
• EFI Drivers and EFI firmware is written to follow the EFI Specification. Since both
components have a clearly defined specification, compliance tests can be developed to prove
that drivers and system firmware are compliant. This should eliminate the need to build
workarounds into either drivers or system firmware (other than those that might be required to
address specific hardware issues).
• Give OEMs more control through Platform Driver Override Protocol and Driver Configuration
Protocol and other OEM value-add components to manage the boot device selection process.
Version 1.1012/01/022-19
Extensible Firmware Interface Specification
2.5.2Driver Initialization
The file for a driver image must be loaded from some type of media. This could include ROM,
FLASH, hard drives, floppy drives, CD-ROM, or even a network connection. Once a driver image
has been found, it can be loaded into system memory with the boot service LoadImage()
LoadImage() loads a PE/COFF formatted image into system memory. A handle is created for
the driver, and a Loaded Image Protocol instance is placed on that handle. A handle that contains a
Loaded Image Protocol instance is called an Image Handle. At this point, the driver has not been
started. It is just sitting in memory waiting to be started. Figure 2-7 shows the state of an image
handle for a driver after LoadImage() has been called.
Image Handle
EFI_LOADED_IMAGE_PROTOCOL
OM13148
Figure 2-7. Image Handle
.
After a driver has been loaded with the boot service LoadImage(), it must be started with the
boot service StartImage()
. This is true of all types of EFI Applications and EFI Drivers that
can be loaded and started on an EFI-compliant system. The entry point for a driver that follows the
EFI Driver Model must follow some strict rules. First, it is not allowed to touch any hardware.
Instead, the driver is only allowed to install protocol instances onto its own Image Handle. A
driver that follows the EFI Driver Model is required to install an instance of the Driver Binding
Protocol onto its own Image Handle. It may optionally install the Driver Configuration Protocol,
the Driver Diagnostics Protocol, or the Component Name Protocol. In addition, if a driver wishes
to be unloadable it may optionally update the Loaded Image Protocol to provide its own
Unload()
service ExitBootServices()
function. Finally, if a driver needs to perform any special operations when the boot
is called, it may optionally create an event with a notification
function that is triggered when the boot service ExitBootServices() is called. An ImageHandle that contains a Driver Binding Protocol instance is known as a Driver Image Handle.
Figure 2-8 shows a possible configuration for the Image Handle from Figure 2-7 after the boot
service StartImage() has been called.
2-2012/01/02Version 1.10
Image Handle
EFI_LOADED_IMAGE_PROTOCOL
EFI_DRIVER_BINDING_PROTOCOL
Overview
Optional
Optional
Optional
EFI_DRIVER_CONFIGURATION_PROTOCOL
EFI_DRIVER_DIAGNOSTICS_PROTOCOL
EFI_COMPONENT_NAME_PROTOCOL
Figure 2-8. Driver Image Handle
2.5.3Host Bus Controllers
Drivers are not allowed to touch any hardware in the driver’s entry point. As a result, drivers will
be loaded and started, but they will all be waiting to be told to manage one or more controllers in
the system. A platform component, like the EFI Boot Manager, is responsible for managing the
connection of drivers to controllers. However, before even the first connection can be made, there
has to be some initial collection of controllers for the drivers to manage. This initial collection of
controllers is known as the Host Bus Controllers. The I/O abstractions that the Host Bus
Controllers provide are produced by firmware components that are outside the scope of the EFI
Driver Model. The device handles for the Host Bus Controllers and the I/O abstraction for each
one must be produced by the core firmware on the platform, or an EFI Driver that may not follow
the EFI Driver Model.SeethePCI Root Bridge I/O Protocol Specification for an example of an
I/O abstraction for PCI buses.
OM13149
Version 1.1012/01/022-21
Extensible Firmware Interface Specification
A platform can be viewed as a set of processors and a set of core chipset components that may
produce one or more host buses. Figure 2-9 shows a platform with n processors (CPUs), and a set
of core chipset components that produce m host bridges.
CPU 1
CPU 2
. . .
CPU
n
Front Side Bus
Core Chipset Components
HB 1
HB 2
Figure 2-9. Host Bus Controllers
. . .
Each host bridge is represented in EFI as a device handle that contains a Device Path Protocol
instance, and a protocol instance that abstracts the I/O operations that the host bus can perform.
For example, a PCI Host Bus Controller supports one or more PCI Root Bridges that are abstracted
by the PCI Root Bridge I/O Protocol. Figure 2-10 shows an example device handle for a PCI
Root Bridge.
HB
m
OM13150
Device Handle
EFI_DEVICE_PATH_PROTOCOL
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL
O
M
15221
Figure 2-10. PCI Root Bridge Device Handle
2-2212/01/02Version 1.10
A PCI Bus Driver could connect to this PCI Root Bridge, and create child handles for each of the
PCI devices in the system. PCI Device Drivers should then be connected to these child handles,
and produce I/O abstractions that may be used to boot an EFI compliant OS. The following section
describes the different types of drivers that can be implemented within the EFI Driver Model.The
EFI Driver Model is very flexible, so all the possible types of drivers will not be discussed here.
Instead, the major types will be covered that can be used as a starting point for designing and
implementing additional driver types.
2.5.4Device Drivers
A device driver is not allowed to create any new device handles. Instead, it installs additional
protocol interfaces on an existing device handle. The most common type of device driver will
attach an I/O abstraction to a device handle that was created by a bus driver. This I/O abstraction
may be used to boot an EFI compliant OS. Some example I/O abstractions would include Simple
Text Output, Simple Input, Block I/O, and Simple Network Protocol. Figure 2-11 shows a device
handle before and after a device driver is connected to it. In this example, the device handle is a
child of the XYZ Bus, so it contains an XYZ I/O Protocol for the I/O services that the XYZ bus
supports. It also contains a Device Path Protocol that was placed there by the XYZ Bus Driver.
The Device Path Protocol is not required for all device handles. It is only required for device
handles that represent physical devices in the system. Handles for virtual devices will not contain a
Device Path Protocol.
Overview
Device Handle
EFI_DEVICE_PATH_PROTOCOL
EFI_XYZ_I/O_PROTOCOL
Stop()
Installed by Start()
Uninstalled by Stop()
Start()
Device Handle
EFI_DEVICE_PATH_PROTOCOL
EFI_XYZ_I/O_PROTOCOL
EFI_BLOCK_I/O_PROTOCOL
OM13152
Figure 2-11. Connecting Device Drivers
Version 1.1012/01/022-23
Extensible Firmware Interface Specification
The device driver that connects to the device handle in Figure 2-11 must have installed a Driver
Binding Protocol on its own image handle. The Driver Binding Protocol contains three functions
called Supported()
, Start(),andStop().TheSupported() function tests to see if the
driver supports a given controller. In this example, the driver will check to see if the device handle
supports the Device Path Protocol and the XYZ I/O Protocol. If a driver’s Supported()
function passes, then the driver can be connected to the controller by calling the driver’s Start()
function. The Start() function is what actually adds the additional I/O protocols to a device
handle. In this example, the Block I/O Protocol is being installed. To provide symmetry, the
Driver Binding Protocol also has a Stop() function that forces the driver to stop managing a
device handle. This will cause the device driver to uninstall any protocol interfaces that were
installed in Start().
The Supported(), Start(),andStop() functions of the EFI Driver Binding Protocol are
required to make use of the boot service OpenProtocol()
boot service CloseProtocol()
to release a protocol interface. OpenProtocol() and
to get a protocol interface and the
CloseProtocol() update the handle database maintained by the system firmware to track
which drivers are consuming protocol interfaces. The information in the handle database can be
used to retrieve information about both drivers and controllers. The new boot service
OpenProtocolInformation()
can be used to get the list of components that are currently
consuming a specific protocol interface.
2.5.5Bus Drivers
Bus drivers and device drivers are virtually identical from the EFI Driver Model’s point of view.
The only difference is that a bus driver creates new device handles for the child controllers that the
bus driver discovers on its bus. As a result, bus drivers are slightly more complex than device
drivers, but this in turn simplifies the design and implementation of device drivers. There are two
major types of bus drivers. The first creates handles for all child controllers on the first call to
Start(). The other type allows the handles for the child controllers to be created across multiple
calls to Start(). This second type of bus driver is very useful in supporting a rapid boot
capability. It allows a few child handles or even one child handle to be created. On buses that take
a long time to enumerate all of their children (e.g. SCSI), this can lead to a very large timesaving in
booting a platform. Figure 2-12 shows the tree structure of a bus controller before and after
Start() is called. The dashed line coming into the bus controller node represents a link to the
bus controller’s parent controller. If the bus controller is a Host Bus Controller, then it will not
have a parent controller. Nodes A, B, C ,D, and E represent the child controllers of the bus
controller.
2-2412/01/02Version 1.10
Overview
Bus Controller
Start()
Stop()
Figure 2-12. Connecting Bus Drivers
ABCDE
Bus Controller
OM13153
A bus driver that supports creating one child on each call to Start() might choose to create child
C first, and then child E, and then the remaining children A, B, and D. The Supported()
Start(),andStop()
functions of the Driver Binding Protocol are flexible enough to allow this
,
type of behavior.
A bus driver must install protocol interfaces onto every child handle that is creates. At a minimum,
it must install a protocol interface that provides an I/O abstraction of the bus’s services to the child
controllers. If the bus driver creates a child handle that represents a physical device, then the bus
driver must also install a Device Path Protocol instance onto the child handle. A bus driver may
optionally install a Bus Specific Driver Override Protocol onto each child handle. This protocol is
used when drivers are connected to the child controllers. The boot service
ConnectController()
uses architecturally defined precedence rules to choose the best set of
drivers for a given controller. The Bus Specific Driver Override Protocol has higher precedence
than a general driver search algorithm, and lower precedence than platform overrides. An example
of a bus specific driver selection occurs with PCI. A PCI Bus Driver gives a driver stored in a PCI
controller’s option ROM a higher precedence than drivers stored elsewhere in the platform.
Figure 2-13 shows an example child device handle that was created by the XYZ Bus Driver that
supports a bus specific driver override mechanism.
Version 1.1012/01/022-25
Extensible Firmware Interface Specification
Child Device Handle
EFI_DEVICE_PATH_PROTOCOL
EFI_XYZ_I/O_PROTOCOL
Optional
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
Figure 2-13. Child Device Handle with a Bus Specific Override
2.5.6Platform Components
Under the EFI Driver Model, the act of connecting and disconnecting drivers from controllers in a
platform is under the platform firmware’s control. This will typically be implemented as part of the
EFI Boot Manager, but other implementations are possible. The boot services
ConnectController()
firmware to determine which controllers get started and which ones do not. If the platform wishes
to perform system diagnostics or install an operating system, then it may choose to connect drivers
to all possible boot devices. If a platform wishes to boot a preinstalled operating system, it may
choose to only connect drivers to the devices that are required to boot the selected operating
system. The EFI Driver Model supports both these modes of operation through the boot services
ConnectController() and DisconnectController(). In addition, since the platform
component that is in charge of booting the platform has to work with device paths for console
devices and boot options, all of the services and protocols involved in the EFI Driver Model are
optimized with device paths in mind.
and DisconnectController() canbeusedbytheplatform
OM13154
Since the platform firmware may choose to only connect the devices required to produce consoles
and gain access to a boot device, the OS present device drivers cannot assume that an EFI driver for
a device has been executed. The presence of an EFI driver in the system firmware or in an option
ROM does not guarantee that the EFI driver will be loaded, executed, or allowed to manage any
devices in a platform. All OS present device drivers must be able to handle devices that have been
managed by an EFI driver and devices that have not been managed by an EFI driver.
The platform may also choose to produce a protocol named the Platform Driver Override Protocol.
This is similar to the Bus Specific Driver Override Protocol, but it has higher priority. This gives
the platform firmware the highest priority when deciding which drivers are connected to which
controllers. The Platform Driver Override Protocol is attached to a handle in the system. The boot
service ConnectController() will make use of this protocol if it is present in the system.
2-2612/01/02Version 1.10
2.5.7Hot-Plug Events
In the past, system firmware has not had to deal with hot-plug events in the preboot environment.
However, with the advent of buses like USB, where the end user can add and remove devices at any
time, it is important to make sure that it is possible to describe these types of buses in the EFIDriver Model. It is up to the bus driver of a bus that supports the hot adding and removing of
devices to provide support for such events. For these types of buses, some of the platform
management is going to have to move into the bus drivers. For example, when a keyboard is hot
added to a USB bus on a platform, the end user would expect the keyboard to be active. A USB
Bus driver could detect the hot-add event and create a child handle for the keyboard device.
However, because drivers are not connected to controllers unless ConnectController()
called, the keyboard would not become an active input device. Making the keyboard driver active
requires the USB Bus driver to call ConnectController() when a hot-add event occurs. In
addition, the USB Bus Driver would have to call DisconnectController()
remove event occurs.
Device drivers are also affected by these hot-plug events. In the case of USB, a device can be
removed without any notice. This means that the Stop()
have to deal with shutting down a driver for a device that is no longer present in the system. As a
result, any outstanding I/O requests will have to be flushed without actually being able to touch the
device hardware.
functions of USB device drivers will
when a hot-
Overview
is
In general, adding support for hot-plug events greatly increases the complexity of both bus drivers
and device drivers. Adding this support is up to the driver writer, so the extra complexity and size
of the driver will need to be weighed against the need for the feature in the preboot environment.
2.6Requirements
This document is an architectural specification. As such, care has been taken to specify
architecture in ways that allow maximum flexibility in implementation. However, there are certain
requirements on which elements of this specification must be implemented to ensure that operating
system loaders and other code designed to run with EFI boot services can rely upon a consistent
environment.
For the purposes of describing these requirements, the specification is broken up into required and
optional elements. In general, an optional element is completely defined in the section that matches
the element name. For required elements however, the definition may in a few cases not be entirely
self contained in the section that is named for the particular element. In implementing required
elements, care should be taken to cover all the semantics defined in this specification that relate to
the particular element.
Version 1.1012/01/022-27
Extensible Firmware Interface Specification
2.6.1Required Elements
Table 2-5 lists the required elements. Any system that is designed to conform to the EFI
specification must provide a complete implementation of all these elements. This means that all the
required service functions and protocols must be present and the implementation must deliver the
full semantics defined in the specification for all combinations of calls and parameters.
Implementers of EFI applications, drivers or operating system loaders that are designed to run on a
broad range of systems conforming to the EFI specification may assume that all such systems
implement all the required elements.
A system vendor may choose not to implement all the required elements, for example on
specialized system configurations that do not support all the services and functionality implied by
the required elements. However, since most EFI applications, drivers and operating system loaders
are written assuming all the required elements are present on a system that implements the EFI
specification; any such code is likely to require explicit customization to run on a less than
complete implementation of the required elements in the EFI specification.
Table 2-5.Required EFI Implementation Elements
ElementDescription
EFI System Table
EFI Boot ServicesAll functions defined as boot services.
EFI Runtime ServicesAll functions defined as runtime services.
LOADED_IMAGE protocolProvides information on the image.
DEVICE_PATH protocolProvides the location of the device.
DECOMPRESS protocolProtocol interfaces to decompress an image that was
EBC InterpreterAn EFI Byte Code Interpreter is required so EFI images compiled
Provides access to EFI Boot Services, EFI Runtime Services,
consoles, firmware vendor information, and the system
configuration tables.
compressed using the EFI Compression Algorithm.
to EFI Byte Code executables are guaranteed to function on all
EFI compliant platforms. The EBC Interpreter must also produce
the EBC protocol.
2-2812/01/02Version 1.10
2.6.2Platform-Specific Elements
There are a number of EFI elements that can be added or removed depending on the specific
features that a platform requires. Platform firmware developers are required to implement EFI
elements based upon the features included. The following is a list of potential platform features
and the EFI elements that are required for each feature type:
Overview
1. If a platform includes console devices, the Simple Input Protocol
and Simple Text Output
Protocol must be implemented.
2. If a platform includes graphical console devices, then the UGADrawProtocol
and the UGA
I/O Protocol must be implemented. In order to support UGA, a platform must contain a
driver to consume UGA Draw Protocol and produce Simple Text Output Protocol even if the
UGA Draw Protocol is produced by an external driver.
3. If a platform includes a pointer device as part of its console support, the Simple Pointer
Protocol must be implemented.
4. If a platform includes the ability to boot from a disk device, then the Block I/O Protocol
Disk I/O Protocol
,theSimple File System Protocol,andtheUnicode Collation Protocol are
,the
required. In addition, partition support for MBR, GPT, and El Torito must be implemented.
An external driver may produce the Block I/O Protocol. All other protocols required to boot
from a disk device must be carried as part of the platform.
5. If a platform includes the ability to boot from a network device, then the UNDI interface, the
Simple Network Protocol
,andthePXE Base Code Protocol are required. If a platform
includes the ability to validate a boot image received through a network device, the Boot
Integrity Services Protocol is also required. An external driver may produce the UNDI
interface. All other protocols required to boot from a network device must be carried by the
platform.
6. If a platform includes a byte-stream device such as a UART, then the Serial I/O Protocol
must be implemented.
7. If a platform includes PCI bus support, then the PCI Root Bridge I/O Protocol
,thePCI I/O
Protocol,andtheDevice I/O Protocol must be implemented.
8. If a platform includes USB bus support, then the USB Host Controller Protocol
and the USB
I/O Protocol must be implemented. An external device can support USB by producing a
USB Host Controller Protocol.
9. If a platform includes an I/O subsystem that uses SCSI command packets, the SCSI Pass
Thru Protocol must be implemented.
10. If a platform includes debugging capabilities, then the Debug Support Protocol
,theDebug
Port Protocol,andtheDebug Image Info Table must be implemented.
11. If a platform includes the ability to override the default driver to the controller matching
algorithm provided by the EFI Driver Model, then the Platform Driver Override Protocol
must be implemented.
Version 1.1012/01/022-29
Extensible Firmware Interface Specification
2.6.3Driver-Specific Elements
There are a number of EFI elements that can be added or removed depending on the features that a
specific driver requires. Drivers can be implemented by platform firmware developers to support
buses and devices in a specific platform. Drivers can also be implemented by add-in card vendors
for devices that might be integrated into the platform hardware or added to a platform through an
expansion slot. The following list includes possible driver features, and the EFI elements that are
required for each feature type:
1. If a driver follows the EFI 1.10 Driver Model, the EFI Driver Binding Protocol
must be
implemented. It is strongly recommended that all drivers that follow the EFI Driver Model
also implement the Component Name Protocol
.
2. If a driver requires configuration information, the Driver Configuration Protocol must be
implemented. A driver is not allowed to interact with the user unless the Driver
Configuration Protocol is invoked.
3. If a driver requires diagnostics, the Driver Diagnostics Protocol
must be implemented. In
order to support low boot times, limit diagnostics during normal boots. Time consuming
diagnostics should be deferred until the Driver Diagnostics Protocol
is invoked.
4. If a bus supports devices that are able to provide containers for EFI drivers (e.g. option
ROMs), then the bus driver for that bus type must implement the Bus Specific Driver
Override Protocol.
5. If a driver is written for a console output device, then the Simple Text Output Protocol
be implemented.
6. If a driver is written for a graphical console output device, then the UGADrawProtocol
the UGA I/O Protocol
7. If a driver is written for a console input device, then the Simple Input Protocol
must be implemented.
must be
implemented.
8. If a driver is written for a pointer device, then the Simple Pointer Protocol
must be
implemented.
must
and
9. If a driver is written for a network device, then the UNDI interface
10. If a driver is written for a disk device, then the Block I/O Protocol
must be implemented.
must be implemented.
11. If a driver is written for a device that is not a block oriented device but one that can provide a
file system-like interface, then the Simple File System Protocol must be implemented.
12. If a driver is written for a PCI root bridge, then the PCI Root Bridge I/O Protocol
,thePCI I/O
Protocol,andtheDevice I/O Protocol must be implemented.
13. If a driver is written for a USB host controller, then the USB Host Controller Protocol
must
be implemented.
14. If a driver is written for a SCSI controller, then the SCSI Pass Thru Protocol
must be
implemented.
15. If a driver is written for a boot device that is not a block-oriented device, a file system-based
device, or a console device, then the Load File Protocol
2-3012/01/02Version 1.10
must be implemented.
3
Boot Manager
The EFI boot manager is a firmware policy engine that can be configured by modifying
architecturally defined global NVRAM variables. The boot manager will attempt to load EFI
drivers and EFI applications (including EFI OS boot loaders) in an order defined by the global
NVRAM variables. The platform firmware must use the boot order specified in the global
NVRAM variables for normal boot. The platform firmware may add extra boot options or remove
invalid boot options from the boot order list.
The platform firmware may also implement value added features in the boot manager if an
exceptional condition is discovered in the firmware boot process. One example of a value added
feature would be not loading an EFI driver if booting failed the first time the driver was loaded.
Another example would be booting to an OEM-defined diagnostic environment if a critical error
was discovered in the boot process.
The boot sequence for EFI consists of the following:
• The boot order list is read from a globally defined NVRAM variable. The boot order list
defines a list of NVRAM variables that contain information about what is to be booted. Each
NVRAM variable defines a Unicode name for the boot option that can be displayed to a user.
• The variable also contains a pointer to the hardware device and to a file on that hardware device
that contains the EFI image to be loaded.
• The variable might also contain paths to the OS partition and directory along with other
configuration specific directories.
The NVRAM can also contain load options that are passed directly to the EFI image. The platform
firmware has no knowledge of what is contained in the load options. The load options are set by
higher level software when it writes to a global NVRAM variable to set the platform firmware boot
policy. This information could be used to define the location of the OS kernel if it was different
than the location of the EFI OS loader.
3.1 Firmware Boot Manager
The boot manager is a component in the EFI firmware that determines which EFI drivers and EFI
applications should be explicitly loaded and when. Once the EFI firmware is initialized, it passes
control to the boot manager. The boot manager is then responsible for determining what to load
and any interactions with the user that may be required to make such a decision. Much of the
behavior of the boot manager is left up to the firmware developer to decide, and details of boot
manager implementation are outside the scope of this specification. In particular, likely
implementation options might include any console interface concerning boot, integrated platform
management of boot selections, possible knowledge of other internal applications or recovery
drivers that may be integrated into the system through the boot manager.
Version 1.10 12/01/02 3-1
Extensible Firmware Interface Specification
Programmatic interaction with the boot manager is accomplished through globally defined
variables. On initialization the boot manager reads the values which comprise all of the published
load options among the EFI environment variables. By using the SetVariable()
function the
data that contain these environment variables can be modified.
Each load option entry resides in a Boot#### variable or a Driver#### variable where the
#### is replaced by a unique option number in printable hexadecimal representation using the
digits 0–9, and the upper case versions of the characters A–F (0000–FFFF). The #### must
always be four digits, so small numbers must use leading zeros. The load options are then logically
ordered by an array of option numbers listed in the desired order. There are two such option
ordering lists. The first is DriverOrder that orders the Driver#### load option variables into
their load order. The second is BootOrder that orders the Boot#### load options variables into
their load order.
For example, to add a new boot option, a new Boot#### variable would be added. Then the
option number of the new Boot#### variable would be added to the BootOrder ordered list and
the BootOrder variable would be rewritten. To change boot option on an existing Boot####,
only the Boot#### variable would need to be rewritten. A similar operation would be done to
add, remove, or modify the driver load list.
If the boot via Boot#### returns with a status of EFI_SUCCESS the boot manager will stop
processing the BootOrder variable and present a boot manager menu to the user. If a boot via
Boot#### returns a status other than EFI_SUCCESS, the boot has failed and the next
Boot#### in the BootOrder variable will be tried until all possibilities are exhausted.
The boot manager may perform automatic maintenance of the database variables. For example, it
may remove unreferenced load option variables, any unparseable or unloadable load option
variables, and rewrite any ordered list to remove any load options that do not have corresponding
load option variables. In addition, the boot manager may automatically update any ordered list to
place any of its own load options where it desires. The boot manager can also, at its own
discretion, provide for manual maintenance operations as well. Examples include choosing the
order of any or all load options, activating or deactivating load options, etc.
The boot manager is required to process the Driver load option entries before the Boot load option
entries. The boot manager is also required to initiate a boot of the boot option specified by the
BootNext variable as the first boot option on the next boot, and only on the next boot. The boot
manager removes the BootNext variable before transferring control to the BootNext boot
option. If the boot from the BootNext boot option fails the boot sequence continues utilizing the
BootOrder variable. If the boot from the BootNext boot option succeeds by returning
EFI_SUCCESS the boot manager will not continue to boot utilizing the BootOrder variable.
The boot manager must call LoadImage()
and LOAD_FILE_PROTOCOL
for resolving load options. If LoadImage() succeeds, the boot
manager must enable the watchdog timer for 5 minutes by using the SetWatchdogTimer()
boot service prior to calling StartImage()
which supports at least SIMPLE_FILE_PROTOCOL
. If a boot option returns control to the boot manager,
the boot manager must disable the watchdog timer with an additional call to the
SetWatchdogTimer() boot service.
3-2 12/01/02 Version 1.10
Boot Manager
If the boot image is not loaded via LoadImage() the boot manager is required to check for a
default application to boot. Searching for a default application to boot happens on both removable
and fixed media types. This search occurs when the device path of the boot image listed in any boot
option points directly to a SIMPLE_FILE_SYSTEM device and does not specify the exact file to
load. The file discovery method is explained in “Boot Option Variables Default Behavior” starting
on page 2-7 of this chapter. The default media boot case of a protocol other than
SIMPLE_FILE_SYSTEM is handled by the LOAD_FILE_PROTOCOL
for the target device path
and does not need to be handled by the boot manager.
The boot manager must also support booting from a short-form device path that starts with the first
element being a hard drive media device path (see Table 8-24, “Hard Drive Media Device Path” in
Chapter 8). The boot manager must use the GUID or signature and partition number in the hard
drive device path to match it to a device in the system. If the drive supports the GPT partitioning
scheme the GUID in the hard drive media device path is compared with the
UniquePartitionGuid field of the GUID Partition Entry (see Table 11-2 in Chapter 11). If
the drive supports the PC-AT MBR scheme the signature in the hard drive media device path is
compared with the UniqueMBRSignature in the Legacy Master Boot Record (see Table 11-5 in
Chapter 11). If a signature match is made, then the partition number must also be matched. The
hard drive device path can be appended to the matching hardware device path and normal boot
behavior can then be used. If more than one device matches the hard drive device path, the boot
manager will pick one arbitrarily. Thus the operating system must ensure the uniqueness of the
signatures on hard drives to guarantee deterministic boot behavior.
Each load option variable contains an EFI_LOAD_OPTION descriptor that is a byte packed buffer
of variable length fields. Since some of the fields are variable length, an EFI_LOAD_OPTION
cannot be described as a standard C data structure. Instead, the fields are listed below in the order
that they appear in an EFI_LOAD_OPTION descriptor:
Attributes The attributes for this load option entry. All unused bits must be
zero and are reserved by the EFI specification for future growth.
See “Related Definitions.”
FilePathListLength Length in bytes of the FilePathList. OptionalData
starts at offset sizeof(UINT32) + sizeof(UINT16) +
StrSize(Description) + FilePathListLength of
the EFI_LOAD_OPTION descriptor.
Description The user readable description for the load option. This field ends
with a Null Unicode character.
Version 1.10 12/01/02 3-3
Extensible Firmware Interface Specification
FilePathList A packed array of EFI device paths. The first element of the
array is an EFI device path that describes the device and location
of the Image for this load option. The FilePathList[0] is
specific to the device type. Other device paths may optionally
exist in the FilePathList, but their usage is OSV specific.
Each element in the array is variable length, and ends at the
device path end structure. Because the size of Description
is arbitrary, this data structure is not guaranteed to be aligned on
a natural boundary. This data structure may have to be copied to
an aligned natural boundary before it is used.
OptionalData The remaining bytes in the load option descriptor are a binary
data buffer that is passed to the loaded image. If the field is zero
bytes long, a Null pointer is passed to the loaded image. The
number of bytes in OptionalData can be computed by
subtracting the starting offset of OptionalData from total
size in bytes of the EFI_LOAD_OPTION.
Calling SetVariable() creates a load option. The size of the load option is the same as the size
of the DataSize argument to the SetVariable() call that created the variable. When
creating a new load option, all undefined attribute bits must be written as zero. When updating a
load option, all undefined attribute bits must be preserved. If a load option is not marked as
LOAD_OPTION_ACTIVE, the boot manager will not automatically load the option. This
provides an easy way to disable or enable load options without needing to delete and re-add them.
If any Driver#### load option is marked as LOAD_OPTION_FORCE_RECONNECT, then all of
the EFI drivers in the system will be disconnected and reconnected after the last Driver####
load option is processed. This allows an EFI driver loaded with a Driver#### load option to
override an EFI driver that was loaded prior to the execution of the EFI Boot Manager.
3-4 12/01/02 Version 1.10
Boot Manager
3.2 Globally-Defined Variables
This section defines a set of variables that have architecturally defined meanings. In addition to the
defined data content, each such variable has an architecturally defined attribute that indicates when
the data variable may be accessed. The variables with an attribute of NV are nonvolatile. This
means that their values are persistent across resets and power cycles. The value of any environment
variable that does not have this attribute will be lost when power is removed from the system and
the state of firmware reserved memory is not otherwise preserved. The variables with an attribute of
BS are only available before ExitBootServices()
environment variables can only be retrieved or modified in the preboot environment. They are not
visible to an operating system. Environment variables with an attribute of RT are available before
and after ExitBootServices() is called. Environment variables of this type can be retrieved
and modified in the preboot environment, and from an operating system. All architecturally
defined variables use the EFI_GLOBAL_VARIABLEVendorGuid:
#define EFI_GLOBAL_VARIABLE \
{8BE4DF61-93CA-11d2-AA0D-00E098032B8C}
To prevent name collisions with possible future globally defined variables, other internal firmware
data variables that are not defined here must be saved with a unique VendorGuid other than
EFI_GLOBAL_VARIABLE. Table 3-1 lists the global variables.
is called. This means that these
Table 3-1 Global Variables
Variable Name Attribute Description
LangCodes BS, RT The language codes that the firmware supports.
Lang NV, BS, RT The language code that the system is configured for.
Timeout NV, BS, RT The firmware’s boot managers timeout, in seconds,
ConIn NV, BS, RT The device path of the default input console.
ConOut NV, BS, RT The device path of the default output console.
ErrOut NV, BS, RT The device path of the default error output device.
ConInDev BS, RT The device path of all possible console input devices.
ConOutDev BS, RT The device path of all possible console output devices.
ErrOutDev BS, RT The device path of all possible error output devices.
Boot#### NV, BS, RT A boot load option. #### is a printed hex value. No 0x
BootOrder NV, BS, RT The ordered boot option load list.
BootNext NV, BS, RT The boot option for the next boot only.
BootCurrent BS, RT The boot option that was selected for the current boot.
Driver#### NV, BS, RT A driver load option. #### is a printed hex value.
DriverOrder NV, BS, RT The ordered driver load option list.
before initiating the default boot selection.
or h is included in the hex value.
Version 1.10 12/01/02 3-5
Extensible Firmware Interface Specification
The LangCodes variable contains an array of 3-character (8-bit ASCII characters)
ISO-639-2 language codes that the firmware can support. At initialization time the firmware
computes the supported languages and creates this data variable. Since the firmware creates this
value on each initialization, its contents are not stored in nonvolatile memory. This value is
considered read-only.
The Lang variable contains the 3-character (8-bit ASCII characters) ISO-639-2 language code that
the machine has been configured for. This value may be changed to any value supported by
LangCodes; however, the change does not take effect until the next boot. If the language code is
set to an unsupported value, the firmware will choose a supported default at initialization and set
Lang to a supported value.
The Timeout variable contains a binary UINT16 that supplies the number of seconds that the
firmware will wait before initiating the original default boot selection. A value of 0 indicates that
the default boot selection is to be initiated immediately on boot. If the value is not present, or
contains the value of 0xFFFF then firmware will wait for user input before booting. This means the
default boot selection is not automatically started by the firmware.
The ConIn, ConOut, and ErrOut variables each contain an EFI_DEVICE_PATH
descriptor
that defines the default device to use on boot. Changes to these values do not take effect until the
next boot. If the firmware cannot resolve the device path, it is allowed to automatically replace the
value(s) as needed to provide a console for the system.
The ConInDev, ConOutDev, and ErrOutDev variables each contain an EFI_DEVICE_PATH
descriptor that defines all the possible default devices to use on boot. These variables are volatile,
and are set dynamically on every boot. ConIn, ConOut, and ErrOut are always proper subsets
of ConInDev, ConOutDev, and ErrOutDev.
Each Boot#### variable contains an EFI_LOAD_OPTION. Each Boot#### variable is the
name “Boot” appended with a unique four digit hexadecimal number. For example, Boot0001,
Boot0002, Boot0A02, etc.
The BootOrder variable contains an array of UINT16’s that make up an ordered list of the
Boot#### options. The first element in the array is the value for the first logical boot option, the
second element is the value for the second logical boot option, etc. The BootOrder order list is
used by the firmware’s boot manager as the default boot order.
The BootNext variable is a single UINT16 that defines the Boot#### option that is to be tried
first on the next boot. After the BootNext boot option is tried the normal BootOrder list is
used. To prevent loops, the boot manager deletes this variable before transferring control to the
preselected boot option.
The BootCurrent variable is a single UINT16 that defines the Boot#### option that was
selected on the current boot.
Each Driver#### variable contains an EFI_LOAD_OPTION. Each load option variable is
appended with a unique number, for example Driver0001, Driver0002, etc.
The DriverOrder variable contains an array of UINT16’s that make up an ordered list of the
Driver#### variable. The first element in the array is the value for the first logical driver load
option, the second element is the value for the second logical driver load option, etc. The
DriverOrder list is used by the firmware’s boot manager as the default load order for EFI
drivers that it should explicitly load.
3-6 12/01/02 Version 1.10
Boot Manager
3.3 Boot Option Variables Default Behavior
The default state of globally-defined variables is firmware vendor specific. However the boot
options require a standard default behavior in the exceptional case that valid boot options are not
present on a platform. The default behavior must be invoked any time the BootOrder variable
does not exist or only points to nonexistent boot options.
If no valid boot options exist, the boot manager will enumerate all removable EFI media devices
followed by all fixed EFI media devices. The order within each group is undefined. These new
default boot options are not saved to non volatile storage. The boot manger will then attempt to
boot from each boot option. If the device supports the SIMPLE_FILE_SYSTEM
the removable media boot behavior (see section 3.4.1.1) is executed. Otherwise the firmware will
attempt to boot the device via the LOAD_FILE
It is expected that this default boot will load an operating system or a maintenance utility. If this is
an operating system setup program it is then responsible for setting the requisite environment
variables for subsequent boots. The platform firmware may also decide to recover or set to a
known set of boot options.
protocol .
protocol then
3.4 Boot Mechanisms
EFI can boot from a device using the SIMPLE_FILE_SYSTEM protocol or the LOAD_FILE
protocol. A device that supports the SIMPLE_FILE_SYSTEM protocol must materialize a file
system protocol for that device to be bootable. If a device does not wish to support a complete file
system it may produce a LOAD_FILE protocol which allows it to materialize an image directly.
The Boot Manager will attempt to boot using the SIMPLE_FILE_SYSTEM protocol first. If that
fails, then the LOAD_FILE protocol will be used.
3.4.1 Boot via Simple File Protocol
When booting via the SIMPLE_FILE_SYSTEM protocol, the FilePath will start with a
device path that points to the device that “speaks” the SIMPLE_FILE_SYSTEM protocol. The
next part of the FilePath will point to the file name, including sub directories that contain the
bootable image. If the file name is a null device path, the file name must be discovered on the
media using the rules defined for removable media devices with ambiguous file names (see
section 3.4.1.1 below).
The format of the file system specified by EFI is contained in Chapter 11. While the firmware must
produce a SIMPLE_FILE_SYSTEM protocol that understands the EFI file system, any file system
can be abstracted with the SIMPLE_FILE_SYSTEM protocol interface.
3.4.1.1 Removable Media Boot Behavior
On a removable media device it is not possible for the FilePath to contain a file name, including
sub directories. The FilePath is stored in non volatile memory in the platform and cannot
possibly be kept in sync with a media that can change at any time. A FilePath for a removable
media device will point to a device that “speaks” the SIMPLE_FILE_SYSTEM protocol. The
FilePath will not contain a file name or sub directories.
Version 1.10 12/01/02 3-7
Extensible Firmware Interface Specification
The system firmware will attempt to boot from a removable media FilePath by adding a default
file name in the form \EFI\BOOT\BOOT{machine type short-name}.EFI. Where machine type
short-name defines a PE32+ image format architecture. Each file only contains one EFI image
type, and a system may support booting from one or more images types. Table 3-2 lists the EFI
image types.
Table 3-2 EFI Image Types
Architecture File name convention PE Executable machine type *
IA-32 BOOTIA32.EFI 0x14c
Itanium architecture BOOTIA64.EFI 0x200
Note: * The PE Executable machine type is contained in the machine field of the COFF file header as
defined in the Microsoft Portable Executable and Common Object File Format Specification,
Revision 6.0
A media may support multiple architectures by simply having a \EFI\BOOT\BOOT{machine type
short-name}.EFI file of each possible machine type.
3.4.2 Boot via LOAD_FILE Protocol
When booting via the LOAD_FILE protocol, the FilePath is a device path that points to a
device that “speaks” the LOAD_FILE protocol. The image is loaded directly from the device that
supports the LOAD_FILE protocol. The remainder of the FilePath will contain information that
is specific to the device. EFI firmware passes this device-specific data to the loaded image, but
does not use it to load the image. If the remainder of the FilePath is a null device path it is the
loaded image's responsibility to implement a policy to find the correct boot device.
The LOAD_FILE protocol is used for devices that do not directly support file systems. Network
devices commonly boot in this model where the image is materialized without the need of a file
system.
3.4.2.1 Network Booting
Network booting is described by the Preboot eXecution Environment (PXE) BIOS Support
Specification that is part of the Wired for Management Baseline specification. PXE specifies UDP,
DHCP, and TFTP network protocols that a booting platform can use to interact with an intelligent
system load server. EFI defines special interfaces that are used to implement PXE. These
interfaces are contained in the PXE_BASE_CODE protocol (Chapter 15).
3.4.2.2 Future Boot Media
Since EFI defines an abstraction between the platform and the OS and its loader it should be
possible to add new types of boot media as technology evolves. The OS loader will not necessarily
have to change to support new types of boot. The implementation of the EFI platform services
may change, but the interface will remain constant. The OS will require a driver to support the
new type of boot media so that it can make the transition from EFI boot services to OS control of
the boot media.
3-8 12/01/02 Version 1.10
EFI System Table
This chapter describes the entry point to an EFI image and the parameters that are passed to that
entry point. There are three types of EFI images that can be loaded and executed by EFI firmware.
These are EFI Applications, EFI OS Loaders, and EFI Drivers. There are no differences in the
entry point for these three image types.
4.1 EFI Image Entry Point
The most significant parameter that is passed to an EFI image is a pointer to the EFI System Table.
This pointer is EFI_IMAGE_ENTRY_POINT (see definition immediately below), the main entry
point for an EFI Image. The EFI System Table contains pointers to the active console devices, a
pointer to the EFI Boot Services Table, a pointer to the EFI Runtime Services Table, and a pointer
to the list of system configuration tables such as ACPI, SMBIOS, and the SAL System Table. This
chapter describes the EFI System Table in detail.
4
EFI_IMAGE_ENTRY_POINT
Summary
This is the main entry point for an EFI Image. This entry point is the same for EFI Applications,
EFI OS Loaders, and EFI Drivers including both device drivers and bus drivers.
Prototype
typedef
EFI_STATUS
(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
Parameters
ImageHandle The firmware allocated handle for the EFI image.
SystemTable A pointer to the EFI System Table.
Description
This function is the entry point to an EFI image. An EFI image is loaded and relocated in system
memory by the EFI Boot Service LoadImage()
Service StartImage()
Version 1.10 12/01/02 4-1
.
. An EFI image is invoked through the EFI Boot
Extensible Firmware Interface Specification
The first argument is the image’s image handle. The second argument is a pointer to the image’s
system table. The system table contains the standard output and input handles, plus pointers to the
EFI_BOOT_SERVICES
and EFI_RUNTIME_SERVICES tables. The service tables contain the
entry points in the firmware for accessing the core EFI system functionality. The handles in the
system table are used to obtain basic access to the console. In addition, the EFI system table
contains pointers to other standard tables that a loaded image may use if the associated pointers are
initialized to nonzero values. Examples of such tables are ACPI, SMBIOS, SAL System Table, etc.
The ImageHandle is a firmware-allocated handle that is used to identify the image on various
functions. The handle also supports one or more protocols that the image can use. All images
support the EFI_LOADED_IMAGE
protocol that returns the source location of the image, the
memory location of the image, the load options for the image, etc. The exact
EFI_LOADED_IMAGE structure is defined in Chapter 7.
If the EFI image is an EFI Application, then the EFI Application executes and either returns or calls
the EFI Boot Services Exit()
. An EFI Application is always unloaded from memory when it
exits, and its return status is returned to the component that started the EFI Application.
If the EFI image is an EFI OS Loader, then the EFI OS Loader executes and either returns, calls the
EFI Boot Service Exit(), or calls the EFI Boot Service ExitBootServices()
. If the EFI
OS Loader returns or calls Exit(), then the load of the OS has failed, and the EFI OS Loader is
unloaded from memory and control is returned to the component that attempted to boot the EFI OS
Loader. If ExitBootServices() is called, then the OS Loader has taken control of the
platform, and EFI will not regain control of the system until the platform is reset. One method of
resetting the platform is through the EFI Runtime Service ResetSystem()
.
If the EFI image is an EFI Driver, then the EFI Driver executes and either returns or calls the EFI
Boot Service Exit(). If an EFI driver returns an error, then the driver is unloaded from memory.
If the EFI driver returns EFI_SUCCESS, then it stays resident in memory. If the EFI Driver does
not follow the EFI Driver Model, then it performs any required initialization and installs its
protocol services before returning. If the EFI driver does
follow the EFI Driver Model, then the
entry point is not allowed to touch any device hardware. Instead, the entry point is required to
create and install the EFI_DRIVER_BINDING_PROTOCOL
(Chapter 9) on the ImageHandle
of the EFI Driver. If this process is completed, then EFI_SUCCESS is returned. If the resources
are not available to complete the driver initialization, then EFI_OUT_OF_RESOURCES
is returned.
Status Codes Returned
EFI_SUCCESS
EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
The driver was initialized
.
4-2 12/01/02 Version 1.10
EFI System Table
4.2 EFI Table Header
The data type EFI_TABLE_HEADER is the data structure that precedes all of the standard EFI
table types. It includes a signature that is unique for each table type, a revision of the table that may
be updated as extensions are added to the EFI table types, and a 32-bit CRC so a consumer of an
EFI table type can validate the contents of the EFI table.
EFI_TABLE_HEADER
Summary
Data structure that precedes all of the standard EFI table types.
Signature A 64-bit signature that identifies the type of table that follows.
Unique signatures have been generated for the EFI System Table,
the EFI Boot Services Table, and the EFI Runtime Services Table.
Revision The revision of the EFI Specification to which this table conforms.
The upper 16 bits of this field contain the major revision value, and
the lower 16 bits contain the minor revision value. The minor
revision values are limited to the range of 00..99.
HeaderSize The size, in bytes, of the entire table including the
EFI_TABLE_HEADER.
CRC32 The 32-bit CRC for the entire table. This value is computed by
setting this field to 0, and computing the 32-bit CRC for
HeaderSize bytes.
Reserved Reserved field that must be set to 0.
NOTE
The size of the EFI system table, runtime services table, and boot services table may increase over
time. It is very important to always use the HeaderSize field of the EFI_TABLE_HEADER to
determine the size of these tables.
Version 1.10 12/01/02 4-3
Extensible Firmware Interface Specification
4.3 EFI System Table
The EFI System Table contains pointers to the runtime and boot services tables. The definition for
this table is shown in the following code fragments. Except for the table header, all elements in the
service tables are prototypes of function pointers to functions as defined in Chapters 5 and 6. Prior
to a call to ExitBootServices()
operating system has taken control of the platform with a call to ExitBootServices(), only
the Hdr, FirmwareVendor, FirmwareRevision, RuntimeServices,
NumberOfTableEntries, and ConfigurationTable fields are valid.
, all of the fields of the EFI System Table are valid. After an
EFI_SYSTEM_TABLE
Summary
Contains pointers to the runtime and boot services tables.
Hdr The table header for the EFI System Table. This header contains
the EFI_SYSTEM_TABLE_SIGNATURE and
EFI_SYSTEM_TABLE_REVISION values along with the size
of the EFI_SYSTEM_TABLE structure and a 32-bit CRC to
verify that the contents of the EFI System Table are valid.
FirmwareVendor A pointer to a null terminated Unicode string that identifies the
vendor that produces the system firmware for the platform.
FirmwareRevision A firmware vendor specific value that identifies the revision of
the system firmware for the platform.
ConsoleInHandle The handle for the active console input device. This handle must
support the SIMPLE_INPUT_PROTOCOL
ConIn A pointer to the SIMPLE_INPUT_PROTOCOL interface that is
associated with ConsoleInHandle.
ConsoleOutHandle The handle for the active console output device. This handle
must support the SIMPLE_TEXT_OUTPUT_PROTOCOL
.
.
ConOut A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL
interface that is associated with ConsoleOutHandle.
StandardErrorHandle The handle for the active standard error console device. This
handle must support the
SIMPLE_TEXT_OUTPUT_PROTOCOL.
StdErr A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL
interface that is associated with StandardErrorHandle.
RuntimeServices A pointer to the EFI Runtime Services Table. See Section 4.5.
BootServices A pointer to the EFI Boot Services Table. See Section 4.4.
NumberOfTableEntries The number of system configuration tables in the buffer
ConfigurationTable.
ConfigurationTable A pointer to the system configuration tables. The number of
entries in the table is NumberOfTableEntries.
Version 1.10 12/01/02 4-5
Extensible Firmware Interface Specification
4.4 EFI Boot Services Table
The EFI Boot Services Table contains a table header and pointers to all of the boot services. The
definition for this table is shown in the following code fragments. Except for the table header, all
elements in the EFI Boot Services Tables are prototypes of function pointers to functions as defined
in Chapters 5. The function pointers in this table are not valid after the operating system has taken
control of the platform with a call to ExitBootServices()
.
EFI_BOOT_SERVICES
Summary
Contains a table header and pointers to all of the boot services.
//
// Open and Close Protocol Services
//
EFI_OPEN_PROTOCOL OpenProtocol;
EFI_CLOSE_PROTOCOL CloseProtocol;
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
Hdr The table header for the EFI Boot Services Table. This
header contains the EFI_BOOT_SERVICES_
SIGNATURE and EFI_BOOT_SERVICES_
REVISION values along with the size of the
EFI_BOOT_SERVICES_TABLE structure and a 32-bit
CRC to verify that the contents of the EFI Boot Services
Table are valid.
RaiseTPL Raises the task priority level.
RestoreTPL Restores/lowers the task priority level.
AllocatePages Allocates pages of a particular type.
FreePages Frees allocated pages.
GetMemoryMap Returns the current boot services memory map and
memory map key.
AllocatePool Allocates a pool of a particular type.
FreePool Frees allocated pool.
CreateEvent Creates a general-purpose event structure.
SetTimer Sets an event to be signaled at a particular time.
WaitForEvent Stops execution until an event is signaled.
SignalEvent Signals an event.
CloseEvent Closes and frees an event structure.
4-8 12/01/02 Version 1.10
EFI System Table
CheckEvent Checks whether an event is in the signaled state.
InstallProtocolInterface Installs a protocol interface on a device handle.
ReinstallProtocolInterface Reinstalls a protocol interface on a device handle.
UninstallProtocolInterface Removes a protocol interface from a device handle.
HandleProtocol Queries a handle to determine if it supports a specified
protocol.
Reserved Reserved. Must be NULL.
RegisterProtocolNotify Registers an event that is to be signaled whenever an
interface is installed for a specified protocol.
LocateHandle Returns an array of handles that support a specified
protocol.
LocateDevicePath Locates all devices on a device path that support a
specified protocol and returns the handle to the device
that is closest to the path.
InstallConfigurationTable Adds, updates, or removes a configuration table from the
EFI System Table.
LoadImage Loads an EFI image into memory.
StartImage Transfers control to a loaded image’s entry point.
Exit Exits the image’s entry point.
UnloadImage Unloads an image.
ExitBootServices Terminates boot services.
GetNextMonotonicCount Returns a monotonically increasing count for the
platform.
Stall Stalls the processor.
SetWatchdogTimer Resets and sets a watchdog timer used during boot
services time.
ConnectController Uses a set of precedence rules to find the best set of
drivers to manage a controller.
DisconnectController Informs a set of drivers to stop managing a controller.
OpenProtocol Adds elements to the list of agents consuming a protocol
interface.
CloseProtocol Removes elements from the list of agents consuming a
protocol interface.
Version 1.10 12/01/02 4-9
Extensible Firmware Interface Specification
OpenProtocolInformation Retrieve the list of agents that are currently consuming a
protocol interface.
ProtocolsPerHandle Retrieves the list of protocols installed on a handle. The
return buffer is automatically allocated.
LocateHandleBuffer Retrieves the list of handles from the handle database
that meet the search criteria. The return buffer is
automatically allocated.
LocateProtocol Finds the first handle in the handle database the supports
the requested protocol.
InstallMultipleProtocolInterfaces
Installs one or more protocol interfaces onto a handle.
UninstallMultipleProtocolInterfaces
Uninstalls one or more protocol interfaces from a
handle.
CalculateCrc32 Computes and returns a 32-bit CRC for a data buffer.
CopyMem Copies the contents of one buffer to another buffer.
SetMem Fills a buffer with a specified value.
4-10 12/01/02 Version 1.10
EFI System Table
4.5 EFI Runtime Services Table
The EFI Runtime Services Table contains a table header and pointers to all of the runtime services.
The definition for this table is shown in the following code fragments. Except for the table header,
all elements in the EFI Runtime Services Tables are prototypes of function pointers to functions as
defined in Chapters 6. Unlike the EFI Boot Services Table, this table, and the function pointers it
contains are valid after the operating system has taken control of the platform with a call to
ExitBootServices()
the function pointers in this table are fixed up to point to the new virtually mapped entry points.
. If a call to SetVirtualAddressMap() is made by the OS, then
EFI_RUNTIME_SERVICES
Summary
Contains a table header and pointers to all of the runtime services.
Hdr The table header for the EFI Runtime Services Table.
This header contains the EFI_RUNTIME_SERVICES_
SIGNATURE and EFI_RUNTIME_SERVICES_
REVISION values along with the size of the
EFI_RUNTIME_SERVICES_TABLE structure and a
32-bit CRC to verify that the contents of the EFI
Runtime Services Table are valid.
GetTime Returns the current time and date, and the time-keeping
capabilities of the platform.
SetTime Sets the current local time and date information.
GetWakeupTime Returns the current wakeup alarm clock setting.
SetWakeupTime Sets the system wakeup alarm clock time.
SetVirtualAddressMap Used by an OS loader to convert from physical
addressing to virtual addressing.
ConvertPointer Used by EFI components to convert internal pointers
when switching to virtual addressing.
GetVariable Returns the value of a variable.
GetNextVariableName Enumerates the current variable names.
SetVariable Sets the value of a variable.
GetNextHighMonotonicCount Returns the next high 32 bits of the platform’s
monotonic counter.
ResetSystem Resets the entire platform.
4-12 12/01/02 Version 1.10
EFI System Table
4.6 EFI Configuration Table
The EFI Configuration Table is the ConfigurationTable field in the EFI System Table. This
table contains a set of GUID/pointer pairs. Each element of this table is described by the
EFI_CONFIGURATION_TABLE structure below. The number of types of configuration tables is
expected to grow over time. This is why a GUID is used to identify the configuration table type.
The EFI Configuration Table may contain at most once instance of each table type. The list of
current configuration table types is also listed below.
EFI_CONFIGURATION_TABLE
Summary
Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the EFI
System Table.
The examples in the following sections show how the various table examples are presented in
the EFI environment.
4.7.1 EFI Image Entry Point Examples
The following example shows the EFI image entry point for an EFI Application. This
application makes use of the EFI System Table, the EFI Boot Services Table, and the EFI
Runtime Services Table.
//
// Use EFI System Table to print “Hello World” to the active console output
// device.
//
Status = gST->ConOut->OutputString (gST->ConOut, L”Hello World\n\r”);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Use EFI Boot Services Table to allocate a buffer to store the current time
// and date.
//
Status = gBS->AllocatePool (
EfiBootServicesData,
sizeof (EFI_TIME),
(VOID **)&Time
);
if (EFI_ERROR (Status)) {
return Status;
}
4-14 12/01/02 Version 1.10
EFI System Table
//
// Use the EFI Runtime Services Table to get the current time and date.
//
Status = gRT->GetTime (&Time, NULL)
if (EFI_ERROR (Status)) {
return Status;
}
return Status;
}
The following example shows the EFI image entry point for an EFI Driver that does not follow the
EFI Driver Model. Since this driver returns EFI_SUCCESS, it will stay resident in memory after
The following example shows the EFI image entry point for an EFI Driver that also does not follow
the EFI Driver Model. Since this driver returns EFI_DEVICE_ERROR, it will not stay resident in
The following is an EFI Driver Model example that shows the driver initialization routine for the
ABC device controller that is on the XYZ bus. The EFI_DRIVER_BINDING_PROTOCOL
defined in Chapter 9. The function prototypes for the AbcSupported()
AbcStop()
functions are defined in Section 9.1. This function saves the driver’s image handle
, AbcStart(), and
and a pointer to the EFI boot services table in global variables, so the other functions in the same
driver can have access to these values. It then creates an instance of the
EFI_DRIVER_BINDING_PROTOCOL and installs it onto the driver's image handle.
The following is the same EFI Driver Model example as above, except it also includes the code
required to allow the driver to be unloaded through the boot service Unload()
installed or memory allocated in AbcEntryPoint() must be uninstalled or freed in the
Status = gBS->InstallMultipleProtocolInterfaces(
&mAbcDriverBindingA->DriverBindingHandle,
&gEfiDriverBindingProtocolGuid, &mAbcDriverBindingA,
NULL
);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install mAbcDriverBindingB onto a newly created handle
//
mAbcDriverBindingB->ImageHandle = ImageHandle;
mAbcDriverBindingB->DriverBindingHandle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces(
&mAbcDriverBindingB->DriverBindingHandle,
&gEfiDriverBindingProtocolGuid, &mAbcDriverBindingB,
NULL
);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Install mAbcDriverBindingC onto a newly created handle
//
mAbcDriverBindingC->ImageHandle = ImageHandle;
mAbcDriverBindingC->DriverBindingHandle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces(
&mAbcDriverBindingC->DriverBindingHandle,
&gEfiDriverBindingProtocolGuid, &mAbcDriverBindingC,
NULL
);
return Status;
}
Version 1.10 12/01/02 4-19
Version 1.10 12/01/02 4-20
5
Services — Boot Services
This chapter discusses the fundamental boot services that are present in an EFI-compliant system.
The services are defined by interface functions that may be used by code running in the EFI
environment. Such code may include protocols that manage device access or extend platform
capability, as well as EFI applications running in the preboot environment and EFI OS loaders.
TwotypesofservicesapplyinanEFI-compliantsystem:
• Boot Services. Functions that are available before a successful call to
ExitBootServices()
• Runtime Services. Functions that are available before and after any call to
ExitBootServices(). These functions are described in Chapter 6.
During boot, system resources are owned by the firmware and are controlled through boot services
interface functions. These functions can be characterized as “global” or “handle-based.” The term
“global” simply means that a function accesses system services and is available on all platforms
(since all platforms support all system services). The term “handle-based” means that the function
accesses a specific device or device functionality and may not be available on some platforms
(since some devices are not available on some platforms). Protocols are created dynamically. This
chapter discusses the “global” functions and runtime functions; subsequent chapters discuss the
“handle-based.”
EFI applications (including OS loaders) must use boot services functions to access devices and
allocate memory. On entry, an EFI Image is provided a pointer to an EFI system table which
contains the Boot Services dispatch table and the default handles for accessing the console. All
boot services functionality is available until an EFI OS loader loads enough of its own environment
to take control of the system’s continued operation and then terminates boot services with a call to
ExitBootServices().
. These functions are described in this chapter.
In principle, the ExitBootServices() call is intended for use by the operating system to
indicate that its loader is ready to assume control of the platform and all platform resource
management. Thus boot services are available up to this point to assist the OS loader in preparing
to boot the operating system. Once the OS loader takes control of the system and completes the
operating system boot process, only runtime services may be called. Code other than the OS
loader, however, may or may not choose to call ExitBootServices(). This choice may in
part depend upon whether or not such code is designed to make continued use of EFI boot services
or the boot services environment.
Version 1.1012/01/025-1
Extensible Firmware Interface Specification
The rest of this chapter discusses individual functions. Global boot services functions fall into
these categories:
• Event, Timer, and Task Priority Services (Section 5.1)
• Memory Allocation Services (Section 5.2)
• Protocol Handler Services (Section 5.3)
• Image Services (Section 5.4)
• Miscellaneous Services (Section 5.5)
5.1Event, Timer, and Task Priority Services
The functions that make up the Event, Timer, and Task Priority Services are used during preboot to
create, close, signal, and wait for events; to set timers; and to raise and restore task priority levels.
See Table 5-1.
Table 5-1.Event, Timer, and Task Priority Functions
NameTypeDescription
CreateEventBootCreates a general-purpose event structure.
CloseEventBootCloses and frees an event structure.
SignalEventBootSignals an event.
WaitForEventBootStops execution until an event is signaled.
CheckEventBootChecks whether an event is in the signaled state.
SetTimerBootSets an event to be signaled at a particular time.
RaiseTPLBootRaises the task priority level.
RestoreTPLBootRestores/lowers the task priority level.
Execution in the boot services environment occurs at different task priority levels, or TPLs. The
boot services environment exposes only three of these levels to EFI applications and drivers:
• TPL_APPLICATION
• TPL_CALLBACK
• TPL_NOTIFY
, the highest priority level
, the lowest priority level
, an intermediate priority level
Tasks that execute at a higher priority level may interrupt tasks that execute at a lower priority
level. For example, tasks that run at the TPL_NOTIFY level may interrupt tasks that run at the
TPL_APPLICATION or TPL_CALLBACK level. While TPL_NOTIFY is the highest level
exposed to the boot services applications, the firmware may have higher task priority items it deals
with. For example, the firmware may have to deal with tasks of higher priority like timer ticks and
internal devices. Consequently, there is a fourth TPL, TPL_HIGH_LEVEL
, designed for use
exclusively by the firmware.
5-212/01/02Version 1.10
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.