Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Overview
Version 1.10 12/01/02 2-3
The Machine value that is found in the PE image file header is used to indicate the machine code
type of the image. The machine code types defined for images with the EFI image signature are
defined below. A given platform must implement the image type native to that platform and the
image type for EFI Byte Code (EBC). Support for other machine code types are optional to the
platform.
// PE32+ Machine type for EFI images
#define EFI_IMAGE_MACHINE_IA32 0x014c
#define EFI_IMAGE_MACHINE_IA64 0x0200
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
An EFI image is loaded into memory through the LoadImage()
Boot Service. This service loads
an image with a PE32+ format into memory. This PE32+ loader is required to load all the sections
of the PE32+ image into memory. Once the image is loaded into memory, and the appropriate
“fix-ups” have been performed, control is transferred to a loaded image at the
AddressOfEntryPoint reference according to the normal indirect calling conventions of
IA-32 or Itanium-based applications. All other linkage to and from an EFI image is done
programmatically.
2.1.2 EFI Applications
EFI Applications are loaded by the EFI Boot Manager or by other EFI 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 the Boot Service Exit()
, the application is unloaded from memory and control is
returned to the EFI component that loaded the application.
When the EFI Boot Manager loads an application, the image handle may be used to locate the “load
options” for the application. The load options are stored in nonvolatile storage and are associated
with the application being loaded and executed by the EFI Boot Manager.