]>
Commit | Line | Data |
---|---|---|
1241af95 SZ |
1 | /** @file\r |
2 | Internal structure for Var Check Hii.\r | |
3 | \r | |
8182e9f4 | 4 | Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1241af95 SZ |
6 | \r |
7 | **/\r | |
8 | \r | |
9 | #ifndef _VAR_CHECK_STRUCTURE_H_\r | |
10 | #define _VAR_CHECK_STRUCTURE_H_\r | |
11 | \r | |
12 | //\r | |
13 | // Alignment for Hii Variable and Question header.\r | |
14 | //\r | |
15 | #define HEADER_ALIGNMENT 4\r | |
16 | #define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))\r | |
17 | \r | |
18 | #pragma pack (1)\r | |
19 | \r | |
8182e9f4 | 20 | #define VAR_CHECK_HII_REVISION 0x0002\r |
1241af95 SZ |
21 | \r |
22 | typedef struct {\r | |
1436aea4 MK |
23 | UINT16 Revision;\r |
24 | UINT16 HeaderLength;\r | |
25 | UINT32 Length; // Length include this header\r | |
26 | UINT8 OpCode;\r | |
27 | UINT8 Reserved;\r | |
28 | UINT16 Size;\r | |
29 | UINT32 Attributes;\r | |
30 | EFI_GUID Guid;\r | |
31 | // CHAR16 Name[];\r | |
1241af95 SZ |
32 | } VAR_CHECK_HII_VARIABLE_HEADER;\r |
33 | \r | |
34 | typedef struct {\r | |
1436aea4 MK |
35 | UINT8 OpCode;\r |
36 | UINT8 Length; // Length include this header\r | |
37 | UINT16 VarOffset;\r | |
38 | UINT8 StorageWidth;\r | |
39 | BOOLEAN BitFieldStore; // Whether the Question is stored in bit field, if TRUE, the VarOffset/StorageWidth will be saved as bit level, otherwise in byte level.\r | |
1241af95 SZ |
40 | } VAR_CHECK_HII_QUESTION_HEADER;\r |
41 | \r | |
42 | typedef struct {\r | |
1436aea4 MK |
43 | UINT8 OpCode;\r |
44 | UINT8 Length; // Length include this header\r | |
45 | UINT16 VarOffset;\r | |
46 | UINT8 StorageWidth;\r | |
47 | BOOLEAN BitFieldStore; // Whether the Question is stored in bit field, if TRUE, the VarOffset/StorageWidth will be saved as bit level, otherwise in byte level.\r | |
48 | // UINTx Data[]; // x = UINT8/UINT16/UINT32/UINT64;\r | |
1241af95 SZ |
49 | } VAR_CHECK_HII_QUESTION_ONEOF;\r |
50 | \r | |
51 | typedef struct {\r | |
1436aea4 MK |
52 | UINT8 OpCode;\r |
53 | UINT8 Length; // Length include this header\r | |
54 | UINT16 VarOffset;\r | |
55 | UINT8 StorageWidth;\r | |
56 | BOOLEAN BitFieldStore; // Whether the Question is stored in bit field, if TRUE, the VarOffset/StorageWidth will be saved as bit level, otherwise in byte level.\r | |
1241af95 SZ |
57 | } VAR_CHECK_HII_QUESTION_CHECKBOX;\r |
58 | \r | |
59 | typedef struct {\r | |
1436aea4 MK |
60 | UINT8 OpCode;\r |
61 | UINT8 Length; // Length include this header\r | |
62 | UINT16 VarOffset;\r | |
63 | UINT8 StorageWidth;\r | |
64 | BOOLEAN BitFieldStore; // Whether the Question is stored in bit field, if TRUE, the VarOffset/StorageWidth will be saved as bit level, otherwise in byte level.\r | |
65 | // UINTx Minimum; // x = UINT8/UINT16/UINT32/UINT64;\r | |
66 | // UINTx Maximum; // x = UINT8/UINT16/UINT32/UINT64;\r | |
1241af95 SZ |
67 | } VAR_CHECK_HII_QUESTION_NUMERIC;\r |
68 | \r | |
69 | typedef struct {\r | |
1436aea4 MK |
70 | UINT8 OpCode;\r |
71 | UINT8 Length; // Length include this header\r | |
72 | UINT16 VarOffset;\r | |
73 | UINT8 StorageWidth;\r | |
74 | BOOLEAN BitFieldStore; // Whether the Question is stored in bit field, if TRUE, the VarOffset/StorageWidth will be saved as bit level, otherwise in byte level.\r | |
75 | UINT8 MaxContainers;\r | |
76 | // UINTx Data[]; // x = UINT8/UINT16/UINT32/UINT64;\r | |
1241af95 SZ |
77 | } VAR_CHECK_HII_QUESTION_ORDEREDLIST;\r |
78 | \r | |
79 | #pragma pack ()\r | |
80 | \r | |
81 | #endif\r |