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