Extensible Firmware Interface Specification
20 12/12/00 Version 1.02
The following C code fragment illustrates the use of protocols:// There is a global “EffectsDevice” structure. This
// structure contains information pertinent to the device.
// Connect to the ILLUSTRATION_PROTOCOL on the EffectsDevice,
// by calling HandleProtocol with the device’s EFI device handle
// and the ILLUSTRATION_PROTOCOL GUID.
EffectsDevice.Handle = DeviceHandle;
Status = HandleProtocol (
EffectsDevice.EFIHandle,
&IllustrationProtocolGuid,
&EffectsDevice.IllustrationProtocol
);
// Use the EffectsDevice illustration protocol’s “MakeEffects”
// service to make flashy and noisy effects.
Status = EffectsDevice.IllustrationProtocol->MakeEffects (
EffectsDevice.IllustrationProtocol,
TheFlashyAndNoisyEffect
);
Table 2-4 lists the EFI protocols defined by this specification.Table 2-4. EFI Protocols
Protocol Name Description
BLOCK_IO Protocol interfaces for devices that support block I/O style accesses.
DEVICE_IO Protocol interfaces for performing device I/O.
DEVICE_PATH Provides the location of the device.
DISK_IO A protocol interface that layers onto any BLOCK_IO interface.
SIMPLE_FILE_SYSTEM Protocol interfaces for opening disk volume containing an EFI file system.
EFI_FILE_HANDLE Provides access to supported file systems.
LOAD_FILE Protocol interface for reading a file from an arbitrary device.
LOADED_IMAGE Provides information on the image.
PXE_BC Protocol interfaces for devices that support network booting.
SERIAL_IO Protocol interfaces for devices that support serial character transfer.
SIMPLE_INPUT Protocol interfaces for devices that support simple console style text input.
SIMPLE_TEXT_OUTPUT Protocol interfaces for devices that support console style text displaying.
SIMPLE_NETWORK Provides interface for devices that support packet based transfers.
UNICODE_COLLATION Protocol interfaces for Unicode string comparison operations.