Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
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
InstallProtocolInterface()
function description.
Event Event that is to be signaled whenever a protocol interface is registered
for Protocol.ThetypeEFI_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
ReinstallProtocolInterface()
.
Once Event has been signaled, the LocateHandle()
function can be called to identify the
newly installed, or reinstalled, handles that support Protocol.TheRegistration parameter
in RegisterProtocolNotify()
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.