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