022a7492f21d3e48f899fe14ba5d352f0c2cf17b
[mirror_edk2.git] / BaseTools / Source / C / Include / Common / MdeModuleHii.h
1 /** @file
2 EDK II specific HII relative definition.
3
4 Copyright (c) 2006 - 2007, Intel Corporation All rights reserved.
5
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at:
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 File Name: MdeModuleHii.h
15
16 **/
17
18 #ifndef _MDEMODULE_HII_H
19 #define _MDEMODULE_HII_H
20
21 #define NARROW_CHAR 0xFFF0
22 #define WIDE_CHAR 0xFFF1
23 #define NON_BREAKING_CHAR 0xFFF2
24
25 #define GLYPH_WIDTH EFI_GLYPH_WIDTH
26 #define GLYPH_HEIGHT EFI_GLYPH_HEIGHT
27
28 //
29 // State defined for password statemachine
30 //
31 #define BROWSER_STATE_VALIDATE_PASSWORD 0
32 #define BROWSER_STATE_SET_PASSWORD 1
33
34
35 //
36 // Tiano Implementation specific Device Path definition.
37 //
38 #pragma pack(1)
39 typedef struct {
40 VENDOR_DEVICE_PATH VendorDevicePath;
41 UINT32 Reserved;
42 UINT64 UniqueId;
43 } HII_VENDOR_DEVICE_PATH_NODE;
44 #pragma pack()
45
46 typedef struct {
47 HII_VENDOR_DEVICE_PATH_NODE Node;
48 EFI_DEVICE_PATH_PROTOCOL End;
49 } HII_VENDOR_DEVICE_PATH;
50
51
52 //
53 // GUIDed opcodes defined for Tiano
54 //
55 #define EFI_IFR_TIANO_GUID \
56 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
57
58 #pragma pack(1)
59
60 #define EFI_IFR_EXTEND_OP_LABEL 0x0
61 #define EFI_IFR_EXTEND_OP_BANNER 0x1
62 #define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
63 #define EFI_IFR_EXTEND_OP_CLASS 0x3
64 #define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
65
66 typedef struct _EFI_IFR_GUID_LABEL {
67 EFI_IFR_OP_HEADER Header;
68 EFI_GUID Guid;
69 UINT8 ExtendOpCode;
70 UINT16 Number;
71 } EFI_IFR_GUID_LABEL;
72
73 #define EFI_IFR_BANNER_ALIGN_LEFT 0
74 #define EFI_IFR_BANNER_ALIGN_CENTER 1
75 #define EFI_IFR_BANNER_ALIGN_RIGHT 2
76
77 typedef struct _EFI_IFR_GUID_BANNER {
78 EFI_IFR_OP_HEADER Header;
79 EFI_GUID Guid;
80 UINT8 ExtendOpCode; // Extended opcode is EFI_IFR_EXTEND_OP_BANNER
81 EFI_STRING_ID Title; // The string token for the banner title
82 UINT16 LineNumber; // 1-based line number
83 UINT8 Alignment; // left, center, or right-aligned
84 } EFI_IFR_GUID_BANNER;
85
86 typedef struct _EFI_IFR_GUID_TIMEOUT {
87 EFI_IFR_OP_HEADER Header;
88 EFI_GUID Guid;
89 UINT8 ExtendOpCode;
90 UINT16 TimeOut;
91 } EFI_IFR_GUID_TIMEOUT;
92
93 #define EFI_NON_DEVICE_CLASS 0x00
94 #define EFI_DISK_DEVICE_CLASS 0x01
95 #define EFI_VIDEO_DEVICE_CLASS 0x02
96 #define EFI_NETWORK_DEVICE_CLASS 0x04
97 #define EFI_INPUT_DEVICE_CLASS 0x08
98 #define EFI_ON_BOARD_DEVICE_CLASS 0x10
99 #define EFI_OTHER_DEVICE_CLASS 0x20
100
101 typedef struct _EFI_IFR_GUID_CLASS {
102 EFI_IFR_OP_HEADER Header;
103 EFI_GUID Guid;
104 UINT8 ExtendOpCode;
105 UINT16 Class;
106 } EFI_IFR_GUID_CLASS;
107
108 #define EFI_SETUP_APPLICATION_SUBCLASS 0x00
109 #define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
110 #define EFI_FRONT_PAGE_SUBCLASS 0x02
111 #define EFI_SINGLE_USE_SUBCLASS 0x03
112
113 typedef struct _EFI_IFR_GUID_SUBCLASS {
114 EFI_IFR_OP_HEADER Header;
115 EFI_GUID Guid;
116 UINT8 ExtendOpCode;
117 UINT16 SubClass;
118 } EFI_IFR_GUID_SUBCLASS;
119
120 //
121 // GUIDed opcodes defined for Tiano
122 //
123 #define EFI_IFR_FRAMEWORK_GUID \
124 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
125
126 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
127 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
128 //
129 // Store the framework vfr option key value
130 //
131 typedef struct _EFI_IFR_GUID_OPTIONKEY {
132 EFI_IFR_OP_HEADER Header;
133 EFI_GUID Guid;
134 UINT8 ExtendOpCode;
135 EFI_QUESTION_ID QuestionId;
136 EFI_IFR_TYPE_VALUE OptionValue;
137 EFI_QUESTION_ID KeyValue;
138 } EFI_IFR_GUID_OPTIONKEY;
139
140 //
141 // Store the framework vfr vareqval name number
142 //
143 typedef struct _EFI_IFR_GUID_VAREQNAME {
144 EFI_IFR_OP_HEADER Header;
145 EFI_GUID Guid;
146 UINT8 ExtendOpCode;
147 EFI_QUESTION_ID QuestionId;
148 EFI_STRING_ID NameId;
149 } EFI_IFR_GUID_VAREQNAME;
150
151 #pragma pack()
152
153 #endif
154