blob: d561797312bb8674c3e1d8129eef099e74dc3229 [file] [log] [blame]
yshang1d1f95002007-06-19 10:12:02 +00001/** @file
2 EFI ControllerHandle Driver Protocol
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: DriverBinding.h
14
15**/
16
17#ifndef __EFI_DRIVER_BINDING_H__
18#define __EFI_DRIVER_BINDING_H__
19
yshang11a5589a2007-06-22 13:36:00 +000020#include <Protocol/DevicePath.h>
yshang1d1f95002007-06-19 10:12:02 +000021//
22// Global ID for the ControllerHandle Driver Protocol
23//
24#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
25 { \
26 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \
27 }
28
29typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
30
31/**
32 Test to see if this driver supports ControllerHandle.
33
34 @param This Protocol instance pointer.
35 @param ControllerHandle Handle of device to test
36 @param RemainingDevicePath Optional parameter use to pick a specific child
37 device to start.
38
39 @retval EFI_SUCCESS This driver supports this device
40 @retval EFI_ALREADY_STARTED This driver is already running on this device
41 @retval other This driver does not support this device
42
43**/
44typedef
45EFI_STATUS
46(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
47 IN EFI_DRIVER_BINDING_PROTOCOL *This,
48 IN EFI_HANDLE ControllerHandle,
49 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
50 )
51;
52
53/**
54 Start this driver on ControllerHandle.
55
56 @param This Protocol instance pointer.
57 @param ControllerHandle Handle of device to bind driver to
58 @param RemainingDevicePath Optional parameter use to pick a specific child
59 device to start.
60
61 @retval EFI_SUCCESS This driver is added to ControllerHandle
62 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
63 @retval other This driver does not support this device
64
65**/
66typedef
67EFI_STATUS
68(EFIAPI *EFI_DRIVER_BINDING_START) (
69 IN EFI_DRIVER_BINDING_PROTOCOL *This,
70 IN EFI_HANDLE ControllerHandle,
71 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
72 )
73;
74
75/**
76 Stop this driver on ControllerHandle.
77
78 @param This Protocol instance pointer.
79 @param ControllerHandle Handle of device to stop driver on
80 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
81 children is zero stop the entire bus driver.
82 @param ChildHandleBuffer List of Child Handles to Stop.
83
84 @retval EFI_SUCCESS This driver is removed ControllerHandle
85 @retval other This driver was not removed from this device
86
87**/
88typedef
89EFI_STATUS
90(EFIAPI *EFI_DRIVER_BINDING_STOP) (
91 IN EFI_DRIVER_BINDING_PROTOCOL *This,
92 IN EFI_HANDLE ControllerHandle,
93 IN UINTN NumberOfChildren,
94 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
95 )
96;
97
98//
99// Interface structure for the ControllerHandle Driver Protocol
100//
101struct _EFI_DRIVER_BINDING_PROTOCOL {
102 EFI_DRIVER_BINDING_SUPPORTED Supported;
103 EFI_DRIVER_BINDING_START Start;
104 EFI_DRIVER_BINDING_STOP Stop;
105 UINT32 Version;
106 EFI_HANDLE ImageHandle;
107 EFI_HANDLE DriverBindingHandle;
108};
109
110extern EFI_GUID gEfiDriverBindingProtocolGuid;
111
112#endif