Extensible Firmware Interface Specification
4.3
EFI Applications
Applications are loaded by the boot manager in the EFI firmware, or by other 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 Exit(), the application is unloaded from memory and control is returned to the shell
that loaded the application.
When the boot manager loads an application, the image handle may be used to locate the "load
options" for the application. The load options are those options that were stored in the
field of the
LoadOptions
4.4
EFI OS Loaders
An EFI OS loader is a 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 device handles for
access to devices that the firmware exposes. If the 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
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
code and an
ExitData
Once the OS loader successfully loads its operating system, it can take control of the system by
using ExitBootServices(). After calling 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.
4.5
EFI Drivers
Drivers are loaded by the boot manager in the EFI firmware or by other applications. To load a
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 that are 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. If the driver returns from its entry point, or when it calls
with an error code, the driver is unloaded from memory and control is returned to the shell
Exit()
that loaded the driver. If the driver returns
reside in memory. If the driver is an EFIImageBootServiceDriver, the memory that the
driver is loaded into is of type
memory regions revert back to normal memory when an OS loader exits boot services.
110
EFI_LOADED_IMAGE
that contains OS loader-specific data, including a Unicode string.
EFI_SUCCESS
EfiBootServicesCode
12/12/00
information for the application.
Exit()
from its entry point, it continues to
and EfiBootServicesData. Such
DEVICE_IO
call with an error
Version 1.02
Need help?
Do you have a question about the Extensible Firmware Interface and is the answer not in the manual?