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