Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Version 1.10 12/01/02 16-1
16
Protocols - Debugger Support
This chapter describes a minimal set of protocols and associated data structures necessary to enable
the creation of source level debuggers for EFI. It does not fully define a debugger design. Using
the services described in this document, it should also be possible to implement a variety of
debugger solutions.
16.1 Overview
Efficient EFI driver and application development requires the availability of source level debugging
facilities. Although completely on-target debuggers are clearly possible, EFI debuggers are
generally expected to be remotely hosted. That is to say, the debugger itself will be split between
two machines, which are the host and target. A majority of debugger code runs on the host that is
typically responsible for disassembly, symbol management, source display, and user interface.
Similarly, a smaller piece of code runs on the target that establishes the communication to the host
and proxies requests from the host. The on-target code is known as the “debug agent.”
The debug agent design is subdivided further into two parts, which are the processor/platform
abstraction and the debugger host specific communication grammar. This specification describes
architectural interfaces for the former only. Specific implementations for various debugger host
communication grammars can be created that make use of the facilities described in this
specification.
The processor/platform abstraction is presented as a pair of protocol interfaces, which are the
Debug Support protocol and the Debug Port protocol.
The Debug Support protocol abstracts the processor’s debugging facilities, namely a mechanism to
manage the processor’s context via caller-installable exception handlers.
The Debug Port protocol abstracts the device that is used for communication between the host and
target. Typically this will be a 16550 serial port, 1394 device, or other device that is nominally a
serial stream.
Furthermore, a table driven, quiescent, memory-only mechanism for determining the base address
of PE32+ images is provided to enable the debugger host to determine where images are located
in memory.
Aside from timing differences that occur because of running code associated with the debug agent
and user initiated changes to the machine context, the operation of the on-target debugger
component must be transparent to the rest of the system. In addition, no portion of the debug agent
that runs in interrupt context may make any calls to EFI services or other protocol interfaces.
The services described in this document do not comprise a complete debugger, rather they provide
a minimal abstraction required to implement a wide variety of debugger solutions.