beautypg.com

Efi_driver_binding_protocol.start(), Start(), Abcstart() – Intel Extensible Firmware Interface User Manual

Page 252: And c, Func

background image

Extensible Firmware Interface Specification

9-10

12/01/02

Version 1.10

EFI_DRIVER_BINDING_PROTOCOL.Start()

Summary

Starts a device controller or a bus controller. The

Start()

and

Stop()

services of the

EFI_DRIVER_BINDING_PROTOCOL

mirror each other.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_START) (
IN EFI_DRIVER_BINDING_PROTOCOL

*This,

IN EFI_HANDLE

ControllerHandle,

IN EFI_DEVICE_PATH

*RemainingDevicePath OPTIONAL

);

Parameters

This

A pointer to the

EFI_DRIVER_BINDING_PROTOCOL

instance.

ControllerHandle

The handle of the controller to start. This handle must support a
protocol interface that supplies an I/O abstraction to the driver.

RemainingDevicePath

A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus
drivers. For a bus driver, if this parameter is

NULL

, then handles

for all the children of

Controller

are created by this driver.

If this parameter is not

NULL

, then only the handle for the child

device specified by the first Device Path Node of

RemainingDevicePath

is created by this driver.

Description

This function starts the device specified by

Controller

with the driver specified by

This

.

Whatever resources are allocated in

Start()

must be freed in

Stop()

. For example, every

AllocatePool()

,

AllocatePages()

,

OpenProtocol()

, and

InstallProtocolInterface()

in

Start()

must be matched with a

FreePool()

,

FreePages()

,

CloseProtocol()

, and

UninstallProtocolInterface()

in

Stop()

.

If

Controller

is started, then

EFI_SUCCESS

is returned. If

Controller

cannot be started

due to a device error, then

EFI_DEVICE_ERROR

is returned. If there are not enough resources to

start the device or bus specified by

Controller

, then

EFI_OUT_OF_RESOURCES

is returned.

If the driver specified by

This

is a device driver, then

RemainingDevicePath

is ignored.