Status codes returned – Intel Extensible Firmware Interface User Manual
Page 150

Extensible Firmware Interface Specification
5-52
12/01/02
Version 1.10
TEST_PROTOCOL
Used by a driver to test for the existence of a protocol interface
on a handle.
Interface
is optional for this attribute value, so
it is ignored, and the caller should only use the return status
code. The caller is also not required to close the protocol
interface with
CloseProtocol()
.
BY_CHILD_CONTROLLER
Used by bus drivers to show that a protocol interface is being
used by one of the child controllers of a bus. This information is
used by the boot service
to
recursively connect all child controllers and by the boot service
to get the list of child
controllers that a bus driver created.
BY_DRIVER
Used by a driver to gain access to a protocol interface. When
this mode is used, the driver’s
function will be called
by
DisconnectController()
if the protocol interface is
reinstalled or uninstalled. Once a protocol interface is opened by
a driver with this attribute, no other drivers will be allowed to
open the same protocol interface with the
BY_DRIVER
attribute.
BY_DRIVER|EXCLUSIVE
Used by a driver to gain exclusive access to a protocol interface.
If any other drivers have the protocol interface opened with an
attribute of
BY_DRIVER
, then an attempt will be made to
remove them with
DisconnectController()
.
EXCLUSIVE
Used by applications to gain exclusive access to a protocol
interface. If any drivers have the protocol interface opened with
an attribute of
BY_DRIVER
, then an attempt will be made to
remove them by calling the driver’s
Stop()
function.
Status Codes Returned
EFI_SUCCESS
An item was added to the open list for the protocol interface, and the
protocol interface was returned in
Interface
.
EFI_INVALID_PARAMETER
Protocol
is
NULL
.
EFI_INVALID_PARAMETER
Interface
is
NULL
, and
Attributes
is not
TEST_PROTOCOL
.
EFI_INVALID_PARAMETER
Handle
is not a valid
EFI_HANDLE
.
EFI_UNSUPPORTED
Handle
does not support
Protocol
.
EFI_INVALID_PARAMETER
Attributes
is not a legal value.
EFI_INVALID_PARAMETER
Attributes
is
BY_CHILD_CONTROLLER
and
AgentHandle
is not a valid
EFI_HANDLE
.
EFI_INVALID_PARAMETER
Attributes
is
BY_DRIVER
and
AgentHandle
is not a valid
EFI_HANDLE
.
EFI_INVALID_PARAMETER
Attributes
is
BY_DRIVER|EXCLUSIVE
and
AgentHandle
is not a valid
EFI_HANDLE
.
continued