4 efi debug support table, 1 overview – Intel Extensible Firmware Interface User Manual

Page 736

Advertising
background image

Extensible Firmware Interface Specification

16-22

12/01/02

Version 1.10

16.4 EFI Debug Support Table

This chapter defines the EFI Debug Support Table which is used by the debug agent or an external
debugger to determine loaded image information in a quiescent manner.

16.4.1 Overview

Every executable image loaded in EFI is represented by an EFI handle populated with an instance
of the

LOADED_IMAGE

protocol. This handle is known as an “image handle.” The associated

Loaded Image protocol provides image information that is of interest to a source level debugger.
Normal EFI executables can access this information by using EFI services to locate all instances of
the Loaded Image protocol.

A debugger has two problems with this scenario. First, if it is an external hardware debugger, the
location of the EFI system table is not known. Second, even if the location of the EFI system table
is known, the services contained therein are generally unavailable to a debugger either because it is
an on-target debugger that is running in interrupt context, or in the case of an external hardware
debugger there is no debugger code running on the target at all.

Since a source level debugger must be capable of determining image information for all loaded
images, an alternate mechanism that does not use EFI services must be provided. Two features are
added to the EFI system software to enable this capability.

First, an alternate mechanism of locating the EFI system table is required. A check-summed
structure containing the physical address of the EFI system table is created and located on a 4M
aligned memory address. A hardware debugger can search memory for this structure to determine
the location of the EFI system table.

Second, an

EFI_CONFIGURATION_TABLE

is published that leads to a database of pointers to all

instances of the Loaded Image protocol. Several layers of indirection are used to allow
dynamically managing the data as images are loaded and unloaded. Once the address of the EFI
system table is known, it is possible to discover a complete and accurate list of EFI images. (Note
that the EFI core itself must be represented by an instance of the Loaded Image protocol.)

Advertising