]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.h
SecurityPkg OpalPassword: Add solution without SMM device code
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPasswordDxe / OpalHii.h
CommitLineData
a06875e1
ED
1/** @file\r
2 Public Header file of HII library used by Opal UEFI Driver.\r
3 Defines required callbacks of Opal HII library.\r
4\r
5Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _OPAL_HII_H_\r
17#define _OPAL_HII_H_\r
18\r
19#include <Library/OpalPasswordSupportLib.h>\r
20#include <OpalDriverPrivate.h>\r
21\r
22#define DEFAULT_RESPONSE_SIZE 200\r
23\r
24/**\r
25 Get the driver image handle.\r
26\r
27 @retval the driver image handle.\r
28\r
29**/\r
30EFI_HANDLE\r
31HiiGetDriverImageHandleCB(\r
32 VOID\r
33 );\r
34\r
35/**\r
36 Install the HII form and string packages.\r
37\r
38 @retval EFI_SUCCESS Install all the resources success.\r
39 @retval EFI_OUT_OF_RESOURCES Out of resource error.\r
40**/\r
41EFI_STATUS\r
42OpalHiiAddPackages(\r
43 VOID\r
44 );\r
45\r
46/**\r
47 Check whether enable feature or not.\r
48\r
49 @retval Return the disk number.\r
50\r
51**/\r
52UINT8\r
53HiiGetNumConfigRequiredOpalDisksCB(\r
54 VOID\r
55 );\r
56\r
57/**\r
58 Returns the driver name.\r
59\r
60 @retval Returns the driver name.\r
61\r
62**/\r
63CHAR16*\r
64HiiGetDriverNameCB(\r
65 VOID\r
66 );\r
67\r
68/**\r
69 Returns the opaque pointer to a physical disk context.\r
70\r
71 @param DiskIndex Input the disk index.\r
72\r
73 @retval The device pointer.\r
74\r
75**/\r
76OPAL_DISK*\r
77HiiGetOpalDiskCB(\r
78 UINT8 DiskIndex\r
79 );\r
80\r
81/**\r
82 Returns the disk name.\r
83\r
84 @param DiskIndex Input the disk index.\r
85\r
86 @retval Returns the disk name.\r
87\r
88**/\r
89CHAR8*\r
90HiiDiskGetNameCB(\r
91 UINT8 DiskIndex\r
92 );\r
93\r
94/**\r
95 Set a string Value in a form.\r
96\r
97 @param DestStringId The stringid which need to update.\r
98 @param SrcAsciiStr The string nned to update.\r
99\r
100 @retval EFI_SUCCESS Do the required action success.\r
101 @retval Others Other error occur.\r
102\r
103**/\r
104EFI_STATUS\r
105HiiSetFormString(\r
106 EFI_STRING_ID DestStringId,\r
107 CHAR8 *SrcAsciiStr\r
108 );\r
109\r
110/**\r
111 Install the HII related resources.\r
112\r
113 @retval EFI_SUCCESS Install all the resources success.\r
114 @retval other Error occur when install the resources.\r
115**/\r
116EFI_STATUS\r
117HiiInstall(\r
118 VOID\r
119 );\r
120\r
121/**\r
122 Uninstall the HII capability.\r
123\r
124 @retval EFI_SUCCESS Uninstall all the resources success.\r
125 @retval others Other errors occur when unistall the hii resource.\r
126**/\r
127EFI_STATUS\r
128HiiUninstall(\r
129 VOID\r
130 );\r
131\r
132/**\r
133 Initialize the Opal disk base on the hardware info get from device.\r
134\r
135 @param Dev The Opal device.\r
136\r
137 @retval EFI_SUCESS Initialize the device success.\r
138 @retval EFI_DEVICE_ERROR Get info from device failed.\r
139\r
140**/\r
141EFI_STATUS\r
142OpalDiskInitialize (\r
143 IN OPAL_DRIVER_DEVICE *Dev\r
144 );\r
145\r
146#endif // _HII_H_\r