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