]>
Commit | Line | Data |
---|---|---|
432cf05b | 1 | /** @file\r |
2 | DiskIo driver that layers it's self on every Block IO protocol in the system.\r | |
3 | DiskIo converts a block oriented device to a byte oriented device.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2009, Intel Corporation \r | |
6 | All rights reserved. This program and the accompanying materials \r | |
7 | are licensed and made available under the terms and conditions of the BSD License \r | |
8 | which accompanies this distribution. 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 _DISK_IO_H\r | |
17 | #define _DISK_IO_H\r | |
18 | \r | |
19 | #include <Uefi.h>\r | |
20 | #include <Protocol/BlockIo.h>\r | |
21 | #include <Protocol/ComponentName.h>\r | |
22 | #include <Protocol/DriverBinding.h>\r | |
23 | #include <Protocol/DriverConfiguration.h>\r | |
24 | #include <Protocol/DriverConfiguration2.h>\r | |
25 | #include <Protocol/DriverHealth.h>\r | |
26 | #include <Protocol/DiskIo.h>\r | |
27 | #include <Protocol/HiiDatabase.h>\r | |
28 | #include <Protocol/HiiConfigAccess.h>\r | |
29 | #include <Protocol/HiiConfigRouting.h>\r | |
30 | #include <Protocol/DevicePath.h>\r | |
31 | #include <Protocol/HiiString.h>\r | |
32 | \r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/UefiDriverEntryPoint.h>\r | |
35 | #include <Library/UefiLib.h>\r | |
36 | #include <Library/BaseLib.h>\r | |
37 | #include <Library/BaseMemoryLib.h>\r | |
38 | #include <Library/MemoryAllocationLib.h>\r | |
39 | #include <Library/UefiBootServicesTableLib.h>\r | |
40 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
41 | #include <Library/DevicePathLib.h>\r | |
42 | #include <Library/HiiLib.h>\r | |
43 | #include <Library/PrintLib.h>\r | |
44 | #include "NVDataStruc.h"\r | |
45 | \r | |
46 | #define DISK_IO_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('d', 's', 'k', 'I') \r | |
47 | \r | |
48 | #define DISK_IO_CONTROLLER_STATE_SIGNATURE SIGNATURE_32 ('c', 't', 's', 'S') \r | |
49 | \r | |
50 | #define DATA_BUFFER_BLOCK_NUM (64)\r | |
51 | \r | |
52 | typedef struct {\r | |
53 | VENDOR_DEVICE_PATH VendorDevicePath;\r | |
54 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
55 | } HII_VENDOR_DEVICE_PATH;\r | |
56 | \r | |
57 | typedef struct {\r | |
58 | UINTN Signature;\r | |
59 | EFI_DISK_IO_PROTOCOL DiskIo;\r | |
60 | EFI_BLOCK_IO_PROTOCOL *BlockIo;\r | |
61 | EFI_HANDLE Handle;\r | |
62 | //\r | |
63 | // Consumed protocol\r | |
64 | //\r | |
65 | EFI_HII_DATABASE_PROTOCOL *HiiDatabase;\r | |
66 | EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r | |
67 | \r | |
68 | //\r | |
69 | // Produced protocol\r | |
70 | //\r | |
71 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
72 | \r | |
73 | DISK_IO_NV_DATA NVdata;\r | |
74 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r | |
75 | UINT8 ControllerIndex;\r | |
76 | } DISK_IO_PRIVATE_DATA;\r | |
77 | \r | |
78 | typedef struct {\r | |
79 | BOOLEAN StartState;\r | |
80 | UINTN CurrentState;\r | |
81 | UINTN NextState;\r | |
82 | EFI_STRING_ID StringId;\r | |
83 | BOOLEAN RepairNotify;\r | |
84 | EFI_DRIVER_HEALTH_STATUS HealthStatus;\r | |
85 | } DEVICE_STATE;\r | |
86 | \r | |
87 | typedef struct {\r | |
88 | UINTN Signature;\r | |
89 | LIST_ENTRY Link;\r | |
90 | \r | |
91 | EFI_HANDLE ControllerHandle;\r | |
92 | UINTN ControllerIndex;\r | |
93 | EFI_HANDLE ChildHandle;\r | |
94 | UINTN DeviceStateNum;\r | |
95 | } CONTROLLER_STATE;\r | |
96 | \r | |
97 | #define DISK_IO_PRIVATE_DATA_FROM_THIS(a) CR (a, DISK_IO_PRIVATE_DATA, DiskIo, DISK_IO_PRIVATE_DATA_SIGNATURE)\r | |
98 | #define DISK_IO_PRIVATE_DATA_FROM_CONFIG_ACCESS(a) CR (a, DISK_IO_PRIVATE_DATA, ConfigAccess, DISK_IO_PRIVATE_DATA_SIGNATURE)\r | |
99 | \r | |
100 | #define DISK_IO_CONTROLLER_STATE_FROM_HANDLE(a) CR (a, CONTROLLER_STATE, ControllerHandle, DISK_IO_CONTROLLER_STATE_SIGNATURE)\r | |
101 | #define DISK_IO_CONTROLLER_STATE_FROM_LINK(a) CR (a, CONTROLLER_STATE, Link, DISK_IO_CONTROLLER_STATE_SIGNATURE)\r | |
102 | //\r | |
103 | // Global Variables\r | |
104 | //\r | |
105 | extern EFI_DRIVER_BINDING_PROTOCOL gDiskIoDriverBinding;\r | |
106 | extern EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName;\r | |
107 | extern EFI_COMPONENT_NAME2_PROTOCOL gDiskIoComponentName2;\r | |
108 | extern EFI_DRIVER_HEALTH_PROTOCOL gDiskIoDriverHealth;\r | |
109 | \r | |
110 | //\r | |
111 | // This is the generated String package data for all .UNI files.\r | |
112 | // This data array is ready to be used as input of HiiAddPackages() to\r | |
113 | // create a packagelist (which contains Form packages, String packages, etc).\r | |
114 | //\r | |
115 | extern UINT8 DriverHealthDxeStrings[];\r | |
116 | extern UINT8 DriverHealthVfrBin[];\r | |
117 | \r | |
118 | \r | |
119 | //\r | |
120 | // Prototypes\r | |
121 | // Driver model protocol interface\r | |
122 | //\r | |
123 | /**\r | |
124 | Test to see if this driver supports ControllerHandle. \r | |
125 | \r | |
126 | @param This Protocol instance pointer.\r | |
127 | @param ControllerHandle Handle of device to test\r | |
128 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
129 | device to start.\r | |
130 | \r | |
131 | @retval EFI_SUCCESS This driver supports this device\r | |
132 | @retval EFI_ALREADY_STARTED This driver is already running on this device\r | |
133 | @retval other This driver does not support this device\r | |
134 | \r | |
135 | **/\r | |
136 | EFI_STATUS\r | |
137 | EFIAPI\r | |
138 | DiskIoDriverBindingSupported (\r | |
139 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
140 | IN EFI_HANDLE ControllerHandle,\r | |
141 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
142 | );\r | |
143 | \r | |
144 | /**\r | |
145 | Start this driver on ControllerHandle by opening a Block IO protocol and\r | |
146 | installing a Disk IO protocol on ControllerHandle.\r | |
147 | \r | |
148 | @param This Protocol instance pointer.\r | |
149 | @param ControllerHandle Handle of device to bind driver to\r | |
150 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
151 | device to start.\r | |
152 | \r | |
153 | @retval EFI_SUCCESS This driver is added to ControllerHandle\r | |
154 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r | |
155 | @retval other This driver does not support this device\r | |
156 | \r | |
157 | **/\r | |
158 | EFI_STATUS\r | |
159 | EFIAPI\r | |
160 | DiskIoDriverBindingStart (\r | |
161 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
162 | IN EFI_HANDLE ControllerHandle,\r | |
163 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
164 | );\r | |
165 | \r | |
166 | /**\r | |
167 | Stop this driver on ControllerHandle by removing Disk IO protocol and closing\r | |
168 | the Block IO protocol on ControllerHandle.\r | |
169 | \r | |
170 | @param This Protocol instance pointer.\r | |
171 | @param ControllerHandle Handle of device to stop driver on\r | |
172 | @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r | |
173 | children is zero stop the entire bus driver.\r | |
174 | @param ChildHandleBuffer List of Child Handles to Stop.\r | |
175 | \r | |
176 | @retval EFI_SUCCESS This driver is removed ControllerHandle\r | |
177 | @retval other This driver was not removed from this device\r | |
178 | \r | |
179 | **/\r | |
180 | EFI_STATUS\r | |
181 | EFIAPI\r | |
182 | DiskIoDriverBindingStop (\r | |
183 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
184 | IN EFI_HANDLE ControllerHandle,\r | |
185 | IN UINTN NumberOfChildren,\r | |
186 | IN EFI_HANDLE *ChildHandleBuffer\r | |
187 | );\r | |
188 | \r | |
189 | //\r | |
190 | // Disk I/O Protocol Interface\r | |
191 | //\r | |
192 | /**\r | |
193 | Read BufferSize bytes from Offset into Buffer.\r | |
194 | Reads may support reads that are not aligned on\r | |
195 | sector boundaries. There are three cases:\r | |
196 | UnderRun - The first byte is not on a sector boundary or the read request is\r | |
197 | less than a sector in length.\r | |
198 | Aligned - A read of N contiguous sectors.\r | |
199 | OverRun - The last byte is not on a sector boundary.\r | |
200 | \r | |
201 | @param This Protocol instance pointer.\r | |
202 | @param MediaId Id of the media, changes every time the media is replaced.\r | |
203 | @param Offset The starting byte offset to read from\r | |
204 | @param BufferSize Size of Buffer\r | |
205 | @param Buffer Buffer containing read data\r | |
206 | \r | |
207 | @retval EFI_SUCCESS The data was read correctly from the device.\r | |
208 | @retval EFI_DEVICE_ERROR The device reported an error while performing the read.\r | |
209 | @retval EFI_NO_MEDIA There is no media in the device.\r | |
210 | @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r | |
211 | @retval EFI_INVALID_PARAMETER The read request contains device addresses that are not\r | |
212 | valid for the device.\r | |
213 | \r | |
214 | **/\r | |
215 | EFI_STATUS\r | |
216 | EFIAPI\r | |
217 | DiskIoReadDisk (\r | |
218 | IN EFI_DISK_IO_PROTOCOL *This,\r | |
219 | IN UINT32 MediaId,\r | |
220 | IN UINT64 Offset,\r | |
221 | IN UINTN BufferSize,\r | |
222 | OUT VOID *Buffer\r | |
223 | );\r | |
224 | \r | |
225 | /**\r | |
226 | Writes BufferSize bytes from Buffer into Offset.\r | |
227 | Writes may require a read modify write to support writes that are not\r | |
228 | aligned on sector boundaries. There are three cases:\r | |
229 | UnderRun - The first byte is not on a sector boundary or the write request\r | |
230 | is less than a sector in length. Read modify write is required.\r | |
231 | Aligned - A write of N contiguous sectors.\r | |
232 | OverRun - The last byte is not on a sector boundary. Read modified write\r | |
233 | required.\r | |
234 | \r | |
235 | @param This Protocol instance pointer.\r | |
236 | @param MediaId Id of the media, changes every time the media is replaced.\r | |
237 | @param Offset The starting byte offset to read from\r | |
238 | @param BufferSize Size of Buffer\r | |
239 | @param Buffer Buffer containing read data\r | |
240 | \r | |
241 | @retval EFI_SUCCESS The data was written correctly to the device.\r | |
242 | @retval EFI_WRITE_PROTECTED The device can not be written to.\r | |
243 | @retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r | |
244 | @retval EFI_NO_MEDIA There is no media in the device.\r | |
245 | @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r | |
246 | @retval EFI_INVALID_PARAMETER The write request contains device addresses that are not\r | |
247 | valid for the device.\r | |
248 | \r | |
249 | **/\r | |
250 | EFI_STATUS\r | |
251 | EFIAPI\r | |
252 | DiskIoWriteDisk (\r | |
253 | IN EFI_DISK_IO_PROTOCOL *This,\r | |
254 | IN UINT32 MediaId,\r | |
255 | IN UINT64 Offset,\r | |
256 | IN UINTN BufferSize,\r | |
257 | IN VOID *Buffer\r | |
258 | );\r | |
259 | \r | |
260 | //\r | |
261 | // EFI Component Name Functions\r | |
262 | //\r | |
263 | /**\r | |
264 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
265 | \r | |
266 | This function retrieves the user readable name of a driver in the form of a\r | |
267 | Unicode string. If the driver specified by This has a user readable name in\r | |
268 | the language specified by Language, then a pointer to the driver name is\r | |
269 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
270 | by This does not support the language specified by Language,\r | |
271 | then EFI_UNSUPPORTED is returned.\r | |
272 | \r | |
273 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
274 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
275 | \r | |
276 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
277 | array indicating the language. This is the\r | |
278 | language of the driver name that the caller is\r | |
279 | requesting, and it must match one of the\r | |
280 | languages specified in SupportedLanguages. The\r | |
281 | number of languages supported by a driver is up\r | |
282 | to the driver writer. Language is specified\r | |
283 | in RFC 4646 or ISO 639-2 language code format.\r | |
284 | \r | |
285 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
286 | This Unicode string is the name of the\r | |
287 | driver specified by This in the language\r | |
288 | specified by Language.\r | |
289 | \r | |
290 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
291 | This and the language specified by Language was\r | |
292 | returned in DriverName.\r | |
293 | \r | |
294 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
295 | \r | |
296 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
297 | \r | |
298 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
299 | the language specified by Language.\r | |
300 | \r | |
301 | **/\r | |
302 | EFI_STATUS\r | |
303 | EFIAPI\r | |
304 | DiskIoComponentNameGetDriverName (\r | |
305 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
306 | IN CHAR8 *Language,\r | |
307 | OUT CHAR16 **DriverName\r | |
308 | );\r | |
309 | \r | |
310 | /**\r | |
311 | Retrieves a Unicode string that is the user readable name of the controller\r | |
312 | that is being managed by a driver.\r | |
313 | \r | |
314 | This function retrieves the user readable name of the controller specified by\r | |
315 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
316 | driver specified by This has a user readable name in the language specified by\r | |
317 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
318 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
319 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
320 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
321 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
322 | \r | |
323 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
324 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
325 | \r | |
326 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
327 | specified by This is managing. This handle\r | |
328 | specifies the controller whose name is to be\r | |
329 | returned.\r | |
330 | \r | |
331 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
332 | the name of. This is an optional parameter that\r | |
333 | may be NULL. It will be NULL for device\r | |
334 | drivers. It will also be NULL for a bus drivers\r | |
335 | that wish to retrieve the name of the bus\r | |
336 | controller. It will not be NULL for a bus\r | |
337 | driver that wishes to retrieve the name of a\r | |
338 | child controller.\r | |
339 | \r | |
340 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
341 | array indicating the language. This is the\r | |
342 | language of the driver name that the caller is\r | |
343 | requesting, and it must match one of the\r | |
344 | languages specified in SupportedLanguages. The\r | |
345 | number of languages supported by a driver is up\r | |
346 | to the driver writer. Language is specified in\r | |
347 | RFC 4646 or ISO 639-2 language code format.\r | |
348 | \r | |
349 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
350 | This Unicode string is the name of the\r | |
351 | controller specified by ControllerHandle and\r | |
352 | ChildHandle in the language specified by\r | |
353 | Language from the point of view of the driver\r | |
354 | specified by This.\r | |
355 | \r | |
356 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
357 | the language specified by Language for the\r | |
358 | driver specified by This was returned in\r | |
359 | DriverName.\r | |
360 | \r | |
361 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
362 | \r | |
363 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
364 | EFI_HANDLE.\r | |
365 | \r | |
366 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
367 | \r | |
368 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
369 | \r | |
370 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
371 | managing the controller specified by\r | |
372 | ControllerHandle and ChildHandle.\r | |
373 | \r | |
374 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
375 | the language specified by Language.\r | |
376 | \r | |
377 | **/\r | |
378 | EFI_STATUS\r | |
379 | EFIAPI\r | |
380 | DiskIoComponentNameGetControllerName (\r | |
381 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
382 | IN EFI_HANDLE ControllerHandle,\r | |
383 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
384 | IN CHAR8 *Language,\r | |
385 | OUT CHAR16 **ControllerName\r | |
386 | );\r | |
387 | \r | |
388 | //\r | |
389 | // EFI Driver Health Functions\r | |
390 | //\r | |
391 | /**\r | |
392 | Retrieves the health status of a controller in the platform. This function can also \r | |
393 | optionally return warning messages, error messages, and a set of HII Forms that may \r | |
394 | be repair a controller that is not proper configured. \r | |
395 | \r | |
396 | @param This A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r | |
397 | \r | |
398 | @param ControllerHandle The handle of the controller to retrieve the health status \r | |
399 | on. This is an optional parameter that may be NULL. If \r | |
400 | this parameter is NULL, then the value of ChildHandle is \r | |
401 | ignored, and the combined health status of all the devices \r | |
402 | that the driver is managing is returned.\r | |
403 | \r | |
404 | @param ChildHandle The handle of the child controller to retrieve the health \r | |
405 | status on. This is an optional parameter that may be NULL. \r | |
406 | This parameter is ignored of ControllerHandle is NULL. It \r | |
407 | will be NULL for device drivers. It will also be NULL for \r | |
408 | bus drivers when an attempt is made to collect the health \r | |
409 | status of the bus controller. If will not be NULL when an \r | |
410 | attempt is made to collect the health status for a child \r | |
411 | controller produced by the driver.\r | |
412 | \r | |
413 | @param HealthStatus A pointer to the health status that is returned by this \r | |
414 | function. This is an optional parameter that may be NULL. \r | |
415 | This parameter is ignored of ControllerHandle is NULL. \r | |
416 | The health status for the controller specified by \r | |
417 | ControllerHandle and ChildHandle is returned. \r | |
418 | \r | |
419 | @param MessageList A pointer to an array of warning or error messages associated \r | |
420 | with the controller specified by ControllerHandle and \r | |
421 | ChildHandle. This is an optional parameter that may be NULL. \r | |
422 | MessageList is allocated by this function with the EFI Boot \r | |
423 | Service AllocatePool(), and it is the caller's responsibility \r | |
424 | to free MessageList with the EFI Boot Service FreePool(). \r | |
425 | Each message is specified by tuple of an EFI_HII_HANDLE and \r | |
426 | an EFI_STRING_ID. The array of messages is terminated by tuple \r | |
427 | containing a EFI_HII_HANDLE with a value of NULL. The \r | |
428 | EFI_HII_STRING_PROTOCOL.GetString() function can be used to \r | |
429 | retrieve the warning or error message as a Null-terminated \r | |
430 | Unicode string in a specific language. Messages may be \r | |
431 | returned for any of the HealthStatus values except \r | |
432 | EfiDriverHealthStatusReconnectRequired and \r | |
433 | EfiDriverHealthStatusRebootRequired.\r | |
434 | \r | |
435 | @param FormHiiHandle A pointer to the HII handle for an HII form associated with the \r | |
436 | controller specified by ControllerHandle and ChildHandle. \r | |
437 | This is an optional parameter that may be NULL. An HII form \r | |
438 | is specified by a combination of an EFI_HII_HANDLE and an \r | |
439 | EFI_GUID that identifies the Form Set GUID. The \r | |
440 | EFI_FORM_BROWSER2_PROTOCOL.SendForm() function can be used \r | |
441 | to display and allow the user to make configuration changes \r | |
442 | to the HII Form. An HII form may only be returned with a \r | |
443 | HealthStatus value of EfiDriverHealthStatusConfigurationRequired.\r | |
444 | \r | |
445 | @retval EFI_SUCCESS ControllerHandle is NULL, and all the controllers \r | |
446 | managed by this driver specified by This have a health \r | |
447 | status of EfiDriverHealthStatusHealthy with no warning \r | |
448 | messages to be returned. The ChildHandle, HealthStatus, \r | |
449 | MessageList, and FormList parameters are ignored.\r | |
450 | \r | |
451 | @retval EFI_DEVICE_ERROR ControllerHandle is NULL, and one or more of the \r | |
452 | controllers managed by this driver specified by This \r | |
453 | do not have a health status of EfiDriverHealthStatusHealthy. \r | |
454 | The ChildHandle, HealthStatus, MessageList, and \r | |
455 | FormList parameters are ignored.\r | |
456 | \r | |
457 | @retval EFI_DEVICE_ERROR ControllerHandle is NULL, and one or more of the \r | |
458 | controllers managed by this driver specified by This \r | |
459 | have one or more warning and/or error messages. \r | |
460 | The ChildHandle, HealthStatus, MessageList, and \r | |
461 | FormList parameters are ignored.\r | |
462 | \r | |
463 | @retval EFI_SUCCESS ControllerHandle is not NULL and the health status \r | |
464 | of the controller specified by ControllerHandle and \r | |
465 | ChildHandle was returned in HealthStatus. A list \r | |
466 | of warning and error messages may be optionally \r | |
467 | returned in MessageList, and a list of HII Forms \r | |
468 | may be optionally returned in FormList.\r | |
469 | \r | |
470 | @retval EFI_UNSUPPORTED ControllerHandle is not NULL, and the controller \r | |
471 | specified by ControllerHandle and ChildHandle is not \r | |
472 | currently being managed by the driver specified by This.\r | |
473 | \r | |
474 | @retval EFI_INVALID_PARAMETER HealthStatus is NULL.\r | |
475 | \r | |
476 | @retval EFI_OUT_OF_RESOURCES MessageList is not NULL, and there are not enough \r | |
477 | resource available to allocate memory for MessageList.\r | |
478 | \r | |
479 | **/\r | |
480 | EFI_STATUS\r | |
481 | DiskIoDriverHealthGetHealthStatus (\r | |
482 | IN EFI_DRIVER_HEALTH_PROTOCOL *This,\r | |
483 | IN EFI_HANDLE ControllerHandle OPTIONAL,\r | |
484 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
485 | OUT EFI_DRIVER_HEALTH_STATUS *HealthStatus,\r | |
486 | OUT EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList OPTIONAL,\r | |
487 | OUT EFI_HII_HANDLE *FormHiiHandle OPTIONAL\r | |
488 | );\r | |
489 | \r | |
490 | /**\r | |
491 | Performs a repair operation on a controller in the platform. This function can \r | |
492 | optionally report repair progress information back to the platform. \r | |
493 | \r | |
494 | @param This A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r | |
495 | @param ControllerHandle The handle of the controller to repair.\r | |
496 | @param ChildHandle The handle of the child controller to repair. This is \r | |
497 | an optional parameter that may be NULL. It will be NULL \r | |
498 | for device drivers. It will also be NULL for bus \r | |
499 | drivers when an attempt is made to repair a bus controller.\r | |
500 | If will not be NULL when an attempt is made to repair a \r | |
501 | child controller produced by the driver.\r | |
502 | @param RepairNotify A notification function that may be used by a driver to \r | |
503 | report the progress of the repair operation. This is \r | |
504 | an optional parameter that may be NULL. \r | |
505 | \r | |
506 | \r | |
507 | @retval EFI_SUCCESS An attempt to repair the controller specified by \r | |
508 | ControllerHandle and ChildHandle was performed. \r | |
509 | The result of the repair operation can be \r | |
510 | determined by calling GetHealthStatus().\r | |
511 | @retval EFI_UNSUPPORTED The driver specified by This is not currently \r | |
512 | managing the controller specified by ControllerHandle \r | |
513 | and ChildHandle.\r | |
514 | @retval EFI_OUT_OF_RESOURCES There are not enough resources to perform the \r | |
515 | repair operation.\r | |
516 | \r | |
517 | */\r | |
518 | EFI_STATUS\r | |
519 | DiskIoDriverHealthRepair (\r | |
520 | IN EFI_DRIVER_HEALTH_PROTOCOL *This,\r | |
521 | IN EFI_HANDLE ControllerHandle,\r | |
522 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
523 | IN EFI_DRIVER_HEALTH_REPAIR_PROGRESS_NOTIFY RepairNotify OPTIONAL\r | |
524 | );\r | |
525 | \r | |
526 | /**\r | |
527 | Initialize the serial configuration form.\r | |
528 | \r | |
529 | @retval EFI_SUCCESS The serial configuration form is initialized.\r | |
530 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
531 | @retval Others Other errors as indicated.\r | |
532 | **/\r | |
533 | EFI_STATUS\r | |
534 | DiskIoConfigFormInit (\r | |
535 | VOID\r | |
536 | );\r | |
537 | \r | |
538 | /**\r | |
539 | This function allows a caller to extract the current configuration for one\r | |
540 | or more named elements from the target driver.\r | |
541 | \r | |
542 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
543 | @param Request A null-terminated Unicode string in\r | |
544 | <ConfigRequest> format.\r | |
545 | @param Progress On return, points to a character in the Request\r | |
546 | string. Points to the string's null terminator if\r | |
547 | request was successful. Points to the most recent\r | |
548 | '&' before the first failing name/value pair (or\r | |
549 | the beginning of the string if the failure is in\r | |
550 | the first name/value pair) if the request was not\r | |
551 | successful.\r | |
552 | @param Results A null-terminated Unicode string in\r | |
553 | <ConfigAltResp> format which has all values filled\r | |
554 | in for the names in the Request string. String to\r | |
555 | be allocated by the called function.\r | |
556 | \r | |
557 | @retval EFI_SUCCESS The Results is filled with the requested values.\r | |
558 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.\r | |
559 | @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.\r | |
560 | @retval EFI_NOT_FOUND Routing data doesn't match any storage in this\r | |
561 | driver.\r | |
562 | \r | |
563 | **/\r | |
564 | EFI_STATUS\r | |
565 | EFIAPI\r | |
566 | DummyExtractConfig (\r | |
567 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
568 | IN CONST EFI_STRING Request,\r | |
569 | OUT EFI_STRING *Progress,\r | |
570 | OUT EFI_STRING *Results\r | |
571 | );\r | |
572 | \r | |
573 | /**\r | |
574 | This function processes the results of changes in configuration.\r | |
575 | \r | |
576 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
577 | @param Configuration A null-terminated Unicode string in <ConfigResp>\r | |
578 | format.\r | |
579 | @param Progress A pointer to a string filled in with the offset of\r | |
580 | the most recent '&' before the first failing\r | |
581 | name/value pair (or the beginning of the string if\r | |
582 | the failure is in the first name/value pair) or\r | |
583 | the terminating NULL if all was successful.\r | |
584 | \r | |
585 | @retval EFI_SUCCESS The Results is processed successfully.\r | |
586 | @retval EFI_INVALID_PARAMETER Configuration is NULL.\r | |
587 | @retval EFI_NOT_FOUND Routing data doesn't match any storage in this\r | |
588 | driver.\r | |
589 | \r | |
590 | **/\r | |
591 | EFI_STATUS\r | |
592 | EFIAPI\r | |
593 | DummyRouteConfig (\r | |
594 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
595 | IN CONST EFI_STRING Configuration,\r | |
596 | OUT EFI_STRING *Progress\r | |
597 | );\r | |
598 | \r | |
599 | /**\r | |
600 | This function processes the results of changes in configuration.\r | |
601 | \r | |
602 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
603 | @param Action Specifies the type of action taken by the browser.\r | |
604 | @param QuestionId A unique value which is sent to the original\r | |
605 | exporting driver so that it can identify the type\r | |
606 | of data to expect.\r | |
607 | @param Type The type of value for the question.\r | |
608 | @param Value A pointer to the data being sent to the original\r | |
609 | exporting driver.\r | |
610 | @param ActionRequest On return, points to the action requested by the\r | |
611 | callback function.\r | |
612 | \r | |
613 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
614 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the\r | |
615 | variable and its data.\r | |
616 | @retval EFI_DEVICE_ERROR The variable could not be saved.\r | |
617 | @retval EFI_UNSUPPORTED The specified Action is not supported by the\r | |
618 | callback.\r | |
619 | \r | |
620 | **/\r | |
621 | EFI_STATUS\r | |
622 | EFIAPI\r | |
623 | DummyDriverCallback (\r | |
624 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
625 | IN EFI_BROWSER_ACTION Action,\r | |
626 | IN EFI_QUESTION_ID QuestionId,\r | |
627 | IN UINT8 Type,\r | |
628 | IN EFI_IFR_TYPE_VALUE *Value,\r | |
629 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
630 | );\r | |
631 | \r | |
632 | /**\r | |
633 | Add the ISO639-2 and RFC4646 component name both for the Disk IO device\r | |
634 | \r | |
635 | @param DiskIoDevice A pointer to the DISK_IO_PRIVATE_DATA instance.\r | |
636 | \r | |
637 | **/\r | |
638 | VOID\r | |
639 | AddName (\r | |
640 | IN DISK_IO_PRIVATE_DATA *DiskIoDevice\r | |
641 | );\r | |
642 | \r | |
643 | #endif\r |