Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
5-82 12/01/02 Version 1.10
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 the InstallProtocolInterface()
function description.
SystemTable System Table for this image. Type EFI_SYSTEM_TABLE is defined in
Chapter 4.
Description
An image’s entry point is of type EFI_IMAGE_ENTRY_POINT. After firmware loads an image
into memory, control is passed to the image’s entry point. The entry point is responsible for
initializing the image. The image’s 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 EFI_LOADED_IMAGE
protocol. This protocol can be used to
obtain information about the loaded image’s state—for example, the device from which the image
was loaded and the image’s 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
EFI_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() below for entry point exit conditions.