Registerprotocolnotify() – Intel Extensible Firmware Interface User Manual
Page 140

Extensible Firmware Interface Specification
5-42
12/01/02
Version 1.10
RegisterProtocolNotify()
Summary
Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
Prototype
EFI_STATUS
RegisterProtocolNotify (
IN EFI_GUID
*Protocol,
IN EFI_EVENT
Event,
OUT VOID
**Registration
);
Parameters
Protocol
The numeric ID of the protocol for which the event is to be registered.
Type
EFI_GUID
is defined in the
function description.
Event
Event that is to be signaled whenever a protocol interface is registered
for
Protocol
. The type
EFI_EVENT
is defined in the
InstallProtocolInterface()
function description. The same
EFI_EVENT
may be used for multiple protocol notify registrations.
Registration
A pointer to a memory location to receive the registration value. This
value must be saved and used by the notification function of
Event
to
retrieve the list of handles that have added a protocol interface of type
Protocol
.
Description
The
RegisterProtocolNotify()
function creates an event that is to be signaled whenever a
protocol interface is installed for
Protocol
by
InstallProtocolInterface()
or
Once Event has been signaled, the
function can be called to identify the
newly installed, or reinstalled, handles that support
Protocol
. The Registration parameter
in
corresponds to the SearchKey parameter in
LocateHandle()
. Note that the same handle may be returned multiple times if the handle
reinstalls the target protocol ID multiple times. This is typical for removable media devices,
because when such a device reappears, it will reinstall the Block I/O protocol to indicate that the
device needs to be checked again. In response, layered Disk I/O and Simple File System protocols
may then reinstall their protocols to indicate that they can be re-checked, and so forth.
Status Codes Returned
EFI_SUCCESS
The notification event has been registered.
EFI_OUT_OF_RESOURCES
Space for the notification event could not be allocated.
EFI_INVALID_PARAMETER
One of the parameters has an invalid value.