]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
SecurityPkg/OpalPassword: Add PCD to skip password prompt
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPassword / OpalDriver.h
CommitLineData
112e584b
SZ
1/** @file\r
2 Values defined and used by the Opal UEFI Driver.\r
3\r
a3efbc29 4Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r
289b714b 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
112e584b
SZ
6\r
7**/\r
8\r
9#ifndef _OPAL_DRIVER_H_\r
10#define _OPAL_DRIVER_H_\r
11\r
12#include <PiDxe.h>\r
13\r
14#include <IndustryStandard/Pci.h>\r
15\r
16#include <Protocol/PciIo.h>\r
17#include <Protocol/SmmCommunication.h>\r
18#include <Protocol/BlockIo.h>\r
19#include <Protocol/LoadedImage.h>\r
20#include <Protocol/DevicePath.h>\r
21#include <Protocol/DevicePathToText.h>\r
22#include <Protocol/StorageSecurityCommand.h>\r
23\r
24#include <Guid/EventGroup.h>\r
a3efbc29 25#include <Guid/S3StorageDeviceInitList.h>\r
112e584b
SZ
26\r
27#include <Library/UefiLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/UefiRuntimeServicesTableLib.h>\r
30#include <Library/DxeServicesTableLib.h>\r
31#include <Library/BaseMemoryLib.h>\r
32#include <Library/MemoryAllocationLib.h>\r
33#include <Library/BaseLib.h>\r
34#include <Library/PrintLib.h>\r
35#include <Library/DebugLib.h>\r
36#include <Library/DevicePathLib.h>\r
37#include <Library/HiiLib.h>\r
38#include <Library/UefiHiiServicesLib.h>\r
39#include <Library/PciLib.h>\r
112e584b
SZ
40#include <Library/LockBoxLib.h>\r
41#include <Library/TcgStorageOpalLib.h>\r
42#include <Library/Tcg2PhysicalPresenceLib.h>\r
43\r
44#include "OpalPasswordCommon.h"\r
45#include "OpalHiiFormValues.h"\r
46\r
47#define EFI_DRIVER_NAME_UNICODE L"1.0 UEFI Opal Driver"\r
48\r
49// UEFI 2.1\r
50#define LANGUAGE_RFC_3066_ENGLISH ((CHAR8*)"en")\r
51\r
52// UEFI/EFI < 2.1\r
53#define LANGUAGE_ISO_639_2_ENGLISH ((CHAR8*)"eng")\r
54\r
55#define CONCAT_(x, y) x ## y\r
56#define CONCAT(x, y) CONCAT_(x, y)\r
57\r
58#define UNICODE_STR(x) CONCAT( L, x )\r
59\r
60extern EFI_DRIVER_BINDING_PROTOCOL gOpalDriverBinding;\r
61extern EFI_COMPONENT_NAME_PROTOCOL gOpalComponentName;\r
62extern EFI_COMPONENT_NAME2_PROTOCOL gOpalComponentName2;\r
63\r
64#define OPAL_MSID_LENGHT 128\r
65\r
66#define MAX_PASSWORD_TRY_COUNT 5\r
67\r
68// PSID Length\r
69#define PSID_CHARACTER_LENGTH 0x20\r
70#define MAX_PSID_TRY_COUNT 5\r
71\r
40d32e79
ED
72//\r
73// The max timeout value assume the user can wait for the revert action. The unit of this macro is second.\r
b3548d32 74// If the revert time value bigger than this one, driver needs to popup a dialog to let user confirm the\r
40d32e79
ED
75// revert action.\r
76//\r
77#define MAX_ACCEPTABLE_REVERTING_TIME 10\r
78\r
112e584b
SZ
79#pragma pack(1)\r
80\r
81//\r
82// Structure that is used to represent the available actions for an OpalDisk.\r
83// The data can then be utilized to expose/hide certain actions available to an end user\r
84// by the consumer of this library.\r
85//\r
86typedef struct {\r
87 //\r
88 // Indicates if the disk can support PSID Revert action. should verify disk supports PSID authority\r
89 //\r
90 UINT16 PsidRevert : 1;\r
91\r
92 //\r
93 // Indicates if the disk can support Revert action\r
94 //\r
95 UINT16 Revert : 1;\r
96\r
97 //\r
98 // Indicates if the user must keep data for revert action. It is true if no media encryption is supported.\r
99 //\r
100 UINT16 RevertKeepDataForced : 1;\r
101\r
102 //\r
103 // Indicates if the disk can support set Admin password\r
104 //\r
105 UINT16 AdminPass : 1;\r
106\r
107 //\r
108 // Indicates if the disk can support set User password. This action requires that a user\r
109 // password is first enabled.\r
110 //\r
111 UINT16 UserPass : 1;\r
112\r
113 //\r
114 // Indicates if unlock action is available. Requires disk to be currently locked.\r
115 //\r
116 UINT16 Unlock : 1;\r
117\r
118 //\r
119 // Indicates if Secure Erase action is available. Action requires admin credentials and media encryption support.\r
120 //\r
121 UINT16 SecureErase : 1;\r
122\r
123 //\r
124 // Indicates if Disable User action is available. Action requires admin credentials.\r
125 //\r
126 UINT16 DisableUser : 1;\r
127} OPAL_DISK_ACTIONS;\r
128\r
129//\r
130// Structure that is used to represent an OPAL_DISK.\r
131//\r
132typedef struct {\r
133 UINT32 MsidLength; // Byte length of MSID Pin for device\r
134 UINT8 Msid[OPAL_MSID_LENGHT]; // MSID Pin for device\r
135 EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp;\r
136 UINT32 MediaId; // MediaId is used by Ssc Protocol.\r
137 EFI_DEVICE_PATH_PROTOCOL *OpalDevicePath;\r
138 UINT16 OpalBaseComId; // Opal SSC 1 base com id.\r
139 OPAL_OWNER_SHIP Owner;\r
140 OPAL_DISK_SUPPORT_ATTRIBUTE SupportedAttributes;\r
141 TCG_LOCKING_FEATURE_DESCRIPTOR LockingFeature; // Locking Feature Descriptor retrieved from performing a Level 0 Discovery\r
142 UINT8 PasswordLength;\r
143 UINT8 Password[OPAL_MAX_PASSWORD_SIZE];\r
40d32e79
ED
144\r
145 UINT32 EstimateTimeCost;\r
46e69608 146 BOOLEAN SentBlockSID; // Check whether BlockSid command has been sent.\r
112e584b
SZ
147} OPAL_DISK;\r
148\r
149//\r
150// Device with block IO protocol\r
151//\r
152typedef struct _OPAL_DRIVER_DEVICE OPAL_DRIVER_DEVICE;\r
153\r
154struct _OPAL_DRIVER_DEVICE {\r
155 OPAL_DRIVER_DEVICE *Next; ///< Linked list pointer\r
156 EFI_HANDLE Handle; ///< Device handle\r
157 OPAL_DISK OpalDisk; ///< User context\r
158 CHAR16 *Name16; ///< Allocated/freed by UEFI Filter Driver at device creation/removal\r
159 CHAR8 *NameZ; ///< Allocated/freed by UEFI Filter Driver at device creation/removal\r
160 UINT32 MediaId; ///< Required parameter for EFI_STORAGE_SECURITY_COMMAND_PROTOCOL, from BLOCK_IO_MEDIA\r
161\r
162 EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp; /// Device protocols consumed\r
163 EFI_DEVICE_PATH_PROTOCOL *OpalDevicePath;\r
164};\r
165\r
166//\r
167// Opal Driver UEFI Driver Model\r
168//\r
169typedef struct {\r
170 EFI_HANDLE Handle; ///< Driver image handle\r
171 OPAL_DRIVER_DEVICE *DeviceList; ///< Linked list of controllers owned by this Driver\r
172} OPAL_DRIVER;\r
173\r
174#pragma pack()\r
175\r
176//\r
177// Retrieves a OPAL_DRIVER_DEVICE based on the pointer to its StorageSecurity protocol.\r
178//\r
179#define DRIVER_DEVICE_FROM_OPALDISK(OpalDiskPointer) (OPAL_DRIVER_DEVICE*)(BASE_CR(OpalDiskPointer, OPAL_DRIVER_DEVICE, OpalDisk))\r
180\r
181/**\r
182 Get devcie list info.\r
183\r
184 @retval return the device list pointer.\r
185**/\r
186OPAL_DRIVER_DEVICE*\r
187OpalDriverGetDeviceList(\r
188 VOID\r
189 );\r
190\r
191/**\r
192 Get devcie name through the component name protocol.\r
193\r
194 @param[in] Dev The device which need to get name.\r
195\r
196 @retval TRUE Find the name for this device.\r
197 @retval FALSE Not found the name for this device.\r
198**/\r
199BOOLEAN\r
200OpalDriverGetDriverDeviceName(\r
201 OPAL_DRIVER_DEVICE *Dev\r
202 );\r
203\r
204/**\r
205 Get current device count.\r
206\r
207 @retval return the current created device count.\r
208\r
209**/\r
210UINT8\r
211GetDeviceCount (\r
212 VOID\r
213 );\r
214\r
215/**\r
216 Update password for the Opal disk.\r
217\r
218 @param[in, out] OpalDisk The disk to update password.\r
219 @param[in] Password The input password.\r
220 @param[in] PasswordLength The input password length.\r
221\r
222**/\r
223VOID\r
224OpalSupportUpdatePassword (\r
225 IN OUT OPAL_DISK *OpalDisk,\r
226 IN VOID *Password,\r
227 IN UINT32 PasswordLength\r
228 );\r
229\r
230/**\r
231\r
232 The function performs determines the available actions for the OPAL_DISK provided.\r
233\r
234 @param[in] SupportedAttributes The support attribute for the device.\r
235 @param[in] LockingFeature The locking status for the device.\r
236 @param[in] OwnerShip The ownership for the device.\r
237 @param[out] AvalDiskActions Pointer to fill-out with appropriate disk actions.\r
238\r
239**/\r
240TCG_RESULT\r
241EFIAPI\r
242OpalSupportGetAvailableActions(\r
243 IN OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,\r
244 IN TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature,\r
245 IN UINT16 OwnerShip,\r
246 OUT OPAL_DISK_ACTIONS *AvalDiskActions\r
247 );\r
248\r
249/**\r
250 Enable Opal Feature for the input device.\r
251\r
252 @param[in] Session The opal session for the opal device.\r
253 @param[in] Msid Msid\r
254 @param[in] MsidLength Msid Length\r
255 @param[in] Password Admin password\r
b3548d32 256 @param[in] PassLength Length of password in bytes\r
112e584b
SZ
257\r
258**/\r
259TCG_RESULT\r
260EFIAPI\r
261OpalSupportEnableOpalFeature (\r
262 IN OPAL_SESSION *Session,\r
263 IN VOID *Msid,\r
264 IN UINT32 MsidLength,\r
265 IN VOID *Password,\r
266 IN UINT32 PassLength\r
267 );\r
268\r
269/**\r
270 Unloads UEFI Driver. Very useful for debugging and testing.\r
271\r
272 @param ImageHandle Image handle this driver.\r
273\r
274 @retval EFI_SUCCESS This function always complete successfully.\r
275 @retval EFI_INVALID_PARAMETER The input ImageHandle is not valid.\r
276**/\r
277EFI_STATUS\r
278EFIAPI\r
279EfiDriverUnload(\r
280 EFI_HANDLE ImageHandle\r
281 );\r
282\r
283\r
284/**\r
285 Test to see if this driver supports Controller.\r
286\r
287 @param This Protocol instance pointer.\r
288 @param ControllerHandle Handle of device to test\r
289 @param RemainingDevicePath Optional parameter use to pick a specific child\r
290 device to start.\r
291\r
292 @retval EFI_SUCCESS This driver supports this device.\r
293 @retval EFI_ALREADY_STARTED This driver is already running on this device.\r
294 @retval other This driver does not support this device.\r
295\r
296**/\r
297EFI_STATUS\r
298EFIAPI\r
299OpalEfiDriverBindingSupported(\r
300 EFI_DRIVER_BINDING_PROTOCOL* This,\r
301 EFI_HANDLE Controller,\r
302 EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath\r
303 );\r
304\r
305/**\r
306 Enables Opal Management on a supported device if available.\r
307\r
308 The start function is designed to be called after the Opal UEFI Driver has confirmed the\r
309 "controller", which is a child handle, contains the EF_STORAGE_SECURITY_COMMAND protocols.\r
310 This function will complete the other necessary checks, such as verifying the device supports\r
311 the correct version of Opal. Upon verification, it will add the device to the\r
312 Opal HII list in order to expose Opal managmeent options.\r
313\r
314 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
315 @param[in] ControllerHandle The handle of the controller to start. This handle\r
316 must support a protocol interface that supplies\r
317 an I/O abstraction to the driver.\r
318 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
319 parameter is ignored by device drivers, and is optional for bus\r
320 drivers. For a bus driver, if this parameter is NULL, then handles\r
321 for all the children of Controller are created by this driver.\r
322 If this parameter is not NULL and the first Device Path Node is\r
323 not the End of Device Path Node, then only the handle for the\r
324 child device specified by the first Device Path Node of\r
325 RemainingDevicePath is created by this driver.\r
326 If the first Device Path Node of RemainingDevicePath is\r
327 the End of Device Path Node, no child handle is created by this\r
328 driver.\r
329\r
330 @retval EFI_SUCCESS Opal management was enabled.\r
331 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
332 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
333 @retval Others The driver failed to start the device.\r
334\r
335**/\r
336EFI_STATUS\r
337EFIAPI\r
338OpalEfiDriverBindingStart(\r
339 EFI_DRIVER_BINDING_PROTOCOL* This,\r
340 EFI_HANDLE Controller,\r
341 EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath\r
342 );\r
343\r
344/**\r
345 Stop this driver on Controller.\r
346\r
347 @param This Protocol instance pointer.\r
348 @param Controller Handle of device to stop driver on\r
349 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
350 children is zero stop the entire bus driver.\r
351 @param ChildHandleBuffer List of Child Handles to Stop.\r
352\r
353 @retval EFI_SUCCESS This driver is removed Controller.\r
354 @retval other This driver could not be removed from this device.\r
355\r
356**/\r
357EFI_STATUS\r
358EFIAPI\r
359OpalEfiDriverBindingStop(\r
360 EFI_DRIVER_BINDING_PROTOCOL* This,\r
361 EFI_HANDLE Controller,\r
362 UINTN NumberOfChildren,\r
363 EFI_HANDLE* ChildHandleBuffer\r
364 );\r
365\r
366/**\r
367 Retrieves a Unicode string that is the user readable name of the driver.\r
368\r
369 This function retrieves the user readable name of a driver in the form of a\r
370 Unicode string. If the driver specified by This has a user readable name in\r
371 the language specified by Language, then a pointer to the driver name is\r
372 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
373 by This does not support the language specified by Language,\r
374 then EFI_UNSUPPORTED is returned.\r
375\r
376 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
377 EFI_COMPONENT_NAME_PROTOCOL instance.\r
378\r
379 @param Language[in] A pointer to a Null-terminated ASCII string\r
380 array indicating the language. This is the\r
381 language of the driver name that the caller is\r
382 requesting, and it must match one of the\r
383 languages specified in SupportedLanguages. The\r
384 number of languages supported by a driver is up\r
385 to the driver writer. Language is specified\r
386 in RFC 4646 or ISO 639-2 language code format.\r
387\r
388 @param DriverName[out] A pointer to the Unicode string to return.\r
389 This Unicode string is the name of the\r
390 driver specified by This in the language\r
391 specified by Language.\r
392\r
393 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
394 This and the language specified by Language was\r
395 returned in DriverName.\r
396\r
397 @retval EFI_INVALID_PARAMETER Language is NULL.\r
398\r
399 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
400\r
401 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
402 the language specified by Language.\r
403\r
404**/\r
405EFI_STATUS\r
406EFIAPI\r
407OpalEfiDriverComponentNameGetDriverName(\r
408 EFI_COMPONENT_NAME_PROTOCOL* This,\r
409 CHAR8* Language,\r
410 CHAR16** DriverName\r
411 );\r
412\r
413/**\r
414 Retrieves a Unicode string that is the user readable name of the controller\r
415 that is being managed by a driver.\r
416\r
417 This function retrieves the user readable name of the controller specified by\r
418 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
419 driver specified by This has a user readable name in the language specified by\r
420 Language, then a pointer to the controller name is returned in ControllerName,\r
421 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
422 managing the controller specified by ControllerHandle and ChildHandle,\r
423 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
424 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
425\r
426 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
427 EFI_COMPONENT_NAME_PROTOCOL instance.\r
428\r
429 @param ControllerHandle[in] The handle of a controller that the driver\r
430 specified by This is managing. This handle\r
431 specifies the controller whose name is to be\r
432 returned.\r
433\r
434 @param ChildHandle[in] The handle of the child controller to retrieve\r
435 the name of. This is an optional parameter that\r
436 may be NULL. It will be NULL for device\r
437 drivers. It will also be NULL for a bus drivers\r
438 that wish to retrieve the name of the bus\r
439 controller. It will not be NULL for a bus\r
440 driver that wishes to retrieve the name of a\r
441 child controller.\r
442\r
443 @param Language[in] A pointer to a Null-terminated ASCII string\r
444 array indicating the language. This is the\r
445 language of the driver name that the caller is\r
446 requesting, and it must match one of the\r
447 languages specified in SupportedLanguages. The\r
448 number of languages supported by a driver is up\r
449 to the driver writer. Language is specified in\r
450 RFC 4646 or ISO 639-2 language code format.\r
451\r
452 @param ControllerName[out] A pointer to the Unicode string to return.\r
453 This Unicode string is the name of the\r
454 controller specified by ControllerHandle and\r
455 ChildHandle in the language specified by\r
456 Language from the point of view of the driver\r
457 specified by This.\r
458\r
459 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
460 the language specified by Language for the\r
461 driver specified by This was returned in\r
462 DriverName.\r
463\r
464 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
465\r
466 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
467 EFI_HANDLE.\r
468\r
469 @retval EFI_INVALID_PARAMETER Language is NULL.\r
470\r
471 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
472\r
473 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
474 managing the controller specified by\r
475 ControllerHandle and ChildHandle.\r
476\r
477 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
478 the language specified by Language.\r
479\r
480**/\r
481EFI_STATUS\r
482EFIAPI\r
483OpalEfiDriverComponentNameGetControllerName(\r
484 EFI_COMPONENT_NAME_PROTOCOL* This,\r
485 EFI_HANDLE ControllerHandle,\r
486 EFI_HANDLE ChildHandle,\r
487 CHAR8* Language,\r
488 CHAR16** ControllerName\r
489 );\r
490\r
491/**\r
492 Retrieves a Unicode string that is the user readable name of the driver.\r
493\r
494 This function retrieves the user readable name of a driver in the form of a\r
495 Unicode string. If the driver specified by This has a user readable name in\r
496 the language specified by Language, then a pointer to the driver name is\r
497 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
498 by This does not support the language specified by Language,\r
499 then EFI_UNSUPPORTED is returned.\r
500\r
501 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
502 EFI_COMPONENT_NAME_PROTOCOL instance.\r
503\r
504 @param Language[in] A pointer to a Null-terminated ASCII string\r
505 array indicating the language. This is the\r
506 language of the driver name that the caller is\r
507 requesting, and it must match one of the\r
508 languages specified in SupportedLanguages. The\r
509 number of languages supported by a driver is up\r
510 to the driver writer. Language is specified\r
511 in RFC 4646 or ISO 639-2 language code format.\r
512\r
513 @param DriverName[out] A pointer to the Unicode string to return.\r
514 This Unicode string is the name of the\r
515 driver specified by This in the language\r
516 specified by Language.\r
517\r
518 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
519 This and the language specified by Language was\r
520 returned in DriverName.\r
521\r
522 @retval EFI_INVALID_PARAMETER Language is NULL.\r
523\r
524 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
525\r
526 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
527 the language specified by Language.\r
528\r
529**/\r
530EFI_STATUS\r
531EFIAPI\r
532OpalEfiDriverComponentName2GetDriverName(\r
533 EFI_COMPONENT_NAME2_PROTOCOL* This,\r
534 CHAR8* Language,\r
535 CHAR16** DriverName\r
536 );\r
537\r
538/**\r
539 Retrieves a Unicode string that is the user readable name of the controller\r
540 that is being managed by a driver.\r
541\r
542 This function retrieves the user readable name of the controller specified by\r
543 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
544 driver specified by This has a user readable name in the language specified by\r
545 Language, then a pointer to the controller name is returned in ControllerName,\r
546 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
547 managing the controller specified by ControllerHandle and ChildHandle,\r
548 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
549 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
550\r
551 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
552 EFI_COMPONENT_NAME_PROTOCOL instance.\r
553\r
554 @param ControllerHandle[in] The handle of a controller that the driver\r
555 specified by This is managing. This handle\r
556 specifies the controller whose name is to be\r
557 returned.\r
558\r
559 @param ChildHandle[in] The handle of the child controller to retrieve\r
560 the name of. This is an optional parameter that\r
561 may be NULL. It will be NULL for device\r
562 drivers. It will also be NULL for a bus drivers\r
563 that wish to retrieve the name of the bus\r
564 controller. It will not be NULL for a bus\r
565 driver that wishes to retrieve the name of a\r
566 child controller.\r
567\r
568 @param Language[in] A pointer to a Null-terminated ASCII string\r
569 array indicating the language. This is the\r
570 language of the driver name that the caller is\r
571 requesting, and it must match one of the\r
572 languages specified in SupportedLanguages. The\r
573 number of languages supported by a driver is up\r
574 to the driver writer. Language is specified in\r
575 RFC 4646 or ISO 639-2 language code format.\r
576\r
577 @param ControllerName[out] A pointer to the Unicode string to return.\r
578 This Unicode string is the name of the\r
579 controller specified by ControllerHandle and\r
580 ChildHandle in the language specified by\r
581 Language from the point of view of the driver\r
582 specified by This.\r
583\r
584 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
585 the language specified by Language for the\r
586 driver specified by This was returned in\r
587 DriverName.\r
588\r
589 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
590\r
591 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
592 EFI_HANDLE.\r
593\r
594 @retval EFI_INVALID_PARAMETER Language is NULL.\r
595\r
596 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
597\r
598 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
599 managing the controller specified by\r
600 ControllerHandle and ChildHandle.\r
601\r
602 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
603 the language specified by Language.\r
604\r
605**/\r
606EFI_STATUS\r
607EFIAPI\r
608OpalEfiDriverComponentName2GetControllerName(\r
609 EFI_COMPONENT_NAME2_PROTOCOL* This,\r
610 EFI_HANDLE ControllerHandle,\r
611 EFI_HANDLE ChildHandle,\r
612 CHAR8* Language,\r
613 CHAR16** ControllerName\r
614 );\r
615\r
616#endif //_OPAL_DRIVER_H_\r