]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormValues.h
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPassword / OpalHiiFormValues.h
CommitLineData
112e584b
SZ
1/** @file\r
2 Defines Opal HII form ids, structures and values.\r
3\r
4Copyright (c) 2016 - 2018, 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\r
10#ifndef _OPAL_HII_FORM_VALUES_H_\r
11#define _OPAL_HII_FORM_VALUES_H_\r
12\r
13// ID's for various forms that will be used by HII\r
14#define FORMID_VALUE_MAIN_MENU 0x01\r
15#define FORMID_VALUE_DISK_INFO_FORM_MAIN 0x02\r
16\r
112e584b
SZ
17#pragma pack(1)\r
18typedef struct {\r
19 UINT16 Lock:1;\r
20 UINT16 Unlock:1;\r
21 UINT16 SetAdminPwd:1;\r
22 UINT16 SetUserPwd:1;\r
23 UINT16 SecureErase:1;\r
24 UINT16 Revert:1;\r
25 UINT16 PsidRevert:1;\r
26 UINT16 DisableUser:1;\r
27 UINT16 DisableFeature:1;\r
28 UINT16 EnableFeature:1;\r
29 UINT16 Reserved:5;\r
30 UINT16 KeepUserData:1;\r
31} OPAL_REQUEST;\r
32\r
33typedef struct {\r
34 UINT8 NumDisks;\r
35 UINT8 SelectedDiskIndex;\r
36 UINT16 SelectedDiskAvailableActions;\r
37 UINT16 SupportedDisks;\r
38 BOOLEAN KeepUserDataForced;\r
39 OPAL_REQUEST OpalRequest;\r
40 UINT8 EnableBlockSid;\r
41} OPAL_HII_CONFIGURATION;\r
42\r
112e584b
SZ
43#pragma pack()\r
44\r
45/* Action Flags */\r
46#define HII_ACTION_NONE 0x0000\r
47#define HII_ACTION_LOCK 0x0001\r
48#define HII_ACTION_UNLOCK 0x0002\r
49#define HII_ACTION_SET_ADMIN_PWD 0x0004\r
50#define HII_ACTION_SET_USER_PWD 0x0008\r
51#define HII_ACTION_SECURE_ERASE 0x0010\r
52#define HII_ACTION_REVERT 0x0020\r
53#define HII_ACTION_PSID_REVERT 0x0040\r
54#define HII_ACTION_DISABLE_USER 0x0080\r
55#define HII_ACTION_DISABLE_FEATURE 0x0100\r
56#define HII_ACTION_ENABLE_FEATURE 0x0200\r
57\r
58/* Number of bits allocated for each part of a unique key for an HII_ITEM\r
59 * all bits together must be <= 16 (EFI_QUESTION_ID is UINT16)\r
60 * 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\r
61 * | |-----------------------| |---------------------------|\r
62 * FLG INDEX ID\r
63 */\r
64#define HII_KEY_ID_BITS 8\r
65#define HII_KEY_INDEX_BITS 7\r
66#define HII_KEY_FLAG_BITS 1\r
67\r
68#define HII_KEY_FLAG 0x8000 // bit 15 (zero based)\r
69\r
70/***********/\r
71/* Key IDs */\r
72/***********/\r
73\r
74#define HII_KEY_ID_GOTO_DISK_INFO 1\r
75\r
76#define HII_KEY_ID_VAR_SUPPORTED_DISKS 2\r
77#define HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS 3\r
78\r
79#define HII_KEY_ID_BLOCKSID 4\r
80#define HII_KEY_ID_SET_ADMIN_PWD 5\r
81#define HII_KEY_ID_SET_USER_PWD 6\r
82#define HII_KEY_ID_SECURE_ERASE 7\r
83#define HII_KEY_ID_REVERT 8\r
84#define HII_KEY_ID_KEEP_USER_DATA 9\r
85#define HII_KEY_ID_PSID_REVERT 0xA\r
86#define HII_KEY_ID_DISABLE_USER 0xB\r
87#define HII_KEY_ID_ENABLE_FEATURE 0xC\r
88\r
89#define HII_KEY_ID_MAX 0xC // !!Update each time a new ID is added!!\r
90\r
91#define HII_KEY_WITH_INDEX(id, index) \\r
92 ( \\r
93 HII_KEY_FLAG | \\r
94 (id) | \\r
95 ((index) << HII_KEY_ID_BITS) \\r
96 )\r
97\r
98#define HII_KEY(id) HII_KEY_WITH_INDEX(id, 0)\r
99\r
100#define PACKAGE_LIST_GUID { 0xf0308176, 0x9058, 0x4153, { 0x93, 0x3d, 0xda, 0x2f, 0xdc, 0xc8, 0x3e, 0x44 } }\r
101\r
102/* {410483CF-F4F9-4ece-848A-1958FD31CEB7} */\r
103#define SETUP_FORMSET_GUID { 0x410483cf, 0xf4f9, 0x4ece, { 0x84, 0x8a, 0x19, 0x58, 0xfd, 0x31, 0xce, 0xb7 } }\r
104\r
105// {BBF1ACD2-28D8-44ea-A291-58A237FEDF1A}\r
106#define SETUP_VARIABLE_GUID { 0xbbf1acd2, 0x28d8, 0x44ea, { 0xa2, 0x91, 0x58, 0xa2, 0x37, 0xfe, 0xdf, 0x1a } }\r
107\r
108#endif //_HII_FORM_VALUES_H_\r
109\r