EFI Image
Version 1.02 12/12/00 111
When the boot manager loads a driver, the image handle may be used to locate the load options
for the driver. The load options are those options that were stored in the LoadOptions field of
the EFI_LOADED_IMAGE information for the driver.
4.5.1 EFI Image Handoff State
Control is transferred to a loaded image at the AddressOfEntryPoint reference according to
the normal indirect calling conventions for the images Machine type. The entry point is a
function of type EFI_IMAGE_ENTRY_POINT. All other linkage to and from an EFI image is
done programmatically. See Chapter 3 for the full definition of EFI_IMAGE_ENTRY_POINT. Its
prototype is repeated below, along with some additional comments.
typedef
EFI_STATUS
(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
The first argument is the images image handle. The second argument is a pointer to the images
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 non-zero 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 lo cation 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 Section 4.1.
The following code shows the definition for the EFI system table. The EFI system table is provided
as the second argument to a loaded images entry point.