3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 EFI ControllerHandle Driver Protocol
24 #ifndef _EFI_DRIVER_BINDING_H_
25 #define _EFI_DRIVER_BINDING_H_
30 // Global ID for the ControllerHandle Driver Protocol
32 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
34 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71} \
37 #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x
39 EFI_FORWARD_DECLARATION (EFI_DRIVER_BINDING_PROTOCOL
);
42 /// Device Path protocol.
44 #define EFI_DEVICE_PATH_PROTOCOL_GUID \
46 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
49 // Begin included from DevicePath.h....
52 /// Device Path guid definition for backward-compatible with EFI1.1.
54 //#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
59 This protocol can be used on any device handle to obtain generic path/location
60 information concerning the physical device or logical device. If the handle does
61 not logically map to a physical device, the handle may not necessarily support
62 the device path protocol. The device path describes the location of the device
63 the handle is for. The size of the Device Path can be determined from the structures
64 that make up the Device Path.
67 UINT8 Type
; ///< 0x01 Hardware Device Path.
68 ///< 0x02 ACPI Device Path.
69 ///< 0x03 Messaging Device Path.
70 ///< 0x04 Media Device Path.
71 ///< 0x05 BIOS Boot Specification Device Path.
72 ///< 0x7F End of Hardware Device Path.
74 UINT8 SubType
; ///< Varies by Type
75 ///< 0xFF End Entire Device Path, or
76 ///< 0x01 End This Instance of a Device Path and start a new
79 UINT8 Length
[2]; ///< Specific Device Path data. Type and Sub-Type define
80 ///< type of data. Size of data is included in Length.
82 } EFI_DEVICE_PATH_PROTOCOL
;
86 // End included from DevicePath.h
90 (EFI_FUNCTION EFIAPI
*EFI_DRIVER_BINDING_SUPPORTED
) (
91 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
92 IN EFI_HANDLE ControllerHandle
,
93 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
98 Test to see if this driver supports ControllerHandle.
101 This - Protocol instance pointer.
102 ControllerHandle - Handle of device to test
103 RemainingDevicePath - Optional parameter use to pick a specific child
107 EFI_SUCCESS - This driver supports this device
108 EFI_ALREADY_STARTED - This driver is already running on this device
109 other - This driver does not support this device
116 (EFI_FUNCTION EFIAPI
*EFI_DRIVER_BINDING_START
) (
117 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
118 IN EFI_HANDLE ControllerHandle
,
119 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
124 Start this driver on ControllerHandle.
127 This - Protocol instance pointer.
128 ControllerHandle - Handle of device to bind driver to
129 RemainingDevicePath - Optional parameter use to pick a specific child
133 EFI_SUCCESS - This driver is added to ControllerHandle
134 EFI_ALREADY_STARTED - This driver is already running on ControllerHandle
135 other - This driver does not support this device
142 (EFI_FUNCTION EFIAPI
*EFI_DRIVER_BINDING_STOP
) (
143 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
144 IN EFI_HANDLE ControllerHandle
,
145 IN UINTN NumberOfChildren
,
146 IN EFI_HANDLE
* ChildHandleBuffer
151 Stop this driver on ControllerHandle.
154 This - Protocol instance pointer.
155 ControllerHandle - Handle of device to stop driver on
156 NumberOfChildren - Number of Handles in ChildHandleBuffer. If number of
157 children is zero stop the entire bus driver.
158 ChildHandleBuffer - List of Child Handles to Stop.
161 EFI_SUCCESS - This driver is removed ControllerHandle
162 other - This driver was not removed from this device
168 // Interface structure for the ControllerHandle Driver Protocol
170 struct _EFI_DRIVER_BINDING_PROTOCOL
{
171 EFI_DRIVER_BINDING_SUPPORTED Supported
;
172 EFI_DRIVER_BINDING_START Start
;
173 EFI_DRIVER_BINDING_STOP Stop
;
175 EFI_HANDLE ImageHandle
;
176 EFI_HANDLE DriverBindingHandle
;
179 extern EFI_GUID gEfiDriverBindingProtocolGuid
;