]>
Commit | Line | Data |
---|---|---|
d933e70a JW |
1 | /** @file\r |
2 | UEFI HTTP boot driver's private data structure and interfaces declaration.\r | |
3 | \r | |
fa848a40 | 4 | Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r |
90f658c4 | 5 | (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r |
d933e70a JW |
6 | This program and the accompanying materials are licensed and made available under \r |
7 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
8 | 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_HTTP_BOOT_DXE_H__\r | |
17 | #define __EFI_HTTP_BOOT_DXE_H__\r | |
18 | \r | |
19 | #include <Uefi.h>\r | |
20 | \r | |
90f658c4 SEHM |
21 | #include <IndustryStandard/Http11.h>\r |
22 | \r | |
d933e70a JW |
23 | //\r |
24 | // Libraries\r | |
25 | //\r | |
26 | #include <Library/UefiBootServicesTableLib.h>\r | |
fa848a40 FS |
27 | #include <Library/UefiHiiServicesLib.h>\r |
28 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
d933e70a JW |
29 | #include <Library/MemoryAllocationLib.h>\r |
30 | #include <Library/BaseLib.h>\r | |
31 | #include <Library/UefiLib.h>\r | |
32 | #include <Library/DevicePathLib.h>\r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/NetLib.h>\r | |
35 | #include <Library/HttpLib.h>\r | |
fa848a40 FS |
36 | #include <Library/HiiLib.h>\r |
37 | #include <Library/PrintLib.h>\r | |
d933e70a JW |
38 | \r |
39 | //\r | |
40 | // UEFI Driver Model Protocols\r | |
41 | //\r | |
42 | #include <Protocol/DriverBinding.h>\r | |
43 | #include <Protocol/ComponentName2.h>\r | |
44 | #include <Protocol/ComponentName.h>\r | |
45 | \r | |
46 | //\r | |
47 | // Consumed Protocols\r | |
48 | //\r | |
fa848a40 FS |
49 | #include <Protocol/ServiceBinding.h>\r |
50 | #include <Protocol/HiiConfigAccess.h>\r | |
d933e70a JW |
51 | #include <Protocol/NetworkInterfaceIdentifier.h>\r |
52 | #include <Protocol/Dhcp4.h>\r | |
b659408b ZL |
53 | #include <Protocol/Dhcp6.h>\r |
54 | #include <Protocol/Dns6.h>\r | |
d933e70a JW |
55 | #include <Protocol/Http.h>\r |
56 | #include <Protocol/Ip4Config2.h>\r | |
b659408b | 57 | #include <Protocol/Ip6Config.h>\r |
d933e70a JW |
58 | //\r |
59 | // Produced Protocols\r | |
60 | //\r | |
61 | #include <Protocol/LoadFile.h>\r | |
62 | \r | |
fa848a40 FS |
63 | //\r |
64 | // Consumed Guids\r | |
65 | //\r | |
66 | #include <Guid/HttpBootConfigHii.h>\r | |
67 | \r | |
d933e70a JW |
68 | //\r |
69 | // Driver Version\r | |
70 | //\r | |
71 | #define HTTP_BOOT_DXE_VERSION 0xa\r | |
72 | \r | |
73 | //\r | |
74 | // Protocol instances\r | |
75 | //\r | |
76 | extern EFI_DRIVER_BINDING_PROTOCOL gHttpBootDxeDriverBinding;\r | |
77 | extern EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2;\r | |
78 | extern EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName;\r | |
79 | \r | |
80 | //\r | |
81 | // Private data structure\r | |
82 | //\r | |
83 | typedef struct _HTTP_BOOT_PRIVATE_DATA HTTP_BOOT_PRIVATE_DATA;\r | |
b659408b | 84 | typedef struct _HTTP_BOOT_VIRTUAL_NIC HTTP_BOOT_VIRTUAL_NIC;\r |
d933e70a JW |
85 | \r |
86 | //\r | |
87 | // Include files with internal function prototypes\r | |
88 | //\r | |
89 | #include "HttpBootComponentName.h"\r | |
90 | #include "HttpBootDhcp4.h"\r | |
b659408b | 91 | #include "HttpBootDhcp6.h"\r |
d933e70a JW |
92 | #include "HttpBootImpl.h"\r |
93 | #include "HttpBootSupport.h"\r | |
94 | #include "HttpBootClient.h"\r | |
fa848a40 | 95 | #include "HttpBootConfig.h"\r |
d933e70a JW |
96 | \r |
97 | typedef union {\r | |
98 | HTTP_BOOT_DHCP4_PACKET_CACHE Dhcp4;\r | |
b659408b | 99 | HTTP_BOOT_DHCP6_PACKET_CACHE Dhcp6;\r |
d933e70a JW |
100 | } HTTP_BOOT_DHCP_PACKET_CACHE;\r |
101 | \r | |
b659408b ZL |
102 | struct _HTTP_BOOT_VIRTUAL_NIC {\r |
103 | UINT32 Signature;\r | |
104 | EFI_HANDLE Controller;\r | |
105 | EFI_LOAD_FILE_PROTOCOL LoadFile;\r | |
106 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
107 | HTTP_BOOT_PRIVATE_DATA *Private;\r | |
108 | };\r | |
109 | \r | |
fa848a40 FS |
110 | #define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO(Callback) \\r |
111 | CR ( \\r | |
112 | Callback, \\r | |
113 | HTTP_BOOT_PRIVATE_DATA, \\r | |
114 | CallbackInfo, \\r | |
115 | HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r | |
116 | )\r | |
117 | \r | |
d933e70a JW |
118 | struct _HTTP_BOOT_PRIVATE_DATA {\r |
119 | UINT32 Signature;\r | |
120 | EFI_HANDLE Controller;\r | |
121 | EFI_HANDLE Image;\r | |
122 | \r | |
b659408b ZL |
123 | HTTP_BOOT_VIRTUAL_NIC *Ip4Nic;\r |
124 | HTTP_BOOT_VIRTUAL_NIC *Ip6Nic;\r | |
125 | \r | |
d933e70a JW |
126 | //\r |
127 | // Cousumed children\r | |
128 | //\r | |
b659408b | 129 | EFI_HANDLE Ip6Child;\r |
d933e70a | 130 | EFI_HANDLE Dhcp4Child;\r |
b659408b | 131 | EFI_HANDLE Dhcp6Child;\r |
d933e70a JW |
132 | HTTP_IO HttpIo;\r |
133 | BOOLEAN HttpCreated;\r | |
134 | \r | |
135 | //\r | |
136 | // Consumed protocol\r | |
137 | //\r | |
138 | EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;\r | |
b659408b | 139 | EFI_IP6_PROTOCOL *Ip6;\r |
d933e70a | 140 | EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;\r |
b659408b | 141 | EFI_IP6_CONFIG_PROTOCOL *Ip6Config;\r |
d933e70a | 142 | EFI_DHCP4_PROTOCOL *Dhcp4;\r |
b659408b | 143 | EFI_DHCP6_PROTOCOL *Dhcp6;\r |
d933e70a JW |
144 | EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;\r |
145 | \r | |
d933e70a JW |
146 | \r |
147 | //\r | |
148 | // Produced protocol\r | |
149 | //\r | |
150 | EFI_LOAD_FILE_PROTOCOL LoadFile;\r | |
151 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
152 | UINT32 Id;\r | |
153 | \r | |
fa848a40 FS |
154 | //\r |
155 | // HII callback info block\r | |
156 | //\r | |
157 | HTTP_BOOT_FORM_CALLBACK_INFO CallbackInfo;\r | |
158 | \r | |
d933e70a JW |
159 | //\r |
160 | // Mode data\r | |
161 | //\r | |
162 | BOOLEAN UsingIpv6;\r | |
163 | BOOLEAN Started;\r | |
164 | EFI_IP_ADDRESS StationIp;\r | |
165 | EFI_IP_ADDRESS SubnetMask;\r | |
166 | EFI_IP_ADDRESS GatewayIp;\r | |
b659408b | 167 | EFI_IP_ADDRESS ServerIp;\r |
d933e70a JW |
168 | UINT16 Port;\r |
169 | CHAR8 *BootFileUri;\r | |
170 | VOID *BootFileUriParser;\r | |
171 | UINTN BootFileSize;\r | |
b659408b | 172 | BOOLEAN NoGateway;\r |
d933e70a | 173 | \r |
fa848a40 FS |
174 | //\r |
175 | // URI string extracted from the input FilePath parameter.\r | |
176 | //\r | |
177 | CHAR8 *FilePathUri;\r | |
178 | VOID *FilePathUriParser;\r | |
179 | \r | |
d933e70a JW |
180 | //\r |
181 | // Cached HTTP data\r | |
182 | //\r | |
183 | LIST_ENTRY CacheList;\r | |
184 | \r | |
185 | //\r | |
186 | // Cached DHCP offer\r | |
187 | //\r | |
188 | // OfferIndex records the index of DhcpOffer[] buffer, and OfferCount records the num of each type of offer.\r | |
189 | //\r | |
190 | // It supposed that\r | |
191 | //\r | |
192 | // OfferNum: 8\r | |
193 | // OfferBuffer: [ProxyNameUri, DhcpNameUri, DhcpIpUri, ProxyNameUri, ProxyIpUri, DhcpOnly, DhcpIpUri, DhcpNameUriDns]\r | |
194 | // (OfferBuffer is 0-based.)\r | |
195 | //\r | |
196 | // And assume that (DhcpIpUri is the first priority actually.)\r | |
197 | //\r | |
198 | // SelectIndex: 5\r | |
199 | // SelectProxyType: HttpOfferTypeProxyIpUri\r | |
200 | // (SelectIndex is 1-based, and 0 means no one is selected.)\r | |
201 | //\r | |
202 | // So it should be\r | |
203 | //\r | |
204 | // DhcpIpUri DhcpNameUriDns DhcpDns DhcpOnly ProxyNameUri ProxyIpUri DhcpNameUri\r | |
205 | // OfferCount: [ 2, 1, 0, 1, 2, 1, 1]\r | |
206 | //\r | |
207 | // OfferIndex: {[ 2, 7, 0, 5, 0, *4, 1]\r | |
208 | // [ 6, 0, 0, 0, 3, 0, 0]\r | |
209 | // [ 0, 0, 0, 0, 0, 0, 0]\r | |
210 | // ... ]}\r | |
211 | // (OfferIndex is 0-based.)\r | |
212 | //\r | |
213 | //\r | |
214 | UINT32 SelectIndex;\r | |
215 | UINT32 SelectProxyType;\r | |
216 | HTTP_BOOT_DHCP_PACKET_CACHE OfferBuffer[HTTP_BOOT_OFFER_MAX_NUM];\r | |
217 | UINT32 OfferNum;\r | |
218 | UINT32 OfferCount[HttpOfferTypeMax];\r | |
219 | UINT32 OfferIndex[HttpOfferTypeMax][HTTP_BOOT_OFFER_MAX_NUM];\r | |
220 | };\r | |
221 | \r | |
222 | #define HTTP_BOOT_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'B', 'P', 'D')\r | |
b659408b | 223 | #define HTTP_BOOT_VIRTUAL_NIC_SIGNATURE SIGNATURE_32 ('H', 'B', 'V', 'N')\r |
d933e70a JW |
224 | #define HTTP_BOOT_PRIVATE_DATA_FROM_LOADFILE(a) CR (a, HTTP_BOOT_PRIVATE_DATA, LoadFile, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r |
225 | #define HTTP_BOOT_PRIVATE_DATA_FROM_ID(a) CR (a, HTTP_BOOT_PRIVATE_DATA, Id, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r | |
b659408b | 226 | #define HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, HTTP_BOOT_VIRTUAL_NIC, LoadFile, HTTP_BOOT_VIRTUAL_NIC_SIGNATURE)\r |
d933e70a JW |
227 | extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;\r |
228 | \r | |
229 | /**\r | |
230 | Tests to see if this driver supports a given controller. If a child device is provided, \r | |
231 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
232 | \r | |
233 | This function checks to see if the driver specified by This supports the device specified by \r | |
234 | ControllerHandle. Drivers will typically use the device path attached to \r | |
235 | ControllerHandle and/or the services from the bus I/O abstraction attached to \r | |
236 | ControllerHandle to determine if the driver supports ControllerHandle. This function \r | |
237 | may be called many times during platform initialization. In order to reduce boot times, the tests \r | |
238 | performed by this function must be very small, and take as little time as possible to execute. This \r | |
239 | function must not change the state of any hardware devices, and this function must be aware that the \r | |
240 | device specified by ControllerHandle may already be managed by the same driver or a \r | |
241 | different driver. This function must match its calls to AllocatePages() with FreePages(), \r | |
242 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r | |
243 | Because ControllerHandle may have been previously started by the same driver, if a protocol is \r | |
244 | already in the opened state, then it must not be closed with CloseProtocol(). This is required \r | |
245 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
246 | \r | |
247 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
248 | @param[in] ControllerHandle The handle of the controller to test. This handle \r | |
249 | must support a protocol interface that supplies \r | |
250 | an I/O abstraction to the driver.\r | |
251 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
252 | parameter is ignored by device drivers, and is optional for bus \r | |
253 | drivers. For bus drivers, if this parameter is not NULL, then \r | |
254 | the bus driver must determine if the bus controller specified \r | |
255 | by ControllerHandle and the child controller specified \r | |
256 | by RemainingDevicePath are both supported by this \r | |
257 | bus driver.\r | |
258 | \r | |
259 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
260 | RemainingDevicePath is supported by the driver specified by This.\r | |
261 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
262 | RemainingDevicePath is already being managed by the driver\r | |
263 | specified by This.\r | |
264 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
265 | RemainingDevicePath is already being managed by a different\r | |
266 | driver or an application that requires exclusive access.\r | |
267 | Currently not implemented.\r | |
268 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
269 | RemainingDevicePath is not supported by the driver specified by This.\r | |
270 | **/\r | |
271 | EFI_STATUS\r | |
272 | EFIAPI\r | |
273 | HttpBootIp4DxeDriverBindingSupported (\r | |
274 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
275 | IN EFI_HANDLE ControllerHandle,\r | |
276 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
277 | );\r | |
278 | \r | |
279 | /**\r | |
280 | Starts a device controller or a bus controller.\r | |
281 | \r | |
282 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
283 | As a result, much of the error checking on the parameters to Start() has been moved into this \r | |
284 | common boot service. It is legal to call Start() from other locations, \r | |
285 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
286 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
287 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
288 | EFI_DEVICE_PATH_PROTOCOL.\r | |
289 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
290 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r | |
291 | \r | |
292 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
293 | @param[in] ControllerHandle The handle of the controller to start. This handle \r | |
294 | must support a protocol interface that supplies \r | |
295 | an I/O abstraction to the driver.\r | |
296 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
297 | parameter is ignored by device drivers, and is optional for bus \r | |
298 | drivers. For a bus driver, if this parameter is NULL, then handles \r | |
299 | for all the children of Controller are created by this driver. \r | |
300 | If this parameter is not NULL and the first Device Path Node is \r | |
301 | not the End of Device Path Node, then only the handle for the \r | |
302 | child device specified by the first Device Path Node of \r | |
303 | RemainingDevicePath is created by this driver.\r | |
304 | If the first Device Path Node of RemainingDevicePath is \r | |
305 | the End of Device Path Node, no child handle is created by this\r | |
306 | driver.\r | |
307 | \r | |
308 | @retval EFI_SUCCESS The device was started.\r | |
309 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
310 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
311 | @retval Others The driver failded to start the device.\r | |
312 | \r | |
313 | **/\r | |
314 | EFI_STATUS\r | |
315 | EFIAPI\r | |
316 | HttpBootIp4DxeDriverBindingStart (\r | |
317 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
318 | IN EFI_HANDLE ControllerHandle,\r | |
319 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
320 | );\r | |
321 | \r | |
322 | /**\r | |
323 | Stops a device controller or a bus controller.\r | |
324 | \r | |
325 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r | |
326 | As a result, much of the error checking on the parameters to Stop() has been moved \r | |
327 | into this common boot service. It is legal to call Stop() from other locations, \r | |
328 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
329 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
330 | same driver's Start() function.\r | |
331 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
332 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
333 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
334 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
335 | \r | |
336 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
337 | @param[in] ControllerHandle A handle to the device being stopped. The handle must \r | |
338 | support a bus specific I/O protocol for the driver \r | |
339 | to use to stop the device.\r | |
340 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
341 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r | |
342 | if NumberOfChildren is 0.\r | |
343 | \r | |
344 | @retval EFI_SUCCESS The device was stopped.\r | |
345 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
346 | \r | |
347 | **/\r | |
348 | EFI_STATUS\r | |
349 | EFIAPI\r | |
350 | HttpBootIp4DxeDriverBindingStop (\r | |
351 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
352 | IN EFI_HANDLE ControllerHandle,\r | |
353 | IN UINTN NumberOfChildren,\r | |
354 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
355 | );\r | |
356 | \r | |
b659408b ZL |
357 | /**\r |
358 | Tests to see if this driver supports a given controller. If a child device is provided, \r | |
359 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
360 | \r | |
361 | This function checks to see if the driver specified by This supports the device specified by \r | |
362 | ControllerHandle. Drivers will typically use the device path attached to \r | |
363 | ControllerHandle and/or the services from the bus I/O abstraction attached to \r | |
364 | ControllerHandle to determine if the driver supports ControllerHandle. This function \r | |
365 | may be called many times during platform initialization. In order to reduce boot times, the tests \r | |
366 | performed by this function must be very small, and take as little time as possible to execute. This \r | |
367 | function must not change the state of any hardware devices, and this function must be aware that the \r | |
368 | device specified by ControllerHandle may already be managed by the same driver or a \r | |
369 | different driver. This function must match its calls to AllocatePages() with FreePages(), \r | |
370 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r | |
371 | Because ControllerHandle may have been previously started by the same driver, if a protocol is \r | |
372 | already in the opened state, then it must not be closed with CloseProtocol(). This is required \r | |
373 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
374 | \r | |
375 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
376 | @param[in] ControllerHandle The handle of the controller to test. This handle \r | |
377 | must support a protocol interface that supplies \r | |
378 | an I/O abstraction to the driver.\r | |
379 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
380 | parameter is ignored by device drivers, and is optional for bus \r | |
381 | drivers. For bus drivers, if this parameter is not NULL, then \r | |
382 | the bus driver must determine if the bus controller specified \r | |
383 | by ControllerHandle and the child controller specified \r | |
384 | by RemainingDevicePath are both supported by this \r | |
385 | bus driver.\r | |
386 | \r | |
387 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
388 | RemainingDevicePath is supported by the driver specified by This.\r | |
389 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
390 | RemainingDevicePath is already being managed by the driver\r | |
391 | specified by This.\r | |
392 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
393 | RemainingDevicePath is already being managed by a different\r | |
394 | driver or an application that requires exclusive access.\r | |
395 | Currently not implemented.\r | |
396 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
397 | RemainingDevicePath is not supported by the driver specified by This.\r | |
398 | **/\r | |
399 | EFI_STATUS\r | |
400 | EFIAPI\r | |
401 | HttpBootIp6DxeDriverBindingSupported (\r | |
402 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
403 | IN EFI_HANDLE ControllerHandle,\r | |
404 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
405 | );\r | |
406 | \r | |
407 | /**\r | |
408 | Starts a device controller or a bus controller.\r | |
409 | \r | |
410 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
411 | As a result, much of the error checking on the parameters to Start() has been moved into this \r | |
412 | common boot service. It is legal to call Start() from other locations, \r | |
413 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
414 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
415 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
416 | EFI_DEVICE_PATH_PROTOCOL.\r | |
417 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
418 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r | |
419 | \r | |
420 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
421 | @param[in] ControllerHandle The handle of the controller to start. This handle \r | |
422 | must support a protocol interface that supplies \r | |
423 | an I/O abstraction to the driver.\r | |
424 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
425 | parameter is ignored by device drivers, and is optional for bus \r | |
426 | drivers. For a bus driver, if this parameter is NULL, then handles \r | |
427 | for all the children of Controller are created by this driver. \r | |
428 | If this parameter is not NULL and the first Device Path Node is \r | |
429 | not the End of Device Path Node, then only the handle for the \r | |
430 | child device specified by the first Device Path Node of \r | |
431 | RemainingDevicePath is created by this driver.\r | |
432 | If the first Device Path Node of RemainingDevicePath is \r | |
433 | the End of Device Path Node, no child handle is created by this\r | |
434 | driver.\r | |
435 | \r | |
436 | @retval EFI_SUCCESS The device was started.\r | |
437 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
438 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
439 | @retval Others The driver failded to start the device.\r | |
440 | \r | |
441 | **/\r | |
442 | EFI_STATUS\r | |
443 | EFIAPI\r | |
444 | HttpBootIp6DxeDriverBindingStart (\r | |
445 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
446 | IN EFI_HANDLE ControllerHandle,\r | |
447 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
448 | );\r | |
449 | \r | |
450 | /**\r | |
451 | Stops a device controller or a bus controller.\r | |
452 | \r | |
453 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r | |
454 | As a result, much of the error checking on the parameters to Stop() has been moved \r | |
455 | into this common boot service. It is legal to call Stop() from other locations, \r | |
456 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
457 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
458 | same driver's Start() function.\r | |
459 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
460 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
461 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
462 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
463 | \r | |
464 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
465 | @param[in] ControllerHandle A handle to the device being stopped. The handle must \r | |
466 | support a bus specific I/O protocol for the driver \r | |
467 | to use to stop the device.\r | |
468 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
469 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r | |
470 | if NumberOfChildren is 0.\r | |
471 | \r | |
472 | @retval EFI_SUCCESS The device was stopped.\r | |
473 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
474 | \r | |
475 | **/\r | |
476 | EFI_STATUS\r | |
477 | EFIAPI\r | |
478 | HttpBootIp6DxeDriverBindingStop (\r | |
479 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
480 | IN EFI_HANDLE ControllerHandle,\r | |
481 | IN UINTN NumberOfChildren,\r | |
482 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
483 | );\r | |
d933e70a | 484 | #endif\r |