]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FormGuid.h
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / FormGuid.h
1 /** @file
2 Formset guids, form id and VarStore data structure for Boot Maintenance Manager.
3
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8 #ifndef _FORM_GUID_H_
9 #define _FORM_GUID_H_
10
11 #include <Guid/BdsHii.h>
12
13 #define FORM_MAIN_ID 0x1001
14 #define FORM_BOOT_ADD_ID 0x1002
15 #define FORM_BOOT_DEL_ID 0x1003
16 #define FORM_BOOT_CHG_ID 0x1004
17 #define FORM_DRV_ADD_ID 0x1005
18 #define FORM_DRV_DEL_ID 0x1006
19 #define FORM_DRV_CHG_ID 0x1007
20 #define FORM_CON_MAIN_ID 0x1008
21 #define FORM_CON_IN_ID 0x1009
22 #define FORM_CON_OUT_ID 0x100A
23 #define FORM_CON_ERR_ID 0x100B
24 #define FORM_FILE_SEEK_ID 0x100C
25 #define FORM_FILE_NEW_SEEK_ID 0x100D
26 #define FORM_DRV_ADD_FILE_ID 0x100E
27 #define FORM_DRV_ADD_HANDLE_ID 0x100F
28 #define FORM_DRV_ADD_HANDLE_DESC_ID 0x1010
29 #define FORM_BOOT_NEXT_ID 0x1011
30 #define FORM_TIME_OUT_ID 0x1012
31 #define FORM_RESET 0x1013
32 #define FORM_BOOT_SETUP_ID 0x1014
33 #define FORM_DRIVER_SETUP_ID 0x1015
34 #define FORM_BOOT_LEGACY_DEVICE_ID 0x1016
35 #define FORM_CON_COM_ID 0x1017
36 #define FORM_CON_COM_SETUP_ID 0x1018
37 #define FORM_SET_FD_ORDER_ID 0x1019
38 #define FORM_SET_HD_ORDER_ID 0x101A
39 #define FORM_SET_CD_ORDER_ID 0x101B
40 #define FORM_SET_NET_ORDER_ID 0x101C
41 #define FORM_SET_BEV_ORDER_ID 0x101D
42 #define FORM_FILE_EXPLORER_ID 0x101E
43 #define FORM_BOOT_ADD_DESCRIPTION_ID 0x101F
44 #define FORM_DRIVER_ADD_FILE_DESCRIPTION_ID 0x1020
45 #define FORM_CON_MODE_ID 0x1021
46 #define FORM_BOOT_FROM_FILE_ID 0x1022
47
48 #define MAXIMUM_FORM_ID 0x10FF
49
50 #define KEY_VALUE_COM_SET_BAUD_RATE 0x1101
51 #define KEY_VALUE_COM_SET_DATA_BITS 0x1102
52 #define KEY_VALUE_COM_SET_STOP_BITS 0x1103
53 #define KEY_VALUE_COM_SET_PARITY 0x1104
54 #define KEY_VALUE_COM_SET_TERMI_TYPE 0x1105
55 #define KEY_VALUE_MAIN_BOOT_NEXT 0x1106
56 #define KEY_VALUE_BOOT_ADD_DESC_DATA 0x1107
57 #define KEY_VALUE_BOOT_ADD_OPT_DATA 0x1108
58 #define KEY_VALUE_DRIVER_ADD_DESC_DATA 0x1109
59 #define KEY_VALUE_DRIVER_ADD_OPT_DATA 0x110A
60 #define KEY_VALUE_SAVE_AND_EXIT 0x110B
61 #define KEY_VALUE_NO_SAVE_AND_EXIT 0x110C
62 #define KEY_VALUE_BOOT_FROM_FILE 0x110D
63 #define KEY_VALUE_BOOT_DESCRIPTION 0x110E
64 #define KEY_VALUE_BOOT_OPTION 0x110F
65 #define KEY_VALUE_DRIVER_DESCRIPTION 0x1110
66 #define KEY_VALUE_DRIVER_OPTION 0x1111
67
68 #define MAXIMUM_NORMAL_KEY_VALUE 0x11FF
69
70 //
71 // Varstore ID defined for Buffer Storage
72 //
73 #define VARSTORE_ID_BOOT_MAINT 0x1000
74 #define VARSTORE_ID_FILE_EXPLORER 0x1001
75
76 //
77 // End Label
78 //
79 #define LABEL_END 0xffff
80 #define MAX_MENU_NUMBER 100
81
82 ///
83 /// This is the structure that will be used to store the
84 /// question's current value. Use it at initialize time to
85 /// set default value for each question. When using at run
86 /// time, this map is returned by the callback function,
87 /// so dynamically changing the question's value will be
88 /// possible through this mechanism
89 ///
90 typedef struct {
91 //
92 // Three questions displayed at the main page
93 // for Timeout, BootNext Variables respectively
94 //
95 UINT16 BootTimeOut;
96 UINT16 BootNext;
97
98 //
99 // This is the COM1 Attributes value storage
100 //
101 UINT8 COM1BaudRate;
102 UINT8 COM1DataRate;
103 UINT8 COM1StopBits;
104 UINT8 COM1Parity;
105 UINT8 COM1TerminalType;
106
107 //
108 // This is the COM2 Attributes value storage
109 //
110 UINT8 COM2BaudRate;
111 UINT8 COM2DataRate;
112 UINT8 COM2StopBits;
113 UINT8 COM2Parity;
114 UINT8 COM2TerminalType;
115
116 //
117 // Driver Option Add Handle page storage
118 //
119 UINT16 DriverAddHandleDesc[MAX_MENU_NUMBER];
120 UINT16 DriverAddHandleOptionalData[MAX_MENU_NUMBER];
121 UINT8 DriverAddActive;
122 UINT8 DriverAddForceReconnect;
123
124 //
125 // Console Input/Output/Errorout using COM port check storage
126 //
127 UINT8 ConsoleInputCOM1;
128 UINT8 ConsoleInputCOM2;
129 UINT8 ConsoleOutputCOM1;
130 UINT8 ConsoleOutputCOM2;
131 UINT8 ConsoleErrorCOM1;
132 UINT8 ConsoleErrorCOM2;
133
134 //
135 // At most 100 input/output/errorout device for console storage
136 //
137 UINT8 ConsoleCheck[MAX_MENU_NUMBER];
138 //
139 // At most 100 input/output/errorout device for console storage
140 //
141 UINT8 ConsoleInCheck[MAX_MENU_NUMBER];
142 UINT8 ConsoleOutCheck[MAX_MENU_NUMBER];
143 UINT8 ConsoleErrCheck[MAX_MENU_NUMBER];
144
145 //
146 // Boot Option Order storage
147 // The value is the OptionNumber+1 because the order list value cannot be 0
148 // Use UINT32 to hold the potential value 0xFFFF+1=0x10000
149 //
150 UINT32 BootOptionOrder[MAX_MENU_NUMBER];
151
152 //
153 // Driver Option Order storage
154 // The value is the OptionNumber+1 because the order list value cannot be 0
155 // Use UINT32 to hold the potential value 0xFFFF+1=0x10000
156 //
157 UINT32 DriverOptionOrder[MAX_MENU_NUMBER];
158
159 //
160 // Boot Option Delete storage
161 //
162 BOOLEAN BootOptionDel[MAX_MENU_NUMBER];
163 BOOLEAN BootOptionDelMark[MAX_MENU_NUMBER];
164
165 //
166 // Driver Option Delete storage
167 //
168 BOOLEAN DriverOptionDel[MAX_MENU_NUMBER];
169 BOOLEAN DriverOptionDelMark[MAX_MENU_NUMBER];
170
171 //
172 // This is the Terminal Attributes value storage
173 //
174 UINT8 COMBaudRate[MAX_MENU_NUMBER];
175 UINT8 COMDataRate[MAX_MENU_NUMBER];
176 UINT8 COMStopBits[MAX_MENU_NUMBER];
177 UINT8 COMParity[MAX_MENU_NUMBER];
178 UINT8 COMTerminalType[MAX_MENU_NUMBER];
179 UINT8 COMFlowControl[MAX_MENU_NUMBER];
180
181 //
182 // Legacy Device Order Selection Storage
183 //
184 UINT8 LegacyFD[MAX_MENU_NUMBER];
185 UINT8 LegacyHD[MAX_MENU_NUMBER];
186 UINT8 LegacyCD[MAX_MENU_NUMBER];
187 UINT8 LegacyNET[MAX_MENU_NUMBER];
188 UINT8 LegacyBEV[MAX_MENU_NUMBER];
189
190 //
191 // We use DisableMap array to record the enable/disable state of each boot device
192 // It should be taken as a bit array, from left to right there are totally 256 bits
193 // the most left one stands for BBS table item 0, and the most right one stands for item 256
194 // If the bit is 1, it means the boot device has been disabled.
195 //
196 UINT8 DisableMap[32];
197
198 //
199 // Console Output Text Mode
200 //
201 UINT16 ConsoleOutMode;
202
203 //
204 // UINT16 PadArea[10];
205 //
206 } BMM_FAKE_NV_DATA;
207
208 //
209 // Key used by File Explorer forms
210 //
211 #define KEY_VALUE_SAVE_AND_EXIT_BOOT 0x1000
212 #define KEY_VALUE_NO_SAVE_AND_EXIT_BOOT 0x1001
213 #define KEY_VALUE_SAVE_AND_EXIT_DRIVER 0x1002
214 #define KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER 0x1003
215
216 //
217 // Description data and optional data size
218 //
219 #define DESCRIPTION_DATA_SIZE 75
220 #define OPTIONAL_DATA_SIZE 127
221
222 ///
223 /// This is the data structure used by File Explorer formset
224 ///
225 typedef struct {
226 UINT16 BootDescriptionData[DESCRIPTION_DATA_SIZE];
227 UINT16 BootOptionalData[OPTIONAL_DATA_SIZE];
228 UINT16 DriverDescriptionData[DESCRIPTION_DATA_SIZE];
229 UINT16 DriverOptionalData[OPTIONAL_DATA_SIZE];
230 BOOLEAN BootOptionChanged;
231 BOOLEAN DriverOptionChanged;
232 UINT8 Active;
233 UINT8 ForceReconnect;
234 } FILE_EXPLORER_NV_DATA;
235
236 #endif
237