Services
Version 1.02 12/12/00 73
3.4.4 EFI_IMAGE_ENTRY_POINT
Summary
This is the declaration of an EFI image entry point. This can be the entry point to an EFI
application, an EFI boot service driver, or an EFI runtime driver.
Prototype
typedef
EFI_STATUS
(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
Parameters
ImageHandle Handle that identifies the loaded image. Type EFI_HANDLE is defined
in Section 3.3.1.
SystemTable System Table for this image. Type EFI_SYSTEM_TABLE is defined in
Chapter 4.
Description
An images entry point is of type EFI_IMAGE_ENTRY_POINT. After firmware loads an image
into memory, control is passed to the images entry point. The entry point is responsible for
initializing the image. The images ImageHandle is passed to the image. The ImageHandle
provides the image with all the binding and data information it needs. This information is available
through protocol interfaces. However, to access the protocol interfaces on ImageHandle
requires access to boot services functions. Therefore, LoadImage() passes to the
EFI_IMAGE_ENTRY_POINT a SystemTable that is inherited from the current scope of
LoadImage().
All image handles support the LOADED_IMAGE protocol. This protocol can be used to obtain
information about the loaded images state for example, the device from which the image was
loaded and the images load options. In addition, the ImageHandle may support other protocols
provided by the parent image.
If the image supports dynamic unloading, it must supply an unload function in the
LOADED_IMAGE structure before returning control from its entry point.
In general, an image returns control from its initialization entry point by calling Exit()or by
returning control from its entry point. If the image returns control from its entry point, the
firmware passes control to Exit() using the return code as the ExitStatus parameter to
Exit().
See Exit() for entry point exit conditions (Section 3.4.5).