5.4 Communication between UEFI Drivers
This section describes the communication methods used by UEFI drivers.
5.4.1 Protocol
UEFI drivers can use protocol services to access protocol interfaces produced by other modules.
The UEFI Specification defines a group of boot services to handle protocols, including:
Services to install protocols:
InstallProtocolInterface()
ReInstallProtocolInterface()
InstallMultipleProtocolInterfaces()
Services to retrieve protocols:
LocateProtocol()
HandleProtocol()
OpenProtocol()
Section 8.4.1 provides an example of usage.
5.4.2 Variable
UEFI drivers can read and write variables via the UEFI Runtime Services
GetVariable()
and SetVariable()
.
When using this service, the distinction between a UEFI driver and a Dxe driver is that a Dxe driver must explicitly point out the dependency relationship for
EFI_VARIABLE_ARCH_PROTOCOL
and EFI_VARIABLE_WRITE_ARCH_PROTOCOL
in the
[depex] section of the Dxe driver's INF file,
but a UEFI driver does not have
this section in the UEFI driver's INF file
Note: For UEFI drivers, the EDK II build system will automatically append the dependency information inherited from the UefiEntryPointLib into the image section. This causes UEFI drivers to run after all Dxe architectural protocols are installed.
Section 8.4.2, provides an example of usage.