• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Internal structure for Var Check Hii.
3 
4 Copyright (c) 2015, 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  0x0001
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 } VAR_CHECK_HII_QUESTION_HEADER;
46 
47 typedef struct {
48   UINT8             OpCode;
49   UINT8             Length; // Length include this header
50   UINT16            VarOffset;
51   UINT8             StorageWidth;
52 //UINTx               Data[]; // x = UINT8/UINT16/UINT32/UINT64;
53 } VAR_CHECK_HII_QUESTION_ONEOF;
54 
55 typedef struct {
56   UINT8             OpCode;
57   UINT8             Length; // Length include this header
58   UINT16            VarOffset;
59   UINT8             StorageWidth;
60 } VAR_CHECK_HII_QUESTION_CHECKBOX;
61 
62 typedef struct {
63   UINT8             OpCode;
64   UINT8             Length; // Length include this header
65   UINT16            VarOffset;
66   UINT8             StorageWidth;
67 //UINTx               Minimum; // x = UINT8/UINT16/UINT32/UINT64;
68 //UINTx               Maximum; // x = UINT8/UINT16/UINT32/UINT64;
69 } VAR_CHECK_HII_QUESTION_NUMERIC;
70 
71 typedef struct {
72   UINT8             OpCode;
73   UINT8             Length; // Length include this header
74   UINT16            VarOffset;
75   UINT8             StorageWidth;
76   UINT8             MaxContainers;
77 //UINTx               Data[]; // x = UINT8/UINT16/UINT32/UINT64;
78 } VAR_CHECK_HII_QUESTION_ORDEREDLIST;
79 
80 #pragma pack ()
81 
82 #endif
83