Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
5-76 12/01/02 Version 1.10
5.4 Image Services
Three types of images can be loaded: EFI Applications, EFI Boot Services Drivers, and EFI
Runtime Services Drivers. An EFI OS Loader is a type of EFI Application. The most significant
difference between these image types is the type of memory into which they are loaded by the
firmware’s loader. Table 5-8 summarizes the differences between images.
Table 5-8. Image Type Differences Summary
EFI Application EFI Boot Services Driver EFI Runtime Services Driver
Description A transient application
that is loaded during boot
services time. EFI
applications are either
unloaded when they
complete, or they take
responsibility for the
continued operation of the
system via
ExitBootServices().
The applications are
loaded in sequential order
by the boot manager, but
one application may
dynamically load another.
A program that is loaded into boot
services memory and stays resident
until boot services terminates.
A program that is loaded into
runtime services memory and
stays resident during runtime. The
memory required for a Runtime
Services Driver must be performed
in a single memory allocation, and
marked as
EfiRuntimeServicesData.
(Note that the memory only stays
resident when booting an EFI-
compatible operating system.
Legacy operating systems will
reusethememory.)
Loaded into
memory type
EfiLoaderCode,
EfiLoaderData
EfiBootServicesCode,
EfiBootServicesData
EfiRuntimeServicesCode,
EfiRuntimeServicesData
Default pool
allocations
from memory
type
EfiLoaderData EfiBootServicesData EfiRuntimeServicesData
Exit behavior When an application
exits, firmware frees the
memory used to hold its
image.
When a boot services driver exits with
an error code, firmware frees the
memory used to hold its image.
When a boot services driver’s entry
point completes with EFI_SUCCESS,
the image is retained in memory.
When a runtime services driver
exits with an error code, firmware
frees the memory used to hold its
image.
When a runtime services driver’s
entry point completes with
EFI_SUCCESS, the image is
retained in memory.
Notes This type of image would
not install any protocol
interfaces or handles.
This type of image would typically use
InstallProtocolInterface().
A runtime driver can only allocate
runtime memory during boot
services time. Due to the
complexity of performing a virtual
relocation for a runtime image, this
driver type is discouraged unless it
is absolutely required.