]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DriverBinding.h
5f5d90963e8b81bd63aa154fd81af9a5e7bc2a6e
[mirror_edk2.git] / MdePkg / Include / Protocol / DriverBinding.h
1 /** @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
20 //
21 // Global ID for the ControllerHandle Driver Protocol
22 //
23 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
24 { \
25 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \
26 }
27
28 typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
29
30 /**
31 Test to see if this driver supports ControllerHandle.
32
33 @param This Protocol instance pointer.
34 @param ControllerHandle Handle of device to test
35 @param RemainingDevicePath Optional parameter use to pick a specific child
36 device to start.
37
38 @retval EFI_SUCCESS This driver supports this device
39 @retval EFI_ALREADY_STARTED This driver is already running on this device
40 @retval other This driver does not support this device
41
42 **/
43 typedef
44 EFI_STATUS
45 (EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
46 IN EFI_DRIVER_BINDING_PROTOCOL *This,
47 IN EFI_HANDLE ControllerHandle,
48 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
49 )
50 ;
51
52 /**
53 Start this driver on ControllerHandle.
54
55 @param This Protocol instance pointer.
56 @param ControllerHandle Handle of device to bind driver to
57 @param RemainingDevicePath Optional parameter use to pick a specific child
58 device to start.
59
60 @retval EFI_SUCCESS This driver is added to ControllerHandle
61 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
62 @retval other This driver does not support this device
63
64 **/
65 typedef
66 EFI_STATUS
67 (EFIAPI *EFI_DRIVER_BINDING_START) (
68 IN EFI_DRIVER_BINDING_PROTOCOL *This,
69 IN EFI_HANDLE ControllerHandle,
70 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
71 )
72 ;
73
74 /**
75 Stop this driver on ControllerHandle.
76
77 @param This Protocol instance pointer.
78 @param ControllerHandle Handle of device to stop driver on
79 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
80 children is zero stop the entire bus driver.
81 @param ChildHandleBuffer List of Child Handles to Stop.
82
83 @retval EFI_SUCCESS This driver is removed ControllerHandle
84 @retval other This driver was not removed from this device
85
86 **/
87 typedef
88 EFI_STATUS
89 (EFIAPI *EFI_DRIVER_BINDING_STOP) (
90 IN EFI_DRIVER_BINDING_PROTOCOL *This,
91 IN EFI_HANDLE ControllerHandle,
92 IN UINTN NumberOfChildren,
93 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
94 )
95 ;
96
97 //
98 // Interface structure for the ControllerHandle Driver Protocol
99 //
100 struct _EFI_DRIVER_BINDING_PROTOCOL {
101 EFI_DRIVER_BINDING_SUPPORTED Supported;
102 EFI_DRIVER_BINDING_START Start;
103 EFI_DRIVER_BINDING_STOP Stop;
104 UINT32 Version;
105 EFI_HANDLE ImageHandle;
106 EFI_HANDLE DriverBindingHandle;
107 };
108
109 extern EFI_GUID gEfiDriverBindingProtocolGuid;
110
111 #endif