1 /** @file 2 Define some data used for Boot Maint 3 4 Copyright (c) 2004 - 2008, 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 #include "BootMaint.h" 16 17 VOID *mStartOpCodeHandle = NULL; 18 VOID *mEndOpCodeHandle = NULL; 19 EFI_IFR_GUID_LABEL *mStartLabel = NULL; 20 EFI_IFR_GUID_LABEL *mEndLabel = NULL; 21 22 STRING_DEPOSITORY *FileOptionStrDepository; 23 STRING_DEPOSITORY *ConsoleOptionStrDepository; 24 STRING_DEPOSITORY *BootOptionStrDepository; 25 STRING_DEPOSITORY *BootOptionHelpStrDepository; 26 STRING_DEPOSITORY *DriverOptionStrDepository; 27 STRING_DEPOSITORY *DriverOptionHelpStrDepository; 28 STRING_DEPOSITORY *TerminalStrDepository; 29 30 /// 31 /// Terminal type string token storage 32 /// 33 UINT16 TerminalType[] = { 34 STRING_TOKEN(STR_COM_TYPE_0), 35 STRING_TOKEN(STR_COM_TYPE_1), 36 STRING_TOKEN(STR_COM_TYPE_2), 37 STRING_TOKEN(STR_COM_TYPE_3), 38 }; 39 40 /// 41 /// Flow Control type string token storage 42 /// 43 UINT16 mFlowControlType[2] = { 44 STRING_TOKEN(STR_NONE_FLOW_CONTROL), 45 STRING_TOKEN(STR_HARDWARE_FLOW_CONTROL) 46 }; 47 48 UINT32 mFlowControlValue[2] = { 49 0, 50 UART_FLOW_CONTROL_HARDWARE 51 }; 52 53 /// 54 /// File system selection menu 55 /// 56 BM_MENU_OPTION FsOptionMenu = { 57 BM_MENU_OPTION_SIGNATURE, 58 {NULL}, 59 0 60 }; 61 62 /// 63 /// Console Input Device Selection Menu 64 /// 65 BM_MENU_OPTION ConsoleInpMenu = { 66 BM_MENU_OPTION_SIGNATURE, 67 {NULL}, 68 0 69 }; 70 71 /// 72 /// Console Output Device Selection Menu 73 /// 74 BM_MENU_OPTION ConsoleOutMenu = { 75 BM_MENU_OPTION_SIGNATURE, 76 {NULL}, 77 0 78 }; 79 80 /// 81 /// Error Output Device Selection Menu 82 /// 83 BM_MENU_OPTION ConsoleErrMenu = { 84 BM_MENU_OPTION_SIGNATURE, 85 {NULL}, 86 0 87 }; 88 89 /// 90 /// Boot Option from variable Menu 91 /// 92 BM_MENU_OPTION BootOptionMenu = { 93 BM_MENU_OPTION_SIGNATURE, 94 {NULL}, 95 0 96 }; 97 98 /// 99 /// Driver Option from variable menu 100 /// 101 BM_MENU_OPTION DriverOptionMenu = { 102 BM_MENU_OPTION_SIGNATURE, 103 {NULL}, 104 0 105 }; 106 107 /// 108 /// Legacy FD Info from LegacyBios.GetBbsInfo() 109 /// 110 BM_MENU_OPTION LegacyFDMenu = { 111 BM_MENU_OPTION_SIGNATURE, 112 {NULL}, 113 0 114 }; 115 116 /// 117 /// Legacy HD Info from LegacyBios.GetBbsInfo() 118 /// 119 BM_MENU_OPTION LegacyHDMenu = { 120 BM_MENU_OPTION_SIGNATURE, 121 {NULL}, 122 0 123 }; 124 125 /// 126 /// Legacy CD Info from LegacyBios.GetBbsInfo() 127 /// 128 BM_MENU_OPTION LegacyCDMenu = { 129 BM_MENU_OPTION_SIGNATURE, 130 {NULL}, 131 0 132 }; 133 134 /// 135 /// Legacy NET Info from LegacyBios.GetBbsInfo() 136 /// 137 BM_MENU_OPTION LegacyNETMenu = { 138 BM_MENU_OPTION_SIGNATURE, 139 {NULL}, 140 0 141 }; 142 143 /// 144 /// Legacy NET Info from LegacyBios.GetBbsInfo() 145 /// 146 BM_MENU_OPTION LegacyBEVMenu = { 147 BM_MENU_OPTION_SIGNATURE, 148 {NULL}, 149 0 150 }; 151 152 /// 153 /// Files and sub-directories in current directory menu 154 /// 155 BM_MENU_OPTION DirectoryMenu = { 156 BM_MENU_OPTION_SIGNATURE, 157 {NULL}, 158 0 159 }; 160 161 /// 162 /// Handles in current system selection menu 163 /// 164 BM_MENU_OPTION DriverMenu = { 165 BM_MENU_OPTION_SIGNATURE, 166 {NULL}, 167 0 168 }; 169 170 BM_MENU_OPTION TerminalMenu = { 171 BM_MENU_OPTION_SIGNATURE, 172 {NULL}, 173 0 174 }; 175 176 /// 177 /// Value and string token correspondency for BaudRate 178 /// 179 COM_ATTR BaudRateList[19] = { 180 { 181 115200, 182 STRING_TOKEN(STR_COM_BAUD_RATE_0) 183 }, 184 { 185 57600, 186 STRING_TOKEN(STR_COM_BAUD_RATE_1) 187 }, 188 { 189 38400, 190 STRING_TOKEN(STR_COM_BAUD_RATE_2) 191 }, 192 { 193 19200, 194 STRING_TOKEN(STR_COM_BAUD_RATE_3) 195 }, 196 { 197 9600, 198 STRING_TOKEN(STR_COM_BAUD_RATE_4) 199 }, 200 { 201 7200, 202 STRING_TOKEN(STR_COM_BAUD_RATE_5) 203 }, 204 { 205 4800, 206 STRING_TOKEN(STR_COM_BAUD_RATE_6) 207 }, 208 { 209 3600, 210 STRING_TOKEN(STR_COM_BAUD_RATE_7) 211 }, 212 { 213 2400, 214 STRING_TOKEN(STR_COM_BAUD_RATE_8) 215 }, 216 { 217 2000, 218 STRING_TOKEN(STR_COM_BAUD_RATE_9) 219 }, 220 { 221 1800, 222 STRING_TOKEN(STR_COM_BAUD_RATE_10) 223 }, 224 { 225 1200, 226 STRING_TOKEN(STR_COM_BAUD_RATE_11) 227 }, 228 { 229 600, 230 STRING_TOKEN(STR_COM_BAUD_RATE_12) 231 }, 232 { 233 300, 234 STRING_TOKEN(STR_COM_BAUD_RATE_13) 235 }, 236 { 237 150, 238 STRING_TOKEN(STR_COM_BAUD_RATE_14) 239 }, 240 { 241 134, 242 STRING_TOKEN(STR_COM_BAUD_RATE_15) 243 }, 244 { 245 110, 246 STRING_TOKEN(STR_COM_BAUD_RATE_16) 247 }, 248 { 249 75, 250 STRING_TOKEN(STR_COM_BAUD_RATE_17) 251 }, 252 { 253 50, 254 STRING_TOKEN(STR_COM_BAUD_RATE_18) 255 } 256 }; 257 258 /// 259 /// Value and string token correspondency for DataBits 260 /// 261 COM_ATTR DataBitsList[4] = { 262 { 263 5, 264 STRING_TOKEN(STR_COM_DATA_BITS_0) 265 }, 266 { 267 6, 268 STRING_TOKEN(STR_COM_DATA_BITS_1) 269 }, 270 { 271 7, 272 STRING_TOKEN(STR_COM_DATA_BITS_2) 273 }, 274 { 275 8, 276 STRING_TOKEN(STR_COM_DATA_BITS_3) 277 } 278 }; 279 280 /// 281 /// Value and string token correspondency for Parity 282 /// 283 COM_ATTR ParityList[5] = { 284 { 285 NoParity, 286 STRING_TOKEN(STR_COM_PAR_0) 287 }, 288 { 289 EvenParity, 290 STRING_TOKEN(STR_COM_PAR_1) 291 }, 292 { 293 OddParity, 294 STRING_TOKEN(STR_COM_PAR_2) 295 }, 296 { 297 MarkParity, 298 STRING_TOKEN(STR_COM_PAR_3) 299 }, 300 { 301 SpaceParity, 302 STRING_TOKEN(STR_COM_PAR_4) 303 } 304 }; 305 306 /// 307 /// Value and string token correspondency for Baudreate 308 /// 309 COM_ATTR StopBitsList[3] = { 310 { 311 OneStopBit, 312 STRING_TOKEN(STR_COM_STOP_BITS_0) 313 }, 314 { 315 OneFiveStopBits, 316 STRING_TOKEN(STR_COM_STOP_BITS_1) 317 }, 318 { 319 TwoStopBits, 320 STRING_TOKEN(STR_COM_STOP_BITS_2) 321 } 322 }; 323 324 /// 325 /// Guid for messaging path, used in Serial port setting. 326 /// 327 EFI_GUID TerminalTypeGuid[4] = { 328 DEVICE_PATH_MESSAGING_PC_ANSI, 329 DEVICE_PATH_MESSAGING_VT_100, 330 DEVICE_PATH_MESSAGING_VT_100_PLUS, 331 DEVICE_PATH_MESSAGING_VT_UTF8 332 }; 333