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