Overview
Version 1.02 12/12/00 19
The EFI Image may invoke both SAL and EFI procedures. Once in virtual mode, the EFI OS must
switch back to physical mode to call any boot services. If SetVirtualAddressMap() has
been used, then runtime service calls are made in virtual mode.
Refer to the IA-64 System Abstraction Layer Specification for details.
EFI procedures are invoked using the P64 C calling conventions defined for Itanium-based
applications. Refer to the document 64 Bit Runtime Architecture and Software Conventions for
IA-64 for more information.
2.4 Protocols
The protocols that a device handle supports are discovered through the HandleProtocol()
service. Each protocol has a specification that includes:
The protocols globally unique ID (GUID)
The Protocol Interface structure
The Protocol Services
To determine if the handle supports any given protocol, the protocols GUID is passed to
HandleProtocol(). If the device supports the requested protocol, a pointer to the defined
Protocol Interface structure is returned. The Protocol Interface structure links the caller to the
protocol-specific services to use for this device.
Figure 2-2 shows the construction of a protocol. The EFI driver contains functions specific to one
or more protocol implementations, and registers them with InstallProtocolInterface()
service. The firmware returns the Protocol Interface for the protocol that is then used to invoke the
protocol specific services. The EFI driver keeps private, device-specific context with protocol
interfaces.
Protocol
specific
functions
Protocol
specific
functions
GUID 1
GUID 2
Function pointer
Function pointer
Function pointer
...
Device specific
context
Function pointer
Function pointer
Function pointer
...
Device specific
context
EFI Driver
Invoking one of
the protocol
services
HandleProtocol(GUID, ...)
Function pointer
Function pointer
Function pointer
...
Protocol Interface
Device specific
context
Device, or
next Driver

Handle

Figure 2-2. Construction of a Protocol