]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | The driver binding and service binding protocol for IP6 driver.\r | |
3 | \r | |
c2adf51f | 4 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r |
a3bcde70 HT |
5 | \r |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php.\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __EFI_IP6_DRIVER_H__\r | |
17 | #define __EFI_IP6_DRIVER_H__\r | |
18 | \r | |
19 | extern EFI_DRIVER_BINDING_PROTOCOL gIp6DriverBinding;\r | |
20 | extern EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName;\r | |
21 | extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2;\r | |
216f7970 | 22 | extern EFI_UNICODE_STRING_TABLE *gIp6ControllerNameTable;\r |
23 | \r | |
24 | typedef struct {\r | |
25 | EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r | |
26 | UINTN NumberOfChildren;\r | |
27 | EFI_HANDLE *ChildHandleBuffer;\r | |
28 | }IP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r | |
a3bcde70 HT |
29 | \r |
30 | /**\r | |
31 | Clean up an IP6 service binding instance. It releases all\r | |
32 | the resource allocated by the instance. The instance may be\r | |
33 | partly initialized, or partly destroyed. If a resource is\r | |
75dce340 | 34 | destroyed, it is marked as that in case the destroy failed and\r |
a3bcde70 HT |
35 | being called again later.\r |
36 | \r | |
37 | @param[in] IpSb The IP6 service binding instance to clean up.\r | |
38 | \r | |
39 | @retval EFI_SUCCESS The resource used by the instance are cleaned up.\r | |
40 | @retval Others Failed to clean up some of the resources.\r | |
41 | \r | |
42 | **/\r | |
43 | EFI_STATUS\r | |
44 | Ip6CleanService (\r | |
45 | IN IP6_SERVICE *IpSb\r | |
46 | );\r | |
47 | \r | |
48 | //\r | |
49 | // Function prototype for the driver's entry point\r | |
50 | //\r | |
51 | \r | |
52 | /**\r | |
53 | This is the declaration of an EFI image entry point. This entry point is\r | |
54 | the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r | |
55 | both device drivers and bus drivers.\r | |
56 | \r | |
57 | The entry point for IP6 driver which installs the driver\r | |
58 | binding and component name protocol on its image.\r | |
59 | \r | |
60 | @param[in] ImageHandle The firmware allocated handle for the UEFI image.\r | |
61 | @param[in] SystemTable A pointer to the EFI System Table.\r | |
62 | \r | |
63 | @retval EFI_SUCCESS The operation completed successfully.\r | |
64 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
65 | \r | |
66 | **/\r | |
67 | EFI_STATUS\r | |
68 | EFIAPI\r | |
69 | Ip6DriverEntryPoint (\r | |
70 | IN EFI_HANDLE ImageHandle,\r | |
71 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
72 | );\r | |
73 | \r | |
74 | //\r | |
75 | // Function prototypes for the Drivr Binding Protocol\r | |
76 | //\r | |
77 | \r | |
78 | /**\r | |
79 | Test to see if this driver supports ControllerHandle.\r | |
80 | \r | |
81 | @param[in] This Protocol instance pointer.\r | |
82 | @param[in] ControllerHandle Handle of device to test.\r | |
83 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
84 | device to start.\r | |
85 | \r | |
86 | @retval EFI_SUCCESS This driver supports this device.\r | |
87 | @retval EFI_ALREADY_STARTED This driver is already running on this device.\r | |
88 | @retval other This driver does not support this device.\r | |
89 | \r | |
90 | **/\r | |
91 | EFI_STATUS\r | |
92 | EFIAPI\r | |
93 | Ip6DriverBindingSupported (\r | |
94 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
95 | IN EFI_HANDLE ControllerHandle,\r | |
96 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
97 | );\r | |
98 | \r | |
99 | /**\r | |
100 | Start this driver on ControllerHandle.\r | |
101 | \r | |
102 | @param[in] This Protocol instance pointer.\r | |
103 | @param[in] ControllerHandle Handle of device to bind driver to.\r | |
104 | @param[in] RemainingDevicePath Optional parameter used to pick a specific child\r | |
105 | device to start.\r | |
106 | \r | |
107 | @retval EFI_SUCCES This driver is added to ControllerHandle.\r | |
108 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.\r | |
109 | @retval other This driver does not support this device.\r | |
110 | \r | |
111 | **/\r | |
112 | EFI_STATUS\r | |
113 | EFIAPI\r | |
114 | Ip6DriverBindingStart (\r | |
115 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
116 | IN EFI_HANDLE ControllerHandle,\r | |
117 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
118 | );\r | |
119 | \r | |
120 | /**\r | |
121 | Stop this driver on ControllerHandle.\r | |
122 | \r | |
123 | @param[in] This Protocol instance pointer.\r | |
124 | @param[in] ControllerHandle Handle of device to stop driver on.\r | |
125 | @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number\r | |
126 | of children is zero, stop the entire bus driver.\r | |
127 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r | |
128 | if NumberOfChildren is 0.\r | |
129 | \r | |
130 | @retval EFI_SUCCESS The device was stopped.\r | |
131 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
132 | \r | |
133 | **/\r | |
134 | EFI_STATUS\r | |
135 | EFIAPI\r | |
136 | Ip6DriverBindingStop (\r | |
137 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
138 | IN EFI_HANDLE ControllerHandle,\r | |
139 | IN UINTN NumberOfChildren,\r | |
140 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
141 | );\r | |
142 | \r | |
143 | //\r | |
c2adf51f | 144 | // Function prototypes for the ServiceBinding Protocol\r |
a3bcde70 HT |
145 | //\r |
146 | \r | |
147 | /**\r | |
148 | Creates a child handle with a set of I/O services.\r | |
149 | \r | |
150 | @param[in] This Protocol instance pointer.\r | |
151 | @param[in] ChildHandle Pointer to the handle of the child to create. If\r | |
152 | it is NULL, then a new handle is created. If it\r | |
153 | is not NULL, then the I/O services are added to\r | |
154 | the existing child handle.\r | |
155 | \r | |
156 | @retval EFI_SUCCES The child handle was created with the I/O services.\r | |
c2adf51f | 157 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r |
a3bcde70 HT |
158 | the child.\r |
159 | @retval other The child handle was not created.\r | |
160 | \r | |
161 | **/\r | |
162 | EFI_STATUS\r | |
163 | EFIAPI\r | |
164 | Ip6ServiceBindingCreateChild (\r | |
165 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
166 | IN EFI_HANDLE *ChildHandle\r | |
167 | );\r | |
168 | \r | |
169 | /**\r | |
170 | Destroys a child handle with a set of I/O services.\r | |
171 | \r | |
172 | @param[in] This Protocol instance pointer.\r | |
173 | @param[in] ChildHandle Handle of the child to destroy.\r | |
174 | \r | |
175 | @retval EFI_SUCCES The I/O services were removed from the child\r | |
176 | handle.\r | |
177 | @retval EFI_UNSUPPORTED The child handle does not support the I/O services\r | |
178 | that are being removed.\r | |
15ee13fc | 179 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r |
a3bcde70 HT |
180 | @retval EFI_ACCESS_DENIED The child handle could not be destroyed because\r |
181 | its I/O services are being used.\r | |
182 | @retval other The child handle was not destroyed.\r | |
183 | \r | |
184 | **/\r | |
185 | EFI_STATUS\r | |
186 | EFIAPI\r | |
187 | Ip6ServiceBindingDestroyChild (\r | |
188 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
189 | IN EFI_HANDLE ChildHandle\r | |
190 | );\r | |
191 | \r | |
192 | #endif\r |