]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/HttpBootDxe/HttpBootDxe.h
NetworkPkg/IScsiDxe: Display InitiatorInfo in attempt page even DHCP enabled.
[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
7b1dbd15
JW
205 UINT32 DnsServerCount;\r
206 EFI_IP_ADDRESS *DnsServerIp;\r
587d204c
FS
207\r
208 //\r
209 // The URI string attempt to download through HTTP, may point to\r
210 // the memory in cached DHCP offer, or to the memory in FilePathUri.\r
211 //\r
d933e70a
JW
212 CHAR8 *BootFileUri;\r
213 VOID *BootFileUriParser;\r
214 UINTN BootFileSize;\r
b659408b 215 BOOLEAN NoGateway;\r
44a7d08b 216 HTTP_BOOT_IMAGE_TYPE ImageType;\r
d933e70a 217\r
fa848a40
FS
218 //\r
219 // URI string extracted from the input FilePath parameter.\r
220 //\r
221 CHAR8 *FilePathUri;\r
222 VOID *FilePathUriParser;\r
223\r
d933e70a
JW
224 //\r
225 // Cached HTTP data\r
226 //\r
227 LIST_ENTRY CacheList;\r
228\r
229 //\r
230 // Cached DHCP offer\r
231 //\r
232 // OfferIndex records the index of DhcpOffer[] buffer, and OfferCount records the num of each type of offer.\r
233 //\r
234 // It supposed that\r
235 //\r
236 // OfferNum: 8\r
237 // OfferBuffer: [ProxyNameUri, DhcpNameUri, DhcpIpUri, ProxyNameUri, ProxyIpUri, DhcpOnly, DhcpIpUri, DhcpNameUriDns]\r
238 // (OfferBuffer is 0-based.)\r
239 //\r
240 // And assume that (DhcpIpUri is the first priority actually.)\r
241 //\r
242 // SelectIndex: 5\r
243 // SelectProxyType: HttpOfferTypeProxyIpUri\r
244 // (SelectIndex is 1-based, and 0 means no one is selected.)\r
245 //\r
246 // So it should be\r
247 //\r
248 // DhcpIpUri DhcpNameUriDns DhcpDns DhcpOnly ProxyNameUri ProxyIpUri DhcpNameUri\r
249 // OfferCount: [ 2, 1, 0, 1, 2, 1, 1]\r
250 //\r
251 // OfferIndex: {[ 2, 7, 0, 5, 0, *4, 1]\r
252 // [ 6, 0, 0, 0, 3, 0, 0]\r
253 // [ 0, 0, 0, 0, 0, 0, 0]\r
254 // ... ]}\r
255 // (OfferIndex is 0-based.)\r
256 //\r
257 //\r
258 UINT32 SelectIndex;\r
259 UINT32 SelectProxyType;\r
260 HTTP_BOOT_DHCP_PACKET_CACHE OfferBuffer[HTTP_BOOT_OFFER_MAX_NUM];\r
261 UINT32 OfferNum;\r
262 UINT32 OfferCount[HttpOfferTypeMax];\r
263 UINT32 OfferIndex[HttpOfferTypeMax][HTTP_BOOT_OFFER_MAX_NUM];\r
264};\r
265\r
266#define HTTP_BOOT_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'B', 'P', 'D')\r
b659408b 267#define HTTP_BOOT_VIRTUAL_NIC_SIGNATURE SIGNATURE_32 ('H', 'B', 'V', 'N')\r
d933e70a
JW
268#define HTTP_BOOT_PRIVATE_DATA_FROM_LOADFILE(a) CR (a, HTTP_BOOT_PRIVATE_DATA, LoadFile, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r
269#define HTTP_BOOT_PRIVATE_DATA_FROM_ID(a) CR (a, HTTP_BOOT_PRIVATE_DATA, Id, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r
b659408b 270#define HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, HTTP_BOOT_VIRTUAL_NIC, LoadFile, HTTP_BOOT_VIRTUAL_NIC_SIGNATURE)\r
d933e70a
JW
271extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;\r
272\r
273/**\r
274 Tests to see if this driver supports a given controller. If a child device is provided, \r
275 it further tests to see if this driver supports creating a handle for the specified child device.\r
276\r
277 This function checks to see if the driver specified by This supports the device specified by \r
278 ControllerHandle. Drivers will typically use the device path attached to \r
279 ControllerHandle and/or the services from the bus I/O abstraction attached to \r
280 ControllerHandle to determine if the driver supports ControllerHandle. This function \r
281 may be called many times during platform initialization. In order to reduce boot times, the tests \r
282 performed by this function must be very small, and take as little time as possible to execute. This \r
283 function must not change the state of any hardware devices, and this function must be aware that the \r
284 device specified by ControllerHandle may already be managed by the same driver or a \r
285 different driver. This function must match its calls to AllocatePages() with FreePages(), \r
286 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r
287 Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
288 already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
289 to guarantee the state of ControllerHandle is not modified by this function.\r
290\r
291 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
292 @param[in] ControllerHandle The handle of the controller to test. This handle \r
293 must support a protocol interface that supplies \r
294 an I/O abstraction to the driver.\r
295 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
296 parameter is ignored by device drivers, and is optional for bus \r
297 drivers. For bus drivers, if this parameter is not NULL, then \r
298 the bus driver must determine if the bus controller specified \r
299 by ControllerHandle and the child controller specified \r
300 by RemainingDevicePath are both supported by this \r
301 bus driver.\r
302\r
303 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
304 RemainingDevicePath is supported by the driver specified by This.\r
305 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
306 RemainingDevicePath is already being managed by the driver\r
307 specified by This.\r
308 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
309 RemainingDevicePath is already being managed by a different\r
310 driver or an application that requires exclusive access.\r
311 Currently not implemented.\r
312 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
313 RemainingDevicePath is not supported by the driver specified by This.\r
314**/\r
315EFI_STATUS\r
316EFIAPI\r
317HttpBootIp4DxeDriverBindingSupported (\r
318 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
319 IN EFI_HANDLE ControllerHandle,\r
320 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
321 );\r
322\r
323/**\r
324 Starts a device controller or a bus controller.\r
325\r
326 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
327 As a result, much of the error checking on the parameters to Start() has been moved into this \r
328 common boot service. It is legal to call Start() from other locations, \r
329 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
330 1. ControllerHandle must be a valid EFI_HANDLE.\r
331 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
332 EFI_DEVICE_PATH_PROTOCOL.\r
333 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
334 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r
335\r
336 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
337 @param[in] ControllerHandle The handle of the controller to start. This handle \r
338 must support a protocol interface that supplies \r
339 an I/O abstraction to the driver.\r
340 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
341 parameter is ignored by device drivers, and is optional for bus \r
342 drivers. For a bus driver, if this parameter is NULL, then handles \r
343 for all the children of Controller are created by this driver. \r
344 If this parameter is not NULL and the first Device Path Node is \r
345 not the End of Device Path Node, then only the handle for the \r
346 child device specified by the first Device Path Node of \r
347 RemainingDevicePath is created by this driver.\r
348 If the first Device Path Node of RemainingDevicePath is \r
349 the End of Device Path Node, no child handle is created by this\r
350 driver.\r
351\r
352 @retval EFI_SUCCESS The device was started.\r
353 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
354 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
355 @retval Others The driver failded to start the device.\r
356\r
357**/\r
358EFI_STATUS\r
359EFIAPI\r
360HttpBootIp4DxeDriverBindingStart (\r
361 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
362 IN EFI_HANDLE ControllerHandle,\r
363 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
364 );\r
365\r
366/**\r
367 Stops a device controller or a bus controller.\r
368 \r
369 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
370 As a result, much of the error checking on the parameters to Stop() has been moved \r
371 into this common boot service. It is legal to call Stop() from other locations, \r
372 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
373 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
374 same driver's Start() function.\r
375 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
376 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
377 Start() function, and the Start() function must have called OpenProtocol() on\r
378 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
379 \r
380 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
381 @param[in] ControllerHandle A handle to the device being stopped. The handle must \r
382 support a bus specific I/O protocol for the driver \r
383 to use to stop the device.\r
384 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
385 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r
386 if NumberOfChildren is 0.\r
387\r
388 @retval EFI_SUCCESS The device was stopped.\r
389 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
390\r
391**/\r
392EFI_STATUS\r
393EFIAPI\r
394HttpBootIp4DxeDriverBindingStop (\r
395 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
396 IN EFI_HANDLE ControllerHandle,\r
397 IN UINTN NumberOfChildren,\r
398 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
399 );\r
400\r
b659408b
ZL
401/**\r
402 Tests to see if this driver supports a given controller. If a child device is provided, \r
403 it further tests to see if this driver supports creating a handle for the specified child device.\r
404\r
405 This function checks to see if the driver specified by This supports the device specified by \r
406 ControllerHandle. Drivers will typically use the device path attached to \r
407 ControllerHandle and/or the services from the bus I/O abstraction attached to \r
408 ControllerHandle to determine if the driver supports ControllerHandle. This function \r
409 may be called many times during platform initialization. In order to reduce boot times, the tests \r
410 performed by this function must be very small, and take as little time as possible to execute. This \r
411 function must not change the state of any hardware devices, and this function must be aware that the \r
412 device specified by ControllerHandle may already be managed by the same driver or a \r
413 different driver. This function must match its calls to AllocatePages() with FreePages(), \r
414 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r
415 Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
416 already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
417 to guarantee the state of ControllerHandle is not modified by this function.\r
418\r
419 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
420 @param[in] ControllerHandle The handle of the controller to test. This handle \r
421 must support a protocol interface that supplies \r
422 an I/O abstraction to the driver.\r
423 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
424 parameter is ignored by device drivers, and is optional for bus \r
425 drivers. For bus drivers, if this parameter is not NULL, then \r
426 the bus driver must determine if the bus controller specified \r
427 by ControllerHandle and the child controller specified \r
428 by RemainingDevicePath are both supported by this \r
429 bus driver.\r
430\r
431 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
432 RemainingDevicePath is supported by the driver specified by This.\r
433 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
434 RemainingDevicePath is already being managed by the driver\r
435 specified by This.\r
436 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
437 RemainingDevicePath is already being managed by a different\r
438 driver or an application that requires exclusive access.\r
439 Currently not implemented.\r
440 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
441 RemainingDevicePath is not supported by the driver specified by This.\r
442**/\r
443EFI_STATUS\r
444EFIAPI\r
445HttpBootIp6DxeDriverBindingSupported (\r
446 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
447 IN EFI_HANDLE ControllerHandle,\r
448 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
449 );\r
450\r
451/**\r
452 Starts a device controller or a bus controller.\r
453\r
454 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
455 As a result, much of the error checking on the parameters to Start() has been moved into this \r
456 common boot service. It is legal to call Start() from other locations, \r
457 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
458 1. ControllerHandle must be a valid EFI_HANDLE.\r
459 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
460 EFI_DEVICE_PATH_PROTOCOL.\r
461 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
462 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r
463\r
464 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
465 @param[in] ControllerHandle The handle of the controller to start. This handle \r
466 must support a protocol interface that supplies \r
467 an I/O abstraction to the driver.\r
468 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
469 parameter is ignored by device drivers, and is optional for bus \r
470 drivers. For a bus driver, if this parameter is NULL, then handles \r
471 for all the children of Controller are created by this driver. \r
472 If this parameter is not NULL and the first Device Path Node is \r
473 not the End of Device Path Node, then only the handle for the \r
474 child device specified by the first Device Path Node of \r
475 RemainingDevicePath is created by this driver.\r
476 If the first Device Path Node of RemainingDevicePath is \r
477 the End of Device Path Node, no child handle is created by this\r
478 driver.\r
479\r
480 @retval EFI_SUCCESS The device was started.\r
481 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
482 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
483 @retval Others The driver failded to start the device.\r
484\r
485**/\r
486EFI_STATUS\r
487EFIAPI\r
488HttpBootIp6DxeDriverBindingStart (\r
489 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
490 IN EFI_HANDLE ControllerHandle,\r
491 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
492 );\r
493\r
494/**\r
495 Stops a device controller or a bus controller.\r
496 \r
497 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
498 As a result, much of the error checking on the parameters to Stop() has been moved \r
499 into this common boot service. It is legal to call Stop() from other locations, \r
500 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
501 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
502 same driver's Start() function.\r
503 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
504 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
505 Start() function, and the Start() function must have called OpenProtocol() on\r
506 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
507 \r
508 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
509 @param[in] ControllerHandle A handle to the device being stopped. The handle must \r
510 support a bus specific I/O protocol for the driver \r
511 to use to stop the device.\r
512 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
513 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r
514 if NumberOfChildren is 0.\r
515\r
516 @retval EFI_SUCCESS The device was stopped.\r
517 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
518\r
519**/\r
520EFI_STATUS\r
521EFIAPI\r
522HttpBootIp6DxeDriverBindingStop (\r
523 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
524 IN EFI_HANDLE ControllerHandle,\r
525 IN UINTN NumberOfChildren,\r
526 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
527 );\r
d933e70a 528#endif\r