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