Intel Extensible Firmware Interface User Manual

Page 149

Advertising
background image

Services — Boot Services

Version 1.10

12/01/02

5-51

If

Attributes

is

BY_DRIVER

,

BY_DRIVER|EXCLUSIVE

, or

EXCLUSIVE

, and there are any

items on the open list of the protocol interface with an attribute of

EXCLUSIVE

or

BY_DRIVER|EXCLUSIVE

, then

EFI_ACCESS_DENIED

is returned.

If

Attributes

is

BY_DRIVER

, and there are any items on the open list of the protocol interface

with an attribute of

BY_DRIVER

, and

AgentHandle

is the same agent handle in the open list

item, then

EFI_ALREADY_STARTED

is returned.

If

Attributes

is

BY_DRIVER

, and there are any items on the open list of the protocol interface

with an attribute of

BY_DRIVER

, and

AgentHandle

is different than the agent handle in the

open list item, then

EFI_ACCESS_DENIED

is returned.

If

Attributes

is

BY_DRIVER|EXCLUSIVE

, and there are any items on the open list of the

protocol interface with an attribute of

BY_DRIVER|EXCLUSIVE

, and

AgentHandle

is the

same agent handle in the open list item, then

EFI_ALREADY_STARTED

is returned.

If

Attributes

is

BY_DRIVER|EXCLUSIVE

, and there are any items on the open list of the

protocol interface with an attribute of

BY_DRIVER|EXCLUSIVE

, and

AgentHandle

is different

than the agent handle in the open list item, then

EFI_ACCESS_DENIED

is returned.

If

Attributes

is

BY_DRIVER|EXCLUSIVE

or

EXCLUSIVE

, and there are any items on

the open list of the protocol interface with an attribute of

BY_DRIVER

, then the boot service

DisconnectController()

is called for each of these drivers on the open list. If there are

any items in the open list of the protocol interface with an attribute of

BY_DRIVER

remaining

after all the

DisconnectController()

calls have been made,

EFI_ACCESS_DENIED

is returned.

Related Definitions

#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL

0x00000001

#define EFI_OPEN_PROTOCOL_GET_PROTOCOL

0x00000002

#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL

0x00000004

#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER

0x00000008

#define EFI_OPEN_PROTOCOL_BY_DRIVER

0x00000010

#define EFI_OPEN_PROTOCOL_EXCLUSIVE

0x00000020

The following is the list of legal values for the

Attributes

parameter, and how each value is

used.

BY_HANDLE_PROTOCOL

Used in the implementation of

HandleProtocol()

. Since

OpenProtocol()

performs the same function as

HandleProtocol()

with additional functionality,

HandleProtocol()

can simply call

OpenProtocol()

with this

Attributes

value.

GET_PROTOCOL

Used by a driver to get a protocol interface from a handle. Care
must be taken when using this open mode because the driver that
opens a protocol interface in this manner will not be informed if
the protocol interface is uninstalled or reinstalled. The caller is
also not required to close the protocol interface with

CloseProtocol()

.

Advertising