Efi_driver_binding_protocol.stop(), Stop(), Abcstop() – Intel Extensible Firmware Interface User Manual

Page 260: Func, It mu, Ed in

Advertising
background image

Extensible Firmware Interface Specification

9-18

12/01/02

Version 1.10

EFI_DRIVER_BINDING_PROTOCOL.Stop()

Summary

Stops 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_STOP) (
IN EFI_DRIVER_BINDING_PROTOCOL

*This,

IN EFI_HANDLE

ControllerHandle,

IN UINTN

NumberOfChildren,

IN EFI_HANDLE

*ChildHandleBuffer OPTIONAL

);

Parameters

This

A pointer to the

EFI_DRIVER_BINDING_PROTOCOL

instance. Type

EFI_DRIVER_BINDING_PROTOCOL

is

defined in section 9.1.

ControllerHandle

A handle to the device being stopped. The handle must support
a bus specific I/O protocol for the driver to use to stop the
device.

NumberOfChildren

The number of child device handles in

ChildHandleBuffer

.

ChildHandleBuffer

An array of child handles to be freed. May be

NULL

if

NumberOfChildren

is 0.

Description

This function performs different operations depending on the parameter

NumberOfChildren

. If

NumberOfChildren

is not zero, then the driver specified by

This

is a bus driver, and it is

being requested to free one or more of its child handles specified by

NumberOfChildren

and

ChildHandleBuffer

. If all of the child handles are freed, then

EFI_SUCCESS

is returned. If

NumberOfChildren

is zero, then the driver specified by

This

is either a device driver or a bus

driver, and it is being requested to stop the controller specified by

ControllerHandle

. If

ControllerHandle

is stopped, then

EFI_SUCCESS

is returned. In either case, this function is

required to undo what was performed in

Start()

. 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()

.

Advertising