]>
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 |
1241af95 SZ |
5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _VAR_CHECK_STRUCTURE_H_\r | |
16 | #define _VAR_CHECK_STRUCTURE_H_\r | |
17 | \r | |
18 | //\r | |
19 | // Alignment for Hii Variable and Question header.\r | |
20 | //\r | |
21 | #define HEADER_ALIGNMENT 4\r | |
22 | #define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))\r | |
23 | \r | |
24 | #pragma pack (1)\r | |
25 | \r | |
8182e9f4 | 26 | #define VAR_CHECK_HII_REVISION 0x0002\r |
1241af95 SZ |
27 | \r |
28 | typedef struct {\r | |
29 | UINT16 Revision;\r | |
30 | UINT16 HeaderLength;\r | |
31 | UINT32 Length; // Length include this header\r | |
32 | UINT8 OpCode;\r | |
33 | UINT8 Reserved;\r | |
34 | UINT16 Size;\r | |
35 | UINT32 Attributes;\r | |
36 | EFI_GUID Guid;\r | |
37 | //CHAR16 Name[];\r | |
38 | } VAR_CHECK_HII_VARIABLE_HEADER;\r | |
39 | \r | |
40 | typedef struct {\r | |
41 | UINT8 OpCode;\r | |
42 | UINT8 Length; // Length include this header\r | |
43 | UINT16 VarOffset;\r | |
44 | UINT8 StorageWidth;\r | |
8182e9f4 | 45 | 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 |
46 | } VAR_CHECK_HII_QUESTION_HEADER;\r |
47 | \r | |
48 | typedef struct {\r | |
49 | UINT8 OpCode;\r | |
50 | UINT8 Length; // Length include this header\r | |
51 | UINT16 VarOffset;\r | |
52 | UINT8 StorageWidth;\r | |
8182e9f4 | 53 | 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 |
54 | //UINTx Data[]; // x = UINT8/UINT16/UINT32/UINT64;\r |
55 | } VAR_CHECK_HII_QUESTION_ONEOF;\r | |
56 | \r | |
57 | typedef struct {\r | |
58 | UINT8 OpCode;\r | |
59 | UINT8 Length; // Length include this header\r | |
60 | UINT16 VarOffset;\r | |
61 | UINT8 StorageWidth;\r | |
8182e9f4 | 62 | 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 |
63 | } VAR_CHECK_HII_QUESTION_CHECKBOX;\r |
64 | \r | |
65 | typedef struct {\r | |
66 | UINT8 OpCode;\r | |
67 | UINT8 Length; // Length include this header\r | |
68 | UINT16 VarOffset;\r | |
69 | UINT8 StorageWidth;\r | |
8182e9f4 | 70 | 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 |
71 | //UINTx Minimum; // x = UINT8/UINT16/UINT32/UINT64;\r |
72 | //UINTx Maximum; // x = UINT8/UINT16/UINT32/UINT64;\r | |
73 | } VAR_CHECK_HII_QUESTION_NUMERIC;\r | |
74 | \r | |
75 | typedef struct {\r | |
76 | UINT8 OpCode;\r | |
77 | UINT8 Length; // Length include this header\r | |
78 | UINT16 VarOffset;\r | |
79 | UINT8 StorageWidth;\r | |
8182e9f4 | 80 | 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 |
81 | UINT8 MaxContainers;\r |
82 | //UINTx Data[]; // x = UINT8/UINT16/UINT32/UINT64;\r | |
83 | } VAR_CHECK_HII_QUESTION_ORDEREDLIST;\r | |
84 | \r | |
85 | #pragma pack ()\r | |
86 | \r | |
87 | #endif\r |