1 boot manager, 1 efi images – Intel Extensible Firmware Interface User Manual

Page 42

Advertising
background image

Extensible Firmware Interface Specification

2-2

12/01/02

Version 1.10

2.1

Boot Manager

EFI contains a boot manager that allows the loading of EFI applications (including OS 1st stage
loader) or EFI drivers from any file on an EFI defined file system or through the use of an EFI
defined image loading service. EFI defines NVRAM variables that are used to point to the file to
be loaded. These variables also contain application specific data that are passed directly to the EFI
application. The variables also contain a human readable Unicode string that can be displayed to
the user in a menu.

The variables defined by EFI allow the system firmware to contain a boot menu that can point to all
the operating systems, and even multiple versions of the same operating systems. The design goal
of EFI was to have one set of boot menus that could live in platform firmware. EFI only specifies
the NVRAM variables used in selecting boot options. EFI leaves the implementation of the menu
system as value added implementation space.

EFI greatly extends the boot flexibility of a system over the current state of the art in the
PC-AT-class system. The PC-AT-class systems today are restricted to boot from the first floppy,
hard drive, CD-ROM, or network card attached to the system. Booting from a common hard drive
can cause lots of interoperability problems between operating systems, and different versions of
operating systems from the same vendor.

2.1.1

EFI Images

EFI Images are a class of files defined by EFI that contain executable code. The most
distinguishing feature of EFI Images is that the first set of bytes in the EFI Image file contains an
image header that defines the encoding of the executable image.

EFI uses a subset of the PE32+ image format with a modified header signature. The modification
to signature value in the PE32+ image is done to distinguish EFI images from normal PE32
executables. The “+” addition to PE32 provides the 64-bit relocation fix-up extensions to standard
PE32 format.

For images with the EFI image signature, the

Subsystem

values in the PE image header are

defined below. The major differences between image types are the memory type that the firmware
will load the image into, and the action taken when the image’s entry point exits or returns. An
application image is always unloaded when control is returned from the image’s entry point. A
driver image is only unloaded if control is passed back with an EFI error code.

// PE32+ Subsystem type for EFI images

#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION

10

#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER

11

#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER

12

Advertising