Intel Extensible Firmware Interface User Manual

Page 247

Advertising
background image

Protocols

— EFI Driver Model

Version 1.10

12/01/02

9-5

CloseProtocol()

. Since

ControllerHandle

may have been previously started by the

same driver, if a protocol is already in the opened state, then it must not be closed with

CloseProtocol()

. This is required to guarantee the state of

ControllerHandle

is not

modified by this function.

If any of the protocol interfaces on the device specified by

ControllerHandle

that are required

by the driver specified by

This

are already open for exclusive access by a different driver or

application, then

EFI_ACCESS_DENIED

is returned.

If any of the protocol interfaces on the device specified by

ControllerHandle

that are required

by the driver specified by

This

are already opened by the same driver, then

EFI_ALREADY_STARTED

is returned. However, if the driver specified by

This

is a bus driver

that is able to create one child handle at a time, then it is not an error, and the bus driver should
continue with its test of

ControllerHandle

. This allows a bus driver to create one child

handle on the first call to

Supported()

and

Start()

, and create additional child handles on

additional calls to

Supported()

and

Start()

.

If

ControllerHandle

is not supported by

This

, then

EFI_UNSUPPORTED

is returned.

If

This

is a bus driver that creates child handles with an

EFI_DEVICE_PATH_PROTOCOL

, then

ControllerHandle

must support the

EFI_DEVICE_PATH

. If it does not, then

EFI_UNSUPPORTED

is returned.

If

ControllerHandle

is supported by

This

, and

This

is a device driver, then

EFI_SUCCESS

is returned.

If

ControllerHandle

is supported by

This

, and

This

is a bus driver, and

RemainingDevicePath

is

NULL

, then

EFI_SUCCESS

is returned.

If

ControllerHandle

is supported by

This

, and

This

is a bus driver, and

RemainingDevicePath

is not

NULL

, then

RemainingDevicePath

must be analyzed. If

RemainingDevicePath

starts with an EFI Device Path node that the bus driver recognizes and

supports, then

EFI_SUCCESS

is returned. Otherwise,

EFI_UNSUPPORTED

is returned.

The

Supported()

function is designed to be invoked from the EFI boot service

ConnectController()

. As a result, much of the error checking on the parameters to

Supported()

has been moved into this common boot service. It is legal to call

Supported()

from other locations, but the following calling restrictions must be followed or the system behavior
will not be deterministic.

ControllerHandle

must be a valid

EFI_HANDLE

. If

RemainingDevicePath

is not

NULL

, then it must be a pointer to a naturally aligned

EFI_DEVICE_PATH

that contains at least

one device path node other than the end node.

Advertising