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