]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Library/VarCheckHiiLib/InternalVarCheckStructure.h
MdeModulePkg/DxeCapsuleLibFmp: Add more check for the UX capsule
[mirror_edk2.git] / MdeModulePkg / Library / VarCheckHiiLib / InternalVarCheckStructure.h
... / ...
CommitLineData
1/** @file\r
2 Internal structure for Var Check Hii.\r
3\r
4Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
26#define VAR_CHECK_HII_REVISION 0x0002\r
27\r
28typedef 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
40typedef struct {\r
41 UINT8 OpCode;\r
42 UINT8 Length; // Length include this header\r
43 UINT16 VarOffset;\r
44 UINT8 StorageWidth;\r
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
46} VAR_CHECK_HII_QUESTION_HEADER;\r
47\r
48typedef struct {\r
49 UINT8 OpCode;\r
50 UINT8 Length; // Length include this header\r
51 UINT16 VarOffset;\r
52 UINT8 StorageWidth;\r
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
54//UINTx Data[]; // x = UINT8/UINT16/UINT32/UINT64;\r
55} VAR_CHECK_HII_QUESTION_ONEOF;\r
56\r
57typedef struct {\r
58 UINT8 OpCode;\r
59 UINT8 Length; // Length include this header\r
60 UINT16 VarOffset;\r
61 UINT8 StorageWidth;\r
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
63} VAR_CHECK_HII_QUESTION_CHECKBOX;\r
64\r
65typedef struct {\r
66 UINT8 OpCode;\r
67 UINT8 Length; // Length include this header\r
68 UINT16 VarOffset;\r
69 UINT8 StorageWidth;\r
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
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
75typedef struct {\r
76 UINT8 OpCode;\r
77 UINT8 Length; // Length include this header\r
78 UINT16 VarOffset;\r
79 UINT8 StorageWidth;\r
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
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