1 /** @file
2 Module for clarifying the content of the smbios structure element information.
3
4 Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
6 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #include "../UefiShellDebug1CommandsLib.h"
18 #include "PrintInfo.h"
19 #include "LibSmbiosView.h"
20 #include "QueryTable.h"
21 #include "EventLogInfo.h"
22
23
24 //
25 // Get the certain bit of 'value'
26 //
27 #define BIT(value, bit) ((value) & ((UINT64) 1) << (bit))
28
29 //
30 // Check if above or equal to version
31 //
32 #define AE_SMBIOS_VERSION(MajorVersion, MinorVersion) \
33 (SmbiosMajorVersion > (MajorVersion) || (SmbiosMajorVersion == (MajorVersion) && SmbiosMinorVersion >= (MinorVersion)))
34
35 //
36 //////////////////////////////////////////////////////////
37 // Macros of print structure element, simplify coding.
38 //
39 #define PRINT_PENDING_STRING(pStruct, type, element) \
40 do { \
41 CHAR8 *StringBuf; \
42 StringBuf = LibGetSmbiosString ((pStruct), (pStruct->type->element)); \
43 ShellPrintEx(-1,-1,L"%a",#element); \
44 ShellPrintEx(-1,-1,L": %a\n", (StringBuf != NULL) ? StringBuf: ""); \
45 } while (0);
46
47 #define PRINT_SMBIOS_STRING(pStruct, stringnumber, element) \
48 do { \
49 CHAR8 *StringBuf; \
50 StringBuf = LibGetSmbiosString ((pStruct), (stringnumber)); \
51 ShellPrintEx(-1,-1,L"%a",#element); \
52 ShellPrintEx(-1,-1,L": %a\n", (StringBuf != NULL) ? StringBuf: ""); \
53 } while (0);
54
55 #define PRINT_STRUCT_VALUE(pStruct, type, element) \
56 do { \
57 ShellPrintEx(-1,-1,L"%a",#element); \
58 ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \
59 } while (0);
60
61 #define PRINT_STRUCT_VALUE_H(pStruct, type, element) \
62 do { \
63 ShellPrintEx(-1,-1,L"%a",#element); \
64 ShellPrintEx(-1,-1,L": 0x%x\n", (pStruct->type->element)); \
65 } while (0);
66
67 #define PRINT_STRUCT_VALUE_LH(pStruct, type, element) \
68 do { \
69 ShellPrintEx(-1,-1,L"%a",#element); \
70 ShellPrintEx(-1,-1,L": 0x%lx\n", (pStruct->type->element)); \
71 } while (0);
72
73 #define PRINT_BIT_FIELD(pStruct, type, element, size) \
74 do { \
75 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \
76 ShellPrintEx(-1,-1,L"%a",#element); \
77 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), gShellDebug1HiiHandle, size); \
78 DumpHex (0, 0, size, &(pStruct->type->element)); \
79 } while (0);
80
81 #define PRINT_SMBIOS_BIT_FIELD(pStruct, startaddress, element, size) \
82 do { \
83 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \
84 ShellPrintEx(-1,-1,L"%a",#element); \
85 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), gShellDebug1HiiHandle, size); \
86 DumpHex (0, 0, size, startaddress); \
87 } while (0);
88
89 //
90 /////////////////////////////////////////
91 //
92
93 /**
94 Copy Length of Src buffer to Dest buffer,
95 add a NULL termination to Dest buffer.
96
97 @param[in, out] Dest Destination buffer head.
98 @param[in] Src Source buffer head.
99 @param[in] Length Length of buffer to be copied.
100 **/
101 VOID
MemToString(IN OUT VOID * Dest,IN VOID * Src,IN UINTN Length)102 MemToString (
103 IN OUT VOID *Dest,
104 IN VOID *Src,
105 IN UINTN Length
106 )
107 {
108 UINT8 *SrcBuffer;
109 UINT8 *DestBuffer;
110 SrcBuffer = (UINT8 *) Src;
111 DestBuffer = (UINT8 *) Dest;
112 //
113 // copy byte by byte
114 //
115 while ((Length--)!=0) {
116 *DestBuffer++ = *SrcBuffer++;
117 }
118 //
119 // append a NULL terminator
120 //
121 *DestBuffer = '\0';
122 }
123
124 //
125 //////////////////////////////////////////////
126 //
127 // Functions below is to show the information
128 //
129
130 /**
131 Print the info of EPS(Entry Point Structure).
132
133 @param[in] SmbiosTable Pointer to the SMBIOS table entry point.
134 @param[in] Option Display option.
135 **/
136 VOID
SmbiosPrintEPSInfo(IN SMBIOS_TABLE_ENTRY_POINT * SmbiosTable,IN UINT8 Option)137 SmbiosPrintEPSInfo (
138 IN SMBIOS_TABLE_ENTRY_POINT *SmbiosTable,
139 IN UINT8 Option
140 )
141 {
142 UINT8 Anchor[5];
143 UINT8 InAnchor[6];
144
145 if (SmbiosTable == NULL) {
146 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMBIOSTABLE_NULL), gShellDebug1HiiHandle);
147 return ;
148 }
149
150 if (Option == SHOW_NONE) {
151 return ;
152 }
153
154 if (Option >= SHOW_NORMAL) {
155 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_SIGN), gShellDebug1HiiHandle);
156 MemToString (Anchor, SmbiosTable->AnchorString, 4);
157 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR), gShellDebug1HiiHandle, Anchor);
158 ShellPrintHiiEx(-1,-1,NULL,
159 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EPS_CHECKSUM),
160 gShellDebug1HiiHandle,
161 SmbiosTable->EntryPointStructureChecksum
162 );
163 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_LEN), gShellDebug1HiiHandle, SmbiosTable->EntryPointLength);
164 ShellPrintHiiEx(-1,-1,NULL,
165 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VERSION),
166 gShellDebug1HiiHandle,
167 SmbiosTable->MajorVersion,
168 SmbiosTable->MinorVersion
169 );
170 ShellPrintHiiEx(-1,-1,NULL,
171 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NUMBER_STRUCT),
172 gShellDebug1HiiHandle,
173 SmbiosTable->NumberOfSmbiosStructures
174 );
175 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_STRUCT_SIZE), gShellDebug1HiiHandle, SmbiosTable->MaxStructureSize);
176 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR), gShellDebug1HiiHandle, SmbiosTable->TableAddress);
177 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_LENGTH), gShellDebug1HiiHandle, SmbiosTable->TableLength);
178
179 }
180 //
181 // If SHOW_ALL, also print followings.
182 //
183 if (Option >= SHOW_DETAIL) {
184 ShellPrintHiiEx(-1,-1,NULL,
185 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_REVISION),
186 gShellDebug1HiiHandle,
187 SmbiosTable->EntryPointRevision
188 );
189 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BCD_REVISION), gShellDebug1HiiHandle, SmbiosTable->SmbiosBcdRevision);
190 //
191 // Since raw data is not string, add a NULL terminater.
192 //
193 MemToString (InAnchor, SmbiosTable->IntermediateAnchorString, 5);
194 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_ACHOR), gShellDebug1HiiHandle, InAnchor);
195 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_CHECKSUM), gShellDebug1HiiHandle, SmbiosTable->IntermediateChecksum);
196 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMATTED_AREA), gShellDebug1HiiHandle);
197 DumpHex (2, 0, 5, SmbiosTable->FormattedArea);
198 }
199
200 Print (L"\n");
201 }
202
203 /**
204 Print the info of 64-bit EPS(Entry Point Structure).
205
206 @param[in] SmbiosTable Pointer to the SMBIOS table entry point.
207 @param[in] Option Display option.
208 **/
209 VOID
Smbios64BitPrintEPSInfo(IN SMBIOS_TABLE_3_0_ENTRY_POINT * SmbiosTable,IN UINT8 Option)210 Smbios64BitPrintEPSInfo (
211 IN SMBIOS_TABLE_3_0_ENTRY_POINT *SmbiosTable,
212 IN UINT8 Option
213 )
214 {
215 UINT8 Anchor[5];
216
217 if (SmbiosTable == NULL) {
218 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMBIOSTABLE_NULL), gShellDebug1HiiHandle);
219 return ;
220 }
221
222 if (Option == SHOW_NONE) {
223 return ;
224 }
225
226 if (Option >= SHOW_NORMAL) {
227 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_64_BIT_ENTRY_POINT_SIGN), gShellDebug1HiiHandle);
228
229 MemToString (Anchor, SmbiosTable->AnchorString, 5);
230 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR), gShellDebug1HiiHandle, Anchor);
231
232 ShellPrintHiiEx(-1,-1,NULL,
233 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EPS_CHECKSUM),
234 gShellDebug1HiiHandle,
235 SmbiosTable->EntryPointStructureChecksum
236 );
237
238 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_LEN), gShellDebug1HiiHandle, SmbiosTable->EntryPointLength);
239
240 ShellPrintHiiEx(-1,-1,NULL,
241 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VERSION),
242 gShellDebug1HiiHandle,
243 SmbiosTable->MajorVersion,
244 SmbiosTable->MinorVersion
245 );
246
247 ShellPrintHiiEx(-1,-1,NULL,
248 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DOCREV),
249 gShellDebug1HiiHandle,
250 SmbiosTable->DocRev
251 );
252
253 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_MAX_SIZE), gShellDebug1HiiHandle, SmbiosTable->TableMaximumSize);
254
255 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR), gShellDebug1HiiHandle, SmbiosTable->TableAddress);
256
257 }
258 //
259 // If SHOW_ALL, also print followings.
260 //
261 if (Option >= SHOW_DETAIL) {
262 ShellPrintHiiEx(-1,-1,NULL,
263 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_REVISION),
264 gShellDebug1HiiHandle,
265 SmbiosTable->EntryPointRevision
266 );
267 }
268
269 Print (L"\n");
270 }
271
272 /**
273 This function print the content of the structure pointed by Struct.
274
275 @param[in] Struct Point to the structure to be printed.
276 @param[in] Option Print option of information detail.
277
278 @retval EFI_SUCCESS Successfully Printing this function.
279 @retval EFI_INVALID_PARAMETER Invalid Structure.
280 @retval EFI_UNSUPPORTED Unsupported.
281 **/
282 EFI_STATUS
SmbiosPrintStructure(IN SMBIOS_STRUCTURE_POINTER * Struct,IN UINT8 Option)283 SmbiosPrintStructure (
284 IN SMBIOS_STRUCTURE_POINTER *Struct,
285 IN UINT8 Option
286 )
287 {
288 UINT8 Index;
289 UINT8 *Buffer;
290
291 if (Struct == NULL) {
292 return EFI_INVALID_PARAMETER;
293 }
294
295 if (Option == SHOW_NONE) {
296 return EFI_SUCCESS;
297 }
298
299 Buffer = (UINT8 *) (UINTN) (Struct->Raw);
300
301 //
302 // Display structure header
303 //
304 DisplayStructureTypeInfo (Struct->Hdr->Type, SHOW_DETAIL);
305 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMAT_PART_LEN), gShellDebug1HiiHandle, Struct->Hdr->Length);
306 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_HANDLE), gShellDebug1HiiHandle, Struct->Hdr->Handle);
307
308 if (Option == SHOW_OUTLINE) {
309 return EFI_SUCCESS;
310 }
311
312 switch (Struct->Hdr->Type) {
313 //
314 // BIOS Information (Type 0)
315 //
316 case 0:
317 PRINT_PENDING_STRING (Struct, Type0, Vendor);
318 PRINT_PENDING_STRING (Struct, Type0, BiosVersion);
319 PRINT_STRUCT_VALUE (Struct, Type0, BiosSegment);
320 PRINT_PENDING_STRING (Struct, Type0, BiosReleaseDate);
321 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * (Struct->Type0->BiosSize + 1));
322
323 DisplayBiosCharacteristics (ReadUnaligned64 ((UINT64 *) (UINTN) &(Struct->Type0->BiosCharacteristics)), Option);
324
325 if (Struct->Hdr->Length > 0x12) {
326 DisplayBiosCharacteristicsExt1 (Struct->Type0->BIOSCharacteristicsExtensionBytes[0], Option);
327 }
328 if (Struct->Hdr->Length > 0x13) {
329 DisplayBiosCharacteristicsExt2 (Struct->Type0->BIOSCharacteristicsExtensionBytes[1], Option);
330 }
331
332 if (AE_SMBIOS_VERSION (0x2, 0x4) && (Struct->Hdr->Length > 0x14)) {
333 PRINT_STRUCT_VALUE (Struct, Type0, SystemBiosMajorRelease);
334 PRINT_STRUCT_VALUE (Struct, Type0, SystemBiosMinorRelease);
335 PRINT_STRUCT_VALUE (Struct, Type0, EmbeddedControllerFirmwareMajorRelease);
336 PRINT_STRUCT_VALUE (Struct, Type0, EmbeddedControllerFirmwareMinorRelease);
337 }
338
339 break;
340
341 //
342 // System Information (Type 1)
343 //
344 case 1:
345 PRINT_PENDING_STRING (Struct, Type1, Manufacturer);
346 PRINT_PENDING_STRING (Struct, Type1, ProductName);
347 PRINT_PENDING_STRING (Struct, Type1, Version);
348 PRINT_PENDING_STRING (Struct, Type1, SerialNumber);
349 PRINT_BIT_FIELD (Struct, Type1, Uuid, 16);
350 DisplaySystemWakeupType (Struct->Type1->WakeUpType, Option);
351 if (AE_SMBIOS_VERSION (0x2, 0x4) && (Struct->Hdr->Length > 0x19)) {
352 PRINT_PENDING_STRING (Struct, Type1, SKUNumber);
353 PRINT_PENDING_STRING (Struct, Type1, Family);
354 }
355
356 break;
357
358 //
359 // Baseboard Information (Type 2)
360 //
361 case 2:
362 PRINT_PENDING_STRING (Struct, Type2, Manufacturer);
363 PRINT_PENDING_STRING (Struct, Type2, ProductName);
364 PRINT_PENDING_STRING (Struct, Type2, Version);
365 PRINT_PENDING_STRING (Struct, Type2, SerialNumber);
366 if (Struct->Hdr->Length > 0x8) {
367 PRINT_PENDING_STRING (Struct, Type2, AssetTag);
368 DisplayBaseBoardFeatureFlags (*(UINT8 *) &Struct->Type2->FeatureFlag, Option);
369 PRINT_PENDING_STRING (Struct, Type2, LocationInChassis);
370 PRINT_STRUCT_VALUE_H (Struct, Type2, ChassisHandle);
371 DisplayBaseBoardBoardType (Struct->Type2->BoardType, Option);
372 }
373 break;
374
375 //
376 // System Enclosure (Type 3)
377 //
378 case 3:
379 PRINT_PENDING_STRING (Struct, Type3, Manufacturer);
380 PRINT_STRUCT_VALUE (Struct, Type3, Type);
381 DisplaySystemEnclosureType (Struct->Type3->Type, Option);
382 PRINT_PENDING_STRING (Struct, Type3, Version);
383 PRINT_PENDING_STRING (Struct, Type3, SerialNumber);
384 PRINT_PENDING_STRING (Struct, Type3, AssetTag);
385 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), gShellDebug1HiiHandle);
386 DisplaySystemEnclosureStatus (Struct->Type3->BootupState, Option);
387 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), gShellDebug1HiiHandle);
388 DisplaySystemEnclosureStatus (Struct->Type3->PowerSupplyState, Option);
389 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), gShellDebug1HiiHandle);
390 DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option);
391 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);
392 DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option);
393 if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0xD)) {
394 PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);
395 }
396 break;
397
398 //
399 // Processor Information (Type 4)
400 //
401 case 4:
402 PRINT_SMBIOS_STRING (Struct, Struct->Type4->Socket, SocketDesignation)
403 DisplayProcessorType (Struct->Type4->ProcessorType, Option);
404 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0x28) &&
405 (Struct->Type4->ProcessorFamily == 0xFE)) {
406 //
407 // Get family from ProcessorFamily2 field
408 //
409 DisplayProcessorFamily2 (Struct->Type4->ProcessorFamily2, Option);
410 } else {
411 DisplayProcessorFamily (Struct->Type4->ProcessorFamily, Option);
412 }
413 PRINT_PENDING_STRING (Struct, Type4, ProcessorManufacture);
414 PRINT_BIT_FIELD (Struct, Type4, ProcessorId, 8);
415 PRINT_PENDING_STRING (Struct, Type4, ProcessorVersion);
416 DisplayProcessorVoltage (*(UINT8 *) &(Struct->Type4->Voltage), Option);
417 PRINT_STRUCT_VALUE (Struct, Type4, ExternalClock);
418 PRINT_STRUCT_VALUE (Struct, Type4, MaxSpeed);
419 PRINT_STRUCT_VALUE (Struct, Type4, CurrentSpeed);
420 DisplayProcessorStatus (Struct->Type4->Status, Option);
421 DisplayProcessorUpgrade (Struct->Type4->ProcessorUpgrade, Option);
422 PRINT_STRUCT_VALUE_H (Struct, Type4, L1CacheHandle);
423 PRINT_STRUCT_VALUE_H (Struct, Type4, L2CacheHandle);
424 PRINT_STRUCT_VALUE_H (Struct, Type4, L3CacheHandle);
425 if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0x20)) {
426 PRINT_PENDING_STRING (Struct, Type4, SerialNumber);
427 PRINT_PENDING_STRING (Struct, Type4, AssetTag);
428 PRINT_PENDING_STRING (Struct, Type4, PartNumber);
429 }
430 if (AE_SMBIOS_VERSION (0x2, 0x5) && (Struct->Hdr->Length > 0x23)) {
431 PRINT_STRUCT_VALUE (Struct, Type4, CoreCount);
432 PRINT_STRUCT_VALUE (Struct, Type4, EnabledCoreCount);
433 PRINT_STRUCT_VALUE (Struct, Type4, ThreadCount);
434 DisplayProcessorCharacteristics (Struct->Type4->ProcessorCharacteristics, Option);
435 }
436 if ((SmbiosMajorVersion >= 0x3) && (Struct->Hdr->Length > 0x2A)) {
437 PRINT_STRUCT_VALUE (Struct, Type4, CoreCount2);
438 PRINT_STRUCT_VALUE (Struct, Type4, EnabledCoreCount2);
439 PRINT_STRUCT_VALUE (Struct, Type4, ThreadCount2);
440 }
441 break;
442
443 //
444 // Memory Controller Information (Type 5)
445 //
446 case 5:
447 {
448 UINT8 SlotNum;
449 SlotNum = Struct->Type5->AssociatedMemorySlotNum;
450
451 DisplayMcErrorDetectMethod (Struct->Type5->ErrDetectMethod, Option);
452 DisplayMcErrorCorrectCapability (*(UINT8 *) &(Struct->Type5->ErrCorrectCapability), Option);
453 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), gShellDebug1HiiHandle);
454 DisplayMcInterleaveSupport (Struct->Type5->SupportInterleave, Option);
455 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), gShellDebug1HiiHandle);
456 DisplayMcInterleaveSupport (Struct->Type5->CurrentInterleave, Option);
457 DisplayMaxMemoryModuleSize (Struct->Type5->MaxMemoryModuleSize, SlotNum, Option);
458 DisplayMcMemorySpeeds (*(UINT16 *) &(Struct->Type5->SupportSpeed), Option);
459 DisplayMmMemoryType (Struct->Type5->SupportMemoryType, Option);
460 DisplayMemoryModuleVoltage (Struct->Type5->MemoryModuleVoltage, Option);
461 PRINT_STRUCT_VALUE (Struct, Type5, AssociatedMemorySlotNum);
462 //
463 // According to SMBIOS Specification, offset 0x0F
464 //
465 DisplayMemoryModuleConfigHandles ((UINT16 *) (&Buffer[0x0F]), SlotNum, Option);
466 DisplayMcErrorCorrectCapability (Buffer[0x0F + 2 * SlotNum], Option);
467 }
468 break;
469
470 //
471 // Memory Module Information (Type 6)
472 //
473 case 6:
474 PRINT_PENDING_STRING (Struct, Type6, SocketDesignation);
475 DisplayMmBankConnections (Struct->Type6->BankConnections, Option);
476 PRINT_STRUCT_VALUE (Struct, Type6, CurrentSpeed);
477 DisplayMmMemoryType (*(UINT16 *) &(Struct->Type6->CurrentMemoryType), Option);
478 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), gShellDebug1HiiHandle);
479 DisplayMmMemorySize (*(UINT8 *) &(Struct->Type6->InstalledSize), Option);
480 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);
481 DisplayMmMemorySize (*(UINT8 *) &(Struct->Type6->EnabledSize), Option);
482 DisplayMmErrorStatus (Struct->Type6->ErrorStatus, Option);
483 break;
484
485 //
486 // Cache Information (Type 7)
487 //
488 case 7:
489 PRINT_PENDING_STRING (Struct, Type7, SocketDesignation);
490 DisplayCacheConfiguration (Struct->Type7->CacheConfiguration, Option);
491 PRINT_STRUCT_VALUE_H (Struct, Type7, MaximumCacheSize);
492 PRINT_STRUCT_VALUE_H (Struct, Type7, InstalledSize);
493 PRINT_STRUCT_VALUE_H (Struct, Type7, SupportedSRAMType);
494 PRINT_STRUCT_VALUE_H (Struct, Type7, CurrentSRAMType);
495 DisplayCacheSRAMType (ReadUnaligned16 ((UINT16 *) (UINTN) &(Struct->Type7->CurrentSRAMType)), Option);
496 PRINT_STRUCT_VALUE_H (Struct, Type7, CacheSpeed);
497 DisplayCacheErrCorrectingType (Struct->Type7->ErrorCorrectionType, Option);
498 DisplayCacheSystemCacheType (Struct->Type7->SystemCacheType, Option);
499 DisplayCacheAssociativity (Struct->Type7->Associativity, Option);
500 break;
501
502 //
503 // Port Connector Information (Type 8)
504 //
505 case 8:
506 PRINT_PENDING_STRING (Struct, Type8, InternalReferenceDesignator);
507 Print (L"Internal ");
508 DisplayPortConnectorType (Struct->Type8->InternalConnectorType, Option);
509 PRINT_PENDING_STRING (Struct, Type8, ExternalReferenceDesignator);
510 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), gShellDebug1HiiHandle);
511 DisplayPortConnectorType (Struct->Type8->ExternalConnectorType, Option);
512 DisplayPortType (Struct->Type8->PortType, Option);
513 break;
514
515 //
516 // System Slots (Type 9)
517 //
518 case 9:
519 PRINT_PENDING_STRING (Struct, Type9, SlotDesignation);
520 DisplaySystemSlotType (Struct->Type9->SlotType, Option);
521 DisplaySystemSlotDataBusWidth (Struct->Type9->SlotDataBusWidth, Option);
522 DisplaySystemSlotCurrentUsage (Struct->Type9->CurrentUsage, Option);
523 DisplaySystemSlotLength (Struct->Type9->SlotLength, Option);
524 DisplaySystemSlotId (
525 Struct->Type9->SlotID,
526 Struct->Type9->SlotType,
527 Option
528 );
529 DisplaySlotCharacteristics1 (*(UINT8 *) &(Struct->Type9->SlotCharacteristics1), Option);
530 DisplaySlotCharacteristics2 (*(UINT8 *) &(Struct->Type9->SlotCharacteristics2), Option);
531 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0xD)) {
532 PRINT_STRUCT_VALUE_H (Struct, Type9, SegmentGroupNum);
533 PRINT_STRUCT_VALUE_H (Struct, Type9, BusNum);
534 PRINT_STRUCT_VALUE_H (Struct, Type9, DevFuncNum);
535 }
536 break;
537
538 //
539 // On Board Devices Information (Type 10)
540 //
541 case 10:
542 {
543 UINTN NumOfDevice;
544 NumOfDevice = (Struct->Type10->Hdr.Length - sizeof (SMBIOS_STRUCTURE)) / (2 * sizeof (UINT8));
545 for (Index = 0; Index < NumOfDevice; Index++) {
546 DisplayOnboardDeviceTypes (Struct->Type10->Device[Index].DeviceType, Option);
547 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gShellDebug1HiiHandle);
548 ShellPrintEx(-1,-1,L"%a\n",LibGetSmbiosString (Struct, Struct->Type10->Device[Index].DescriptionString));
549 }
550 }
551 break;
552
553 //
554 // Oem Strings (Type 11)
555 //
556 case 11:
557 PRINT_STRUCT_VALUE (Struct, Type11, StringCount);
558 for (Index = 1; Index <= Struct->Type11->StringCount; Index++) {
559 ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));
560 }
561 break;
562
563 //
564 // System Configuration Options (Type 12)
565 //
566 case 12:
567 PRINT_STRUCT_VALUE (Struct, Type12, StringCount);
568 for (Index = 1; Index <= Struct->Type12->StringCount; Index++) {
569 ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));
570 }
571 break;
572
573 //
574 // BIOS Language Information (Type 13)
575 //
576 case 13:
577 PRINT_STRUCT_VALUE (Struct, Type13, InstallableLanguages);
578 PRINT_STRUCT_VALUE (Struct, Type13, Flags);
579 PRINT_BIT_FIELD (Struct, Type13, Reserved, 15);
580 PRINT_PENDING_STRING (Struct, Type13, CurrentLanguages);
581 break;
582
583 //
584 // Group Associations (Type 14)
585 //
586 case 14:
587 {
588 UINT8 NumOfItem;
589 NumOfItem = (Struct->Type14->Hdr.Length - 5) / 3;
590 PRINT_PENDING_STRING (Struct, Type14, GroupName);
591 for (Index = 0; Index < NumOfItem; Index++) {
592 ShellPrintEx(-1,-1,L"ItemType %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemType);
593 ShellPrintEx(-1,-1,L"ItemHandle %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemHandle);
594 }
595 }
596 break;
597
598 //
599 // System Event Log (Type 15)
600 //
601 case 15:
602 {
603 EVENT_LOG_TYPE *Ptr;
604 UINT8 Count;
605 UINT8 *AccessMethodAddress;
606
607 PRINT_STRUCT_VALUE_H (Struct, Type15, LogAreaLength);
608 PRINT_STRUCT_VALUE_H (Struct, Type15, LogHeaderStartOffset);
609 PRINT_STRUCT_VALUE_H (Struct, Type15, LogDataStartOffset);
610 DisplaySELAccessMethod (Struct->Type15->AccessMethod, Option);
611 PRINT_STRUCT_VALUE_H (Struct, Type15, AccessMethodAddress);
612 DisplaySELLogStatus (Struct->Type15->LogStatus, Option);
613 PRINT_STRUCT_VALUE_H (Struct, Type15, LogChangeToken);
614 DisplaySysEventLogHeaderFormat (Struct->Type15->LogHeaderFormat, Option);
615 PRINT_STRUCT_VALUE_H (Struct, Type15, NumberOfSupportedLogTypeDescriptors);
616 PRINT_STRUCT_VALUE_H (Struct, Type15, LengthOfLogTypeDescriptor);
617
618 Count = Struct->Type15->NumberOfSupportedLogTypeDescriptors;
619 if (Count > 0) {
620 Ptr = Struct->Type15->EventLogTypeDescriptors;
621
622 //
623 // Display all Event Log type descriptors supported by system
624 //
625 for (Index = 0; Index < Count; Index++, Ptr++) {
626 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRTED_EVENT), gShellDebug1HiiHandle, Index + 1);
627 DisplaySELTypes (Ptr->LogType, Option);
628 DisplaySELVarDataFormatType (Ptr->DataFormatType, Option);
629 }
630
631 if (Option >= SHOW_DETAIL) {
632 switch (Struct->Type15->AccessMethod) {
633 case 03:
634 AccessMethodAddress = (UINT8 *) (UINTN) (Struct->Type15->AccessMethodAddress);
635 break;
636
637 case 00:
638 case 01:
639 case 02:
640 case 04:
641 default:
642 ShellPrintHiiEx(-1,-1,NULL,
643 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED),
644 gShellDebug1HiiHandle,
645 Struct->Type15->AccessMethod
646 );
647 return EFI_UNSUPPORTED;
648 }
649 //
650 // Display Event Log Header
651 //
652 // Starting offset (or index) within the nonvolatile storage
653 // of the event-log's header, from the Access Method Address
654 //
655 DisplaySysEventLogHeader (
656 Struct->Type15->LogHeaderFormat,
657 AccessMethodAddress + Struct->Type15->LogHeaderStartOffset
658 );
659
660 //
661 // Display all Event Log data
662 //
663 // Starting offset (or index) within the nonvolatile storage
664 // of the event-log's first data byte, from the Access Method Address(0x14)
665 //
666 DisplaySysEventLogData (
667 AccessMethodAddress + Struct->Type15->LogDataStartOffset,
668 (UINT16)
669 (
670 Struct->Type15->LogAreaLength -
671 (Struct->Type15->LogDataStartOffset - Struct->Type15->LogHeaderStartOffset)
672 )
673 );
674 }
675
676 }
677 }
678 break;
679
680 //
681 // Physical Memory Array (Type 16)
682 //
683 case 16:
684 DisplayPMALocation (Struct->Type16->Location, Option);
685 DisplayPMAUse (Struct->Type16->Use, Option);
686 DisplayPMAErrorCorrectionTypes (
687 Struct->Type16->MemoryErrorCorrection,
688 Option
689 );
690 PRINT_STRUCT_VALUE_H (Struct, Type16, MaximumCapacity);
691 PRINT_STRUCT_VALUE_H (Struct, Type16, MemoryErrorInformationHandle);
692 PRINT_STRUCT_VALUE_H (Struct, Type16, NumberOfMemoryDevices);
693 if (AE_SMBIOS_VERSION (0x2, 0x7) && Struct->Hdr->Length > 0xF) {
694 PRINT_STRUCT_VALUE_LH (Struct, Type16, ExtendedMaximumCapacity);
695 }
696 break;
697
698 //
699 // Memory Device (Type 17)
700 //
701 case 17:
702 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryArrayHandle);
703 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryErrorInformationHandle);
704 PRINT_STRUCT_VALUE (Struct, Type17, TotalWidth);
705 PRINT_STRUCT_VALUE (Struct, Type17, DataWidth);
706 PRINT_STRUCT_VALUE (Struct, Type17, Size);
707 DisplayMemoryDeviceFormFactor (Struct->Type17->FormFactor, Option);
708 PRINT_STRUCT_VALUE_H (Struct, Type17, DeviceSet);
709 PRINT_PENDING_STRING (Struct, Type17, DeviceLocator);
710 PRINT_PENDING_STRING (Struct, Type17, BankLocator);
711 DisplayMemoryDeviceType (Struct->Type17->MemoryType, Option);
712 DisplayMemoryDeviceTypeDetail (ReadUnaligned16 ((UINT16 *) (UINTN) &(Struct->Type17->TypeDetail)), Option);
713 PRINT_STRUCT_VALUE_H (Struct, Type17, Speed);
714 PRINT_PENDING_STRING (Struct, Type17, Manufacturer);
715 PRINT_PENDING_STRING (Struct, Type17, SerialNumber);
716 PRINT_PENDING_STRING (Struct, Type17, AssetTag);
717 PRINT_PENDING_STRING (Struct, Type17, PartNumber);
718 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0x1B)) {
719 PRINT_STRUCT_VALUE_H (Struct, Type17, Attributes);
720 }
721 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x1C)) {
722 PRINT_STRUCT_VALUE (Struct, Type17, ExtendedSize);
723 PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredMemoryClockSpeed);
724 }
725 if (AE_SMBIOS_VERSION (0x2, 0x8) && (Struct->Hdr->Length > 0x22)) {
726 PRINT_STRUCT_VALUE (Struct, Type17, MinimumVoltage);
727 PRINT_STRUCT_VALUE (Struct, Type17, MaximumVoltage);
728 PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredVoltage);
729 }
730 break;
731
732 //
733 // 32-bit Memory Error Information (Type 18)
734 //
735 case 18:
736 DisplayMemoryErrorType (Struct->Type18->ErrorType, Option);
737 DisplayMemoryErrorGranularity (
738 Struct->Type18->ErrorGranularity,
739 Option
740 );
741 DisplayMemoryErrorOperation (Struct->Type18->ErrorOperation, Option);
742 PRINT_STRUCT_VALUE_H (Struct, Type18, VendorSyndrome);
743 PRINT_STRUCT_VALUE_H (Struct, Type18, MemoryArrayErrorAddress);
744 PRINT_STRUCT_VALUE_H (Struct, Type18, DeviceErrorAddress);
745 PRINT_STRUCT_VALUE_H (Struct, Type18, ErrorResolution);
746 break;
747
748 //
749 // Memory Array Mapped Address (Type 19)
750 //
751 case 19:
752 PRINT_STRUCT_VALUE_H (Struct, Type19, StartingAddress);
753 PRINT_STRUCT_VALUE_H (Struct, Type19, EndingAddress);
754 PRINT_STRUCT_VALUE_H (Struct, Type19, MemoryArrayHandle);
755 PRINT_STRUCT_VALUE_H (Struct, Type19, PartitionWidth);
756 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0xF)) {
757 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedStartingAddress);
758 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedEndingAddress);
759 }
760 break;
761
762 //
763 // Memory Device Mapped Address (Type 20)
764 //
765 case 20:
766 PRINT_STRUCT_VALUE_H (Struct, Type20, StartingAddress);
767 PRINT_STRUCT_VALUE_H (Struct, Type20, EndingAddress);
768 PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryDeviceHandle);
769 PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryArrayMappedAddressHandle);
770 PRINT_STRUCT_VALUE_H (Struct, Type20, PartitionRowPosition);
771 PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavePosition);
772 PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavedDataDepth);
773 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) {
774 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedStartingAddress);
775 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedEndingAddress);
776 }
777 break;
778
779 //
780 // Built-in Pointing Device (Type 21)
781 //
782 case 21:
783 DisplayPointingDeviceType (Struct->Type21->Type, Option);
784 DisplayPointingDeviceInterface (Struct->Type21->Interface, Option);
785 PRINT_STRUCT_VALUE (Struct, Type21, NumberOfButtons);
786 break;
787
788 //
789 // Portable Battery (Type 22)
790 //
791 case 22:
792 PRINT_PENDING_STRING (Struct, Type22, Location);
793 PRINT_PENDING_STRING (Struct, Type22, Manufacturer);
794 PRINT_PENDING_STRING (Struct, Type22, ManufactureDate);
795 PRINT_PENDING_STRING (Struct, Type22, SerialNumber);
796 PRINT_PENDING_STRING (Struct, Type22, DeviceName);
797 DisplayPBDeviceChemistry (
798 Struct->Type22->DeviceChemistry,
799 Option
800 );
801 PRINT_STRUCT_VALUE_H (Struct, Type22, DeviceCapacity);
802 PRINT_STRUCT_VALUE_H (Struct, Type22, DesignVoltage);
803 PRINT_PENDING_STRING (Struct, Type22, SBDSVersionNumber);
804 PRINT_STRUCT_VALUE_H (Struct, Type22, MaximumErrorInBatteryData);
805 PRINT_STRUCT_VALUE_H (Struct, Type22, SBDSSerialNumber);
806 DisplaySBDSManufactureDate (
807 Struct->Type22->SBDSManufactureDate,
808 Option
809 );
810 PRINT_PENDING_STRING (Struct, Type22, SBDSDeviceChemistry);
811 PRINT_STRUCT_VALUE_H (Struct, Type22, DesignCapacityMultiplier);
812 PRINT_STRUCT_VALUE_H (Struct, Type22, OEMSpecific);
813 break;
814
815 //
816 // System Reset (Type 23)
817 //
818 case 23:
819 DisplaySystemResetCapabilities (
820 Struct->Type23->Capabilities,
821 Option
822 );
823 PRINT_STRUCT_VALUE_H (Struct, Type23, ResetCount);
824 PRINT_STRUCT_VALUE_H (Struct, Type23, ResetLimit);
825 PRINT_STRUCT_VALUE_H (Struct, Type23, TimerInterval);
826 PRINT_STRUCT_VALUE_H (Struct, Type23, Timeout);
827 break;
828
829 //
830 // Hardware Security (Type 24)
831 //
832 case 24:
833 DisplayHardwareSecuritySettings (
834 Struct->Type24->HardwareSecuritySettings,
835 Option
836 );
837 break;
838
839 //
840 // System Power Controls (Type 25)
841 //
842 case 25:
843 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMonth);
844 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnDayOfMonth);
845 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnHour);
846 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMinute);
847 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnSecond);
848 break;
849
850 //
851 // Voltage Probe (Type 26)
852 //
853 case 26:
854 PRINT_PENDING_STRING (Struct, Type26, Description);
855 DisplayVPLocation (*(UINT8 *) &(Struct->Type26->LocationAndStatus), Option);
856 DisplayVPStatus (*(UINT8 *) &(Struct->Type26->LocationAndStatus), Option);
857 PRINT_STRUCT_VALUE_H (Struct, Type26, MaximumValue);
858 PRINT_STRUCT_VALUE_H (Struct, Type26, MinimumValue);
859 PRINT_STRUCT_VALUE_H (Struct, Type26, Resolution);
860 PRINT_STRUCT_VALUE_H (Struct, Type26, Tolerance);
861 PRINT_STRUCT_VALUE_H (Struct, Type26, Accuracy);
862 PRINT_STRUCT_VALUE_H (Struct, Type26, OEMDefined);
863 PRINT_STRUCT_VALUE_H (Struct, Type26, NominalValue);
864 break;
865
866 //
867 // Cooling Device (Type 27)
868 //
869 case 27:
870 PRINT_STRUCT_VALUE_H (Struct, Type27, TemperatureProbeHandle);
871 DisplayCoolingDeviceStatus (*(UINT8 *) &(Struct->Type27->DeviceTypeAndStatus), Option);
872 DisplayCoolingDeviceType (*(UINT8 *) &(Struct->Type27->DeviceTypeAndStatus), Option);
873 PRINT_STRUCT_VALUE_H (Struct, Type27, CoolingUnitGroup);
874 PRINT_STRUCT_VALUE_H (Struct, Type27, OEMDefined);
875 PRINT_STRUCT_VALUE_H (Struct, Type27, NominalSpeed);
876 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0xE)) {
877 PRINT_PENDING_STRING (Struct, Type27, Description);
878 }
879 break;
880
881 //
882 // Temperature Probe (Type 28)
883 //
884 case 28:
885 PRINT_PENDING_STRING (Struct, Type28, Description);
886 DisplayTemperatureProbeStatus (*(UINT8 *) &(Struct->Type28->LocationAndStatus), Option);
887 DisplayTemperatureProbeLoc (*(UINT8 *) &(Struct->Type28->LocationAndStatus), Option);
888 PRINT_STRUCT_VALUE_H (Struct, Type28, MaximumValue);
889 PRINT_STRUCT_VALUE_H (Struct, Type28, MinimumValue);
890 PRINT_STRUCT_VALUE_H (Struct, Type28, Resolution);
891 PRINT_STRUCT_VALUE_H (Struct, Type28, Tolerance);
892 PRINT_STRUCT_VALUE_H (Struct, Type28, Accuracy);
893 PRINT_STRUCT_VALUE_H (Struct, Type28, OEMDefined);
894 PRINT_STRUCT_VALUE_H (Struct, Type28, NominalValue);
895 break;
896
897 //
898 // Electrical Current Probe (Type 29)
899 //
900 case 29:
901 PRINT_PENDING_STRING (Struct, Type29, Description);
902 DisplayECPStatus (*(UINT8 *) &(Struct->Type29->LocationAndStatus), Option);
903 DisplayECPLoc (*(UINT8 *) &(Struct->Type29->LocationAndStatus), Option);
904 PRINT_STRUCT_VALUE_H (Struct, Type29, MaximumValue);
905 PRINT_STRUCT_VALUE_H (Struct, Type29, MinimumValue);
906 PRINT_STRUCT_VALUE_H (Struct, Type29, Resolution);
907 PRINT_STRUCT_VALUE_H (Struct, Type29, Tolerance);
908 PRINT_STRUCT_VALUE_H (Struct, Type29, Accuracy);
909 PRINT_STRUCT_VALUE_H (Struct, Type29, OEMDefined);
910 PRINT_STRUCT_VALUE_H (Struct, Type29, NominalValue);
911 break;
912
913 //
914 // Out-of-Band Remote Access (Type 30)
915 //
916 case 30:
917 PRINT_PENDING_STRING (Struct, Type30, ManufacturerName);
918 DisplayOBRAConnections (Struct->Type30->Connections, Option);
919 break;
920
921 //
922 // Boot Integrity Services (BIS) Entry Point (Type 31)
923 //
924 case 31:
925 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE31), gShellDebug1HiiHandle);
926 break;
927
928 //
929 // System Boot Information (Type 32)
930 //
931 case 32:
932 PRINT_BIT_FIELD (Struct, Type32, Reserved, 6);
933 DisplaySystemBootStatus (Struct->Type32->BootStatus, Option);
934 break;
935
936 //
937 // 64-Bit Memory Error Information (Type 33)
938 //
939 case 33:
940 DisplayMemoryErrorType (Struct->Type33->ErrorType, Option);
941 DisplayMemoryErrorGranularity (
942 Struct->Type33->ErrorGranularity,
943 Option
944 );
945 DisplayMemoryErrorOperation (Struct->Type33->ErrorOperation, Option);
946 PRINT_STRUCT_VALUE_H (Struct, Type33, VendorSyndrome);
947 PRINT_STRUCT_VALUE_LH (Struct, Type33, MemoryArrayErrorAddress);
948 PRINT_STRUCT_VALUE_LH (Struct, Type33, DeviceErrorAddress);
949 PRINT_STRUCT_VALUE_H (Struct, Type33, ErrorResolution);
950 break;
951
952 //
953 // Management Device (Type 34)
954 //
955 case 34:
956 PRINT_PENDING_STRING (Struct, Type34, Description);
957 DisplayMDType (Struct->Type34->Type, Option);
958 PRINT_STRUCT_VALUE_H (Struct, Type34, Address);
959 DisplayMDAddressType (Struct->Type34->AddressType, Option);
960 break;
961
962 //
963 // Management Device Component (Type 35)
964 //
965 case 35:
966 PRINT_PENDING_STRING (Struct, Type35, Description);
967 PRINT_STRUCT_VALUE_H (Struct, Type35, ManagementDeviceHandle);
968 PRINT_STRUCT_VALUE_H (Struct, Type35, ComponentHandle);
969 PRINT_STRUCT_VALUE_H (Struct, Type35, ThresholdHandle);
970 break;
971
972 //
973 // Management Device Threshold Data (Type 36)
974 //
975 case 36:
976 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonCritical);
977 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonCritical);
978 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdCritical);
979 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdCritical);
980 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonRecoverable);
981 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonRecoverable);
982 break;
983
984 //
985 // Memory Channel (Type 37)
986 //
987 case 37:
988 {
989 UINT8 Count;
990 MEMORY_DEVICE *Ptr;
991 DisplayMemoryChannelType (Struct->Type37->ChannelType, Option);
992 PRINT_STRUCT_VALUE_H (Struct, Type37, MaximumChannelLoad);
993 PRINT_STRUCT_VALUE_H (Struct, Type37, MemoryDeviceCount);
994
995 Count = Struct->Type37->MemoryDeviceCount;
996 Ptr = Struct->Type37->MemoryDevice;
997 for (Index = 0; Index < Count; Index++) {
998 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), gShellDebug1HiiHandle, Index + 1);
999 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), gShellDebug1HiiHandle, Ptr[Index].DeviceLoad);
1000 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_HANDLE), gShellDebug1HiiHandle, Ptr[Index].DeviceHandle);
1001 }
1002 }
1003 break;
1004
1005 //
1006 // IPMI Device Information (Type 38)
1007 //
1008 case 38:
1009 DisplayIPMIDIBMCInterfaceType (Struct->Type38->InterfaceType, Option);
1010 PRINT_STRUCT_VALUE_H (Struct, Type38, IPMISpecificationRevision);
1011 PRINT_STRUCT_VALUE_H (Struct, Type38, I2CSlaveAddress);
1012 PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);
1013 PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);
1014 break;
1015
1016 //
1017 // System Power Supply (Type 39)
1018 //
1019 case 39:
1020 PRINT_STRUCT_VALUE_H (Struct, Type39, PowerUnitGroup);
1021 PRINT_PENDING_STRING (Struct, Type39, Location);
1022 PRINT_PENDING_STRING (Struct, Type39, DeviceName);
1023 PRINT_PENDING_STRING (Struct, Type39, Manufacturer);
1024 PRINT_PENDING_STRING (Struct, Type39, SerialNumber);
1025 PRINT_PENDING_STRING (Struct, Type39, AssetTagNumber);
1026 PRINT_PENDING_STRING (Struct, Type39, ModelPartNumber);
1027 PRINT_PENDING_STRING (Struct, Type39, RevisionLevel);
1028 PRINT_STRUCT_VALUE_H (Struct, Type39, MaxPowerCapacity);
1029 DisplaySPSCharacteristics (
1030 *(UINT16 *) &(Struct->Type39->PowerSupplyCharacteristics),
1031 Option
1032 );
1033 PRINT_STRUCT_VALUE_H (Struct, Type39, InputVoltageProbeHandle);
1034 PRINT_STRUCT_VALUE_H (Struct, Type39, CoolingDeviceHandle);
1035 PRINT_STRUCT_VALUE_H (Struct, Type39, InputCurrentProbeHandle);
1036 break;
1037
1038 //
1039 // Additional Information (Type 40)
1040 //
1041 case 40:
1042 {
1043 UINT8 NumberOfEntries;
1044 UINT8 EntryLength;
1045 ADDITIONAL_INFORMATION_ENTRY *Entries;
1046
1047 EntryLength = 0;
1048 Entries = Struct->Type40->AdditionalInfoEntries;
1049 NumberOfEntries = Struct->Type40->NumberOfAdditionalInformationEntries;
1050
1051 PRINT_STRUCT_VALUE_H (Struct, Type40, NumberOfAdditionalInformationEntries);
1052
1053 for (Index = 0; Index < NumberOfEntries; Index++) {
1054 EntryLength = Entries->EntryLength;
1055 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), gShellDebug1HiiHandle, EntryLength);
1056 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), gShellDebug1HiiHandle, Entries->ReferencedHandle);
1057 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), gShellDebug1HiiHandle, Entries->ReferencedOffset);
1058 PRINT_SMBIOS_STRING (Struct, Entries->EntryString, String);
1059 PRINT_SMBIOS_BIT_FIELD (Struct, Entries->Value, Value, EntryLength - 5);
1060 Entries = (ADDITIONAL_INFORMATION_ENTRY *) ((UINT8 *)Entries + EntryLength);
1061 }
1062 }
1063 break;
1064
1065 //
1066 // Onboard Devices Extended Information (Type 41)
1067 //
1068 case 41:
1069 PRINT_PENDING_STRING (Struct, Type41, ReferenceDesignation);
1070 ShellPrintEx(-1,-1,(((Struct->Type41->DeviceType) & 0x80) != 0) ? L"Device Enabled\n": L"Device Disabled\n");
1071 DisplayOnboardDeviceTypes ((Struct->Type41->DeviceType) & 0x7F, Option);
1072 PRINT_STRUCT_VALUE_H (Struct, Type41, DeviceTypeInstance);
1073 PRINT_STRUCT_VALUE_H (Struct, Type41, SegmentGroupNum);
1074 PRINT_STRUCT_VALUE_H (Struct, Type41, BusNum);
1075 PRINT_STRUCT_VALUE_H (Struct, Type41, DevFuncNum);
1076 break;
1077
1078 //
1079 // Management Controller Host Interface (Type 42)
1080 //
1081 case 42:
1082 PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType);
1083 break;
1084
1085 //
1086 // Inactive (Type 126)
1087 //
1088 case 126:
1089 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INACTIVE_STRUCT), gShellDebug1HiiHandle);
1090 break;
1091
1092 //
1093 // End-of-Table (Type 127)
1094 //
1095 case 127:
1096 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THIS_STRUCT_END_TABLE), gShellDebug1HiiHandle);
1097 break;
1098
1099 default:
1100 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE_UNDEFINED), gShellDebug1HiiHandle);
1101 break;
1102 }
1103
1104 return EFI_SUCCESS;
1105 }
1106
1107 /**
1108 Display BIOS Information (Type 0) information.
1109
1110 @param[in] Chara The information bits.
1111 @param[in] Option The optional information.
1112 **/
1113 VOID
DisplayBiosCharacteristics(IN UINT64 Chara,IN UINT8 Option)1114 DisplayBiosCharacteristics (
1115 IN UINT64 Chara,
1116 IN UINT8 Option
1117 )
1118 {
1119 //
1120 // Print header
1121 //
1122 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR), gShellDebug1HiiHandle);
1123 //
1124 // print option
1125 //
1126 PRINT_INFO_OPTION (Chara, Option);
1127
1128 //
1129 // Check all the bits and print information
1130 // This function does not use Table because table of bits
1131 // are designed not to deal with UINT64
1132 //
1133 if (BIT (Chara, 0) != 0) {
1134 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
1135 }
1136
1137 if (BIT (Chara, 1) != 0) {
1138 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
1139 }
1140
1141 if (BIT (Chara, 2) != 0) {
1142 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), gShellDebug1HiiHandle);
1143 }
1144
1145 if (BIT (Chara, 3) != 0) {
1146 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), gShellDebug1HiiHandle);
1147 }
1148
1149 if (BIT (Chara, 4) != 0) {
1150 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), gShellDebug1HiiHandle);
1151 }
1152
1153 if (BIT (Chara, 5) != 0) {
1154 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), gShellDebug1HiiHandle);
1155 }
1156
1157 if (BIT (Chara, 6) != 0) {
1158 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), gShellDebug1HiiHandle);
1159 }
1160
1161 if (BIT (Chara, 7) != 0) {
1162 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), gShellDebug1HiiHandle);
1163 }
1164
1165 if (BIT (Chara, 8) != 0) {
1166 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), gShellDebug1HiiHandle);
1167 }
1168
1169 if (BIT (Chara, 9) != 0) {
1170 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), gShellDebug1HiiHandle);
1171 }
1172
1173 if (BIT (Chara, 10) != 0) {
1174 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), gShellDebug1HiiHandle);
1175 }
1176
1177 if (BIT (Chara, 11) != 0) {
1178 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), gShellDebug1HiiHandle);
1179 }
1180
1181 if (BIT (Chara, 12) != 0) {
1182 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), gShellDebug1HiiHandle);
1183 }
1184
1185 if (BIT (Chara, 13) != 0) {
1186 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), gShellDebug1HiiHandle);
1187 }
1188
1189 if (BIT (Chara, 14) != 0) {
1190 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), gShellDebug1HiiHandle);
1191 }
1192
1193 if (BIT (Chara, 15) != 0) {
1194 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gShellDebug1HiiHandle);
1195 }
1196
1197 if (BIT (Chara, 16) != 0) {
1198 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1199 }
1200
1201 if (BIT (Chara, 17) != 0) {
1202 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), gShellDebug1HiiHandle);
1203 }
1204
1205 if (BIT (Chara, 18) != 0) {
1206 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), gShellDebug1HiiHandle);
1207 }
1208
1209 if (BIT (Chara, 19) != 0) {
1210 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), gShellDebug1HiiHandle);
1211 }
1212
1213 if (BIT (Chara, 20) != 0) {
1214 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), gShellDebug1HiiHandle);
1215 }
1216
1217 if (BIT (Chara, 21) != 0) {
1218 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), gShellDebug1HiiHandle);
1219 }
1220
1221 if (BIT (Chara, 22) != 0) {
1222 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), gShellDebug1HiiHandle);
1223 }
1224
1225 if (BIT (Chara, 23) != 0) {
1226 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), gShellDebug1HiiHandle);
1227 }
1228
1229 if (BIT (Chara, 24) != 0) {
1230 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), gShellDebug1HiiHandle);
1231 }
1232
1233 if (BIT (Chara, 25) != 0) {
1234 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), gShellDebug1HiiHandle);
1235 }
1236
1237 if (BIT (Chara, 26) != 0) {
1238 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), gShellDebug1HiiHandle);
1239 }
1240
1241 if (BIT (Chara, 27) != 0) {
1242 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), gShellDebug1HiiHandle);
1243 }
1244
1245 if (BIT (Chara, 28) != 0) {
1246 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), gShellDebug1HiiHandle);
1247 }
1248
1249 if (BIT (Chara, 29) != 0) {
1250 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), gShellDebug1HiiHandle);
1251 }
1252
1253 if (BIT (Chara, 30) != 0) {
1254 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), gShellDebug1HiiHandle);
1255 }
1256
1257 if (BIT (Chara, 31) != 0) {
1258 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), gShellDebug1HiiHandle);
1259 }
1260 //
1261 // Just print the Reserved
1262 //
1263 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), gShellDebug1HiiHandle);
1264 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), gShellDebug1HiiHandle);
1265 }
1266
1267 /**
1268 Display Bios Characteristice extensions1 information.
1269
1270 @param[in] Byte1 The information.
1271 @param[in] Option The optional information.
1272 **/
1273 VOID
DisplayBiosCharacteristicsExt1(IN UINT8 Byte1,IN UINT8 Option)1274 DisplayBiosCharacteristicsExt1 (
1275 IN UINT8 Byte1,
1276 IN UINT8 Option
1277 )
1278 {
1279 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), gShellDebug1HiiHandle);
1280 //
1281 // Print option
1282 //
1283 PRINT_INFO_OPTION (Byte1, Option);
1284
1285 //
1286 // check bit and print
1287 //
1288 if (BIT (Byte1, 0) != 0) {
1289 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), gShellDebug1HiiHandle);
1290 }
1291
1292 if (BIT (Byte1, 1) != 0) {
1293 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), gShellDebug1HiiHandle);
1294 }
1295
1296 if (BIT (Byte1, 2) != 0) {
1297 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), gShellDebug1HiiHandle);
1298 }
1299
1300 if (BIT (Byte1, 3) != 0) {
1301 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1302 }
1303
1304 if (BIT (Byte1, 4) != 0) {
1305 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1306 }
1307
1308 if (BIT (Byte1, 5) != 0) {
1309 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), gShellDebug1HiiHandle);
1310 }
1311
1312 if (BIT (Byte1, 6) != 0) {
1313 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1314 }
1315
1316 if (BIT (Byte1, 7) != 0) {
1317 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), gShellDebug1HiiHandle);
1318 }
1319 }
1320
1321 /**
1322 Display Bios Characteristice extensions2 information.
1323
1324 @param[in] byte2 The information.
1325 @param[in] Option The optional information.
1326 **/
1327 VOID
DisplayBiosCharacteristicsExt2(IN UINT8 byte2,IN UINT8 Option)1328 DisplayBiosCharacteristicsExt2 (
1329 IN UINT8 byte2,
1330 IN UINT8 Option
1331 )
1332 {
1333 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), gShellDebug1HiiHandle);
1334 //
1335 // Print option
1336 //
1337 PRINT_INFO_OPTION (byte2, Option);
1338
1339 if (BIT (byte2, 0) != 0) {
1340 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_BOOT_SPEC_SUPP), gShellDebug1HiiHandle);
1341 }
1342
1343 if (BIT (byte2, 1) != 0) {
1344 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FUNCTION_KEY_INIT), gShellDebug1HiiHandle);
1345 }
1346
1347 if (AE_SMBIOS_VERSION (0x2, 0x4)) {
1348 if (BIT (byte2, 2) != 0) {
1349 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLE_TAR_CONT_DIST), gShellDebug1HiiHandle);
1350 }
1351 if (AE_SMBIOS_VERSION (0x2, 0x7)) {
1352 if (BIT (byte2, 3) != 0) {
1353 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UEFI_SPEC_SUPPORT), gShellDebug1HiiHandle);
1354 }
1355 if (BIT (byte2, 4) != 0) {
1356 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VIRTUAL_MACHINE), gShellDebug1HiiHandle);
1357 }
1358 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 5);
1359 } else {
1360 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 3);
1361 }
1362 } else {
1363 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 2);
1364 }
1365 }
1366
1367 /**
1368 Display Processor Information (Type 4) information.
1369
1370 @param[in] Family The family value.
1371 @param[in] Option The option value.
1372 **/
1373 VOID
DisplayProcessorFamily(UINT8 Family,UINT8 Option)1374 DisplayProcessorFamily (
1375 UINT8 Family,
1376 UINT8 Option
1377 )
1378 {
1379 //
1380 // Print prompt message
1381 //
1382 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gShellDebug1HiiHandle);
1383 //
1384 // Print option
1385 //
1386 PRINT_INFO_OPTION (Family, Option);
1387
1388 //
1389 // Use switch to check
1390 //
1391 switch (Family) {
1392 case 0x01:
1393 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER), gShellDebug1HiiHandle);
1394 break;
1395
1396 case 0x02:
1397 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
1398 break;
1399
1400 case 0x03:
1401 Print (L"8086\n");
1402 break;
1403
1404 case 0x04:
1405 Print (L"80286\n");
1406 break;
1407
1408 case 0x05:
1409 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL386_PROCESSOR), gShellDebug1HiiHandle);
1410 break;
1411
1412 case 0x06:
1413 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL486_PROCESSOR), gShellDebug1HiiHandle);
1414 break;
1415
1416 case 0x07:
1417 Print (L"8087\n");
1418 break;
1419
1420 case 0x08:
1421 Print (L"80287\n");
1422 break;
1423
1424 case 0x09:
1425 Print (L"80387\n");
1426 break;
1427
1428 case 0x0A:
1429 Print (L"80487\n");
1430 break;
1431
1432 case 0x0B:
1433 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_FAMILY), gShellDebug1HiiHandle);
1434 break;
1435
1436 case 0x0C:
1437 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PRO_PROC), gShellDebug1HiiHandle);
1438 break;
1439
1440 case 0x0D:
1441 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_II_PROC), gShellDebug1HiiHandle);
1442 break;
1443
1444 case 0x0E:
1445 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_MMX), gShellDebug1HiiHandle);
1446 break;
1447
1448 case 0x0F:
1449 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CELERON_PROC), gShellDebug1HiiHandle);
1450 break;
1451
1452 case 0x10:
1453 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_XEON_PROC), gShellDebug1HiiHandle);
1454 break;
1455
1456 case 0x11:
1457 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_PROC), gShellDebug1HiiHandle);
1458 break;
1459
1460 case 0x12:
1461 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_M1_FAMILY), gShellDebug1HiiHandle);
1462 break;
1463
1464 case 0x13:
1465 Print (L"M2 Family\n");
1466 break;
1467
1468 case 0x14:
1469 Print (L"Intel Celeron M\n");
1470 break;
1471
1472 case 0x15:
1473 Print (L"Intel Pentium 4 HT\n");
1474 break;
1475
1476 case 0x18:
1477 Print (L"AMD Duron\n");
1478 break;
1479
1480 case 0x19:
1481 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_K5_FAMILY), gShellDebug1HiiHandle);
1482 break;
1483
1484 case 0x1A:
1485 Print (L"K6 Family\n");
1486 break;
1487
1488 case 0x1B:
1489 Print (L"K6-2\n");
1490 break;
1491
1492 case 0x1C:
1493 Print (L"K6-3\n");
1494 break;
1495
1496 case 0x1D:
1497 Print (L"AMD Althon Processor Family\n");
1498 break;
1499
1500 case 0x1E:
1501 Print (L"AMD 29000 Family\n");
1502 break;
1503
1504 case 0x1F:
1505 Print (L"K6-2+\n");
1506 break;
1507
1508 case 0x20:
1509 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_FAMILY), gShellDebug1HiiHandle);
1510 break;
1511
1512 case 0x21:
1513 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_601), gShellDebug1HiiHandle);
1514 break;
1515
1516 case 0x22:
1517 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603), gShellDebug1HiiHandle);
1518 break;
1519
1520 case 0x23:
1521 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603_PLUS), gShellDebug1HiiHandle);
1522 break;
1523
1524 case 0x24:
1525 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_604), gShellDebug1HiiHandle);
1526 break;
1527
1528 case 0x25:
1529 Print (L"Power PC 620\n");
1530 break;
1531
1532 case 0x26:
1533 Print (L"Power PC 704\n");
1534 break;
1535
1536 case 0x27:
1537 Print (L"Power PC 750\n");
1538 break;
1539
1540 case 0x28:
1541 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_DUO), gShellDebug1HiiHandle);
1542 break;
1543
1544 case 0x29:
1545 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_DUO_MOBILE), gShellDebug1HiiHandle);
1546 break;
1547
1548 case 0x2A:
1549 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_SOLO_MOBILE), gShellDebug1HiiHandle);
1550 break;
1551
1552 case 0x2B:
1553 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_ATOM), gShellDebug1HiiHandle);
1554 break;
1555
1556 case 0x30:
1557 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ALPHA_FAMILY_2), gShellDebug1HiiHandle);
1558 break;
1559
1560 case 0x31:
1561 Print (L"Alpha 21064\n");
1562 break;
1563
1564 case 0x32:
1565 Print (L"Alpha 21066\n");
1566 break;
1567
1568 case 0x33:
1569 Print (L"Alpha 21164\n");
1570 break;
1571
1572 case 0x34:
1573 Print (L"Alpha 21164PC\n");
1574 break;
1575
1576 case 0x35:
1577 Print (L"Alpha 21164a\n");
1578 break;
1579
1580 case 0x36:
1581 Print (L"Alpha 21264\n");
1582 break;
1583
1584 case 0x37:
1585 Print (L"Alpha 21364\n");
1586 break;
1587
1588 case 0x38:
1589 Print (L"AMD Turion II Ultra Dual-Core Mobile M Processor Family\n");
1590 break;
1591
1592 case 0x39:
1593 Print (L"AMD Turion II Dual-Core Mobile M Processor Family\n");
1594 break;
1595
1596 case 0x3A:
1597 Print (L"AMD Althon II Dual-Core M Processor Family\n");
1598 break;
1599
1600 case 0x3B:
1601 Print (L"AMD Opteron 6100 Series Processor\n");
1602 break;
1603
1604 case 0x3C:
1605 Print (L"AMD Opteron 4100 Series Processor\n");
1606 break;
1607
1608 case 0x3D:
1609 Print (L"AMD Opteron 6200 Series Processor\n");
1610 break;
1611
1612 case 0x3E:
1613 Print (L"AMD Opteron 4200 Series Processor\n");
1614 break;
1615
1616 case 0x3F:
1617 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_FX_SERIES), gShellDebug1HiiHandle);
1618 break;
1619
1620 case 0x40:
1621 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MIPS_FAMILY), gShellDebug1HiiHandle);
1622 break;
1623
1624 case 0x41:
1625 Print (L"MIPS R4000\n");
1626 break;
1627
1628 case 0x42:
1629 Print (L"MIPS R4200\n");
1630 break;
1631
1632 case 0x43:
1633 Print (L"MIPS R4400\n");
1634 break;
1635
1636 case 0x44:
1637 Print (L"MIPS R4600\n");
1638 break;
1639
1640 case 0x45:
1641 Print (L"MIPS R10000\n");
1642 break;
1643
1644 case 0x46:
1645 Print (L"AMD C-Series Processor\n");
1646 break;
1647
1648 case 0x47:
1649 Print (L"AMD E-Series Processor\n");
1650 break;
1651
1652 case 0x48:
1653 Print (L"AMD A-Series Processor\n");
1654 break;
1655
1656 case 0x49:
1657 Print (L"AMD G-Series Processor\n");
1658 break;
1659
1660 case 0x4A:
1661 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_Z_SERIES), gShellDebug1HiiHandle);
1662 break;
1663
1664 case 0x4B:
1665 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_R_SERIES), gShellDebug1HiiHandle);
1666 break;
1667
1668 case 0x4C:
1669 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_4300_SERIES), gShellDebug1HiiHandle);
1670 break;
1671
1672 case 0x4D:
1673 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_6300_SERIES), gShellDebug1HiiHandle);
1674 break;
1675
1676 case 0x4E:
1677 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_3300_SERIES), gShellDebug1HiiHandle);
1678 break;
1679
1680 case 0x4F:
1681 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_FIREPRO_SERIES), gShellDebug1HiiHandle);
1682 break;
1683
1684 case 0x50:
1685 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SPARC_FAMILY), gShellDebug1HiiHandle);
1686 break;
1687
1688 case 0x51:
1689 Print (L"SuperSparc\n");
1690 break;
1691
1692 case 0x52:
1693 Print (L"microSparc II\n");
1694 break;
1695
1696 case 0x53:
1697 Print (L"microSparc IIep\n");
1698 break;
1699
1700 case 0x54:
1701 Print (L"UltraSparc\n");
1702 break;
1703
1704 case 0x55:
1705 Print (L"UltraSparc II\n");
1706 break;
1707
1708 case 0x56:
1709 Print (L"UltraSparcIIi\n");
1710 break;
1711
1712 case 0x57:
1713 Print (L"UltraSparcIII\n");
1714 break;
1715
1716 case 0x58:
1717 Print (L"UltraSparcIIIi\n");
1718 break;
1719
1720 case 0x60:
1721 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_68040_FAMILY), gShellDebug1HiiHandle);
1722 break;
1723
1724 case 0x61:
1725 Print (L"68xx\n");
1726 break;
1727
1728 case 0x62:
1729 Print (L"68000\n");
1730 break;
1731
1732 case 0x63:
1733 Print (L"68010\n");
1734 break;
1735
1736 case 0x64:
1737 Print (L"68020\n");
1738 break;
1739
1740 case 0x65:
1741 Print (L"68030\n");
1742 break;
1743
1744 case 0x70:
1745 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle);
1746 break;
1747
1748 case 0x78:
1749 Print (L"Crusoe TM5000\n");
1750 break;
1751
1752 case 0x79:
1753 Print (L"Crusoe TM3000\n");
1754 break;
1755
1756 case 0x7A:
1757 Print (L"Efficeon TM8000\n");
1758 break;
1759
1760 case 0x80:
1761 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WEITEK), gShellDebug1HiiHandle);
1762 break;
1763
1764 case 0x82:
1765 Print (L"Itanium\n");
1766 break;
1767
1768 case 0x83:
1769 Print (L"AMD Athlon64\n");
1770 break;
1771
1772 case 0x84:
1773 Print (L"AMD Opteron\n");
1774 break;
1775
1776 case 0x85:
1777 Print (L"AMD Sempron\n");
1778 break;
1779
1780 case 0x86:
1781 Print (L"AMD Turion64 Mobile\n");
1782 break;
1783
1784 case 0x87:
1785 Print (L"Dual-Core AMD Opteron\n");
1786 break;
1787
1788 case 0x88:
1789 Print (L"AMD Athlon 64X2 DualCore\n");
1790 break;
1791
1792 case 0x89:
1793 Print (L"AMD Turion 64X2 Mobile\n");
1794 break;
1795
1796 case 0x8A:
1797 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_QUAD_CORE), gShellDebug1HiiHandle);
1798 break;
1799
1800 case 0x8B:
1801 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_THIRD_GENERATION), gShellDebug1HiiHandle);
1802 break;
1803
1804 case 0x8C:
1805 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_FX_QUAD_CORE), gShellDebug1HiiHandle);
1806 break;
1807
1808 case 0x8D:
1809 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_X4_QUAD_CORE), gShellDebug1HiiHandle);
1810 break;
1811
1812 case 0x8E:
1813 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_X2_DUAL_CORE), gShellDebug1HiiHandle);
1814 break;
1815
1816 case 0x8F:
1817 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_ATHLON_X2_DUAL_CORE), gShellDebug1HiiHandle);
1818 break;
1819
1820 case 0x90:
1821 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PA_RISC_FAMILY), gShellDebug1HiiHandle);
1822 break;
1823
1824 case 0x91:
1825 Print (L"PA-RISC 8500\n");
1826 break;
1827
1828 case 0x92:
1829 Print (L"PA-RISC 8000\n");
1830 break;
1831
1832 case 0x93:
1833 Print (L"PA-RISC 7300LC\n");
1834 break;
1835
1836 case 0x94:
1837 Print (L"PA-RISC 7200\n");
1838 break;
1839
1840 case 0x95:
1841 Print (L"PA-RISC 7100LC\n");
1842 break;
1843
1844 case 0x96:
1845 Print (L"PA-RISC 7100\n");
1846 break;
1847
1848 case 0xA0:
1849 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_V30_FAMILY), gShellDebug1HiiHandle);
1850 break;
1851
1852 case 0xA1:
1853 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3200_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1854 break;
1855
1856 case 0xA2:
1857 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3000_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1858 break;
1859
1860 case 0xA3:
1861 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5300_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1862 break;
1863
1864 case 0xA4:
1865 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5100_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1866 break;
1867
1868 case 0xA5:
1869 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5000_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1870 break;
1871
1872 case 0xA6:
1873 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_LV_DUAL_CORE), gShellDebug1HiiHandle);
1874 break;
1875
1876 case 0xA7:
1877 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_ULV_DUAL_CORE), gShellDebug1HiiHandle);
1878 break;
1879
1880 case 0xA8:
1881 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7100_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1882 break;
1883
1884 case 0xA9:
1885 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5400_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1886 break;
1887
1888 case 0xAA:
1889 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_QUAD_CORE), gShellDebug1HiiHandle);
1890 break;
1891
1892 case 0xAB:
1893 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5200_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1894 break;
1895
1896 case 0xAC:
1897 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7200_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1898 break;
1899
1900 case 0xAD:
1901 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7300_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1902 break;
1903
1904 case 0xAE:
1905 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7400_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1906 break;
1907
1908 case 0xAF:
1909 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7400_SERIES_MULTI_CORE), gShellDebug1HiiHandle);
1910 break;
1911
1912 case 0xB0:
1913 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_XEON), gShellDebug1HiiHandle);
1914 break;
1915
1916 case 0xB1:
1917 Print (L"Pentium III Processorwith Intel SpeedStep Technology\n");
1918 break;
1919
1920 case 0xB2:
1921 Print (L"Pentium 4 processor\n");
1922 break;
1923
1924 case 0xB3:
1925 Print (L"Intel Xeon Processor\n");
1926 break;
1927
1928 case 0xB4:
1929 Print (L"AS400 Family\n");
1930 break;
1931
1932 case 0xB5:
1933 Print (L"Intel Xeon processor MP\n");
1934 break;
1935
1936 case 0xB6:
1937 Print (L"AMD Althon XP Processor Family\n");
1938 break;
1939
1940 case 0xB7:
1941 Print (L"AMD Althon MP Promcessor Family\n");
1942 break;
1943
1944 case 0xB8:
1945 Print (L"Intel Itanium 2 processor\n");
1946 break;
1947
1948 case 0xB9:
1949 Print (L"Intel Penium M processor\n");
1950 break;
1951
1952 case 0xBA:
1953 Print (L"Intel Celeron D processor\n");
1954 break;
1955
1956 case 0xBB:
1957 Print (L"Intel Pentium D processor\n");
1958 break;
1959
1960 case 0xBC:
1961 Print (L"Intel Pentium Processor Extreme Edition\n");
1962 break;
1963
1964 case 0xBD:
1965 Print (L"Intel Core Solo Processor\n");
1966 break;
1967
1968 case 0xBF:
1969 Print (L"Intel Core 2 Duo Processor\n");
1970 break;
1971
1972 case 0xC0:
1973 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_SOLO), gShellDebug1HiiHandle);
1974 break;
1975
1976 case 0xC1:
1977 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_EXTREME), gShellDebug1HiiHandle);
1978 break;
1979
1980 case 0xC2:
1981 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_QUAD), gShellDebug1HiiHandle);
1982 break;
1983
1984 case 0xC3:
1985 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_EXTREME), gShellDebug1HiiHandle);
1986 break;
1987
1988 case 0xC4:
1989 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_DUO_MOBILE), gShellDebug1HiiHandle);
1990 break;
1991
1992 case 0xC5:
1993 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_SOLO_MOBILE), gShellDebug1HiiHandle);
1994 break;
1995
1996 case 0xC6:
1997 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_I7), gShellDebug1HiiHandle);
1998 break;
1999
2000 case 0xC7:
2001 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CELERON_DUAL_CORE), gShellDebug1HiiHandle);
2002 break;
2003
2004 case 0xC8:
2005 Print (L"IBM 390\n");
2006 break;
2007
2008 case 0xC9:
2009 Print (L"G4\n");
2010 break;
2011
2012 case 0xCA:
2013 Print (L"G5\n");
2014 break;
2015
2016 case 0xCB:
2017 Print (L"G6\n");
2018 break;
2019
2020 case 0xCC:
2021 Print (L"zArchitecture\n");
2022 break;
2023
2024 case 0xCD:
2025 Print (L"Intel Core i5 processor\n");
2026 break;
2027
2028 case 0xCE:
2029 Print (L"Intel Core i3 processor\n");
2030 break;
2031
2032 case 0xD2:
2033 Print (L"ViaC7M\n");
2034 break;
2035
2036 case 0xD3:
2037 Print (L"ViaC7D\n");
2038 break;
2039
2040 case 0xD4:
2041 Print (L"ViaC7\n");
2042 break;
2043
2044 case 0xD5:
2045 Print (L"Eden\n");
2046 break;
2047
2048 case 0xD6:
2049 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_MULTI_CORE), gShellDebug1HiiHandle);
2050 break;
2051
2052 case 0xD7:
2053 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2054 break;
2055
2056 case 0xD8:
2057 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2058 break;
2059
2060 case 0xDA:
2061 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2062 break;
2063
2064 case 0xDB:
2065 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2066 break;
2067
2068 case 0xDD:
2069 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2070 break;
2071
2072 case 0xDE:
2073 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2074 break;
2075
2076 case 0xDF:
2077 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_MULTI_CORE), gShellDebug1HiiHandle);
2078 break;
2079
2080 case 0xE0:
2081 Print (L"Multi-Core Intel Xeon processor 3400 Series\n");
2082 break;
2083
2084 case 0xE4:
2085 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_3000_SERIES), gShellDebug1HiiHandle);
2086 break;
2087
2088 case 0xE5:
2089 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_SEMPRON_II), gShellDebug1HiiHandle);
2090 break;
2091
2092
2093 case 0xE6:
2094 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_EMBEDDED_OPTERON_QUAD_CORE), gShellDebug1HiiHandle);
2095 break;
2096
2097 case 0xE7:
2098 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_TRIPLE_CORE), gShellDebug1HiiHandle);
2099 break;
2100
2101 case 0xE8:
2102 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_TURION_ULTRA_DUAL_CORE_MOBILE), gShellDebug1HiiHandle);
2103 break;
2104
2105 case 0xE9:
2106 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_TURION_DUAL_CORE_MOBILE), gShellDebug1HiiHandle);
2107 break;
2108
2109 case 0xEA:
2110 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_ATHLON_DUAL_CORE), gShellDebug1HiiHandle);
2111 break;
2112
2113 case 0xEB:
2114 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_SEMPRON_SI), gShellDebug1HiiHandle);
2115 break;
2116
2117 case 0xEC:
2118 Print (L"AMD Phenom II Processor Family\n");
2119 break;
2120
2121 case 0xED:
2122 Print (L"AMD Althon II Processor Family\n");
2123 break;
2124
2125 case 0xEE:
2126 Print (L"Six-Core AMD Opteron Processor Family\n");
2127 break;
2128
2129 case 0xEF:
2130 Print (L"AMD Sempron M Processor Family\n");
2131 break;
2132
2133 case 0xFA:
2134 Print (L"i860\n");
2135 break;
2136
2137 case 0xFB:
2138 Print (L"i960\n");
2139 break;
2140
2141 default:
2142 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gShellDebug1HiiHandle);
2143 }
2144 //
2145 // end switch
2146 //
2147 }
2148
2149 /**
2150 Display processor family information.
2151
2152 @param[in] Family2 The family value.
2153 @param[in] Option The option value.
2154 **/
2155 VOID
DisplayProcessorFamily2(IN UINT16 Family2,IN UINT8 Option)2156 DisplayProcessorFamily2 (
2157 IN UINT16 Family2,
2158 IN UINT8 Option
2159 )
2160 {
2161 //
2162 // Print prompt message
2163 //
2164 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gShellDebug1HiiHandle);
2165
2166 //
2167 // Print option
2168 //
2169 PRINT_INFO_OPTION (Family2, Option);
2170
2171 //
2172 // Use switch to check
2173 //
2174 switch (Family2) {
2175 case 0x104:
2176 Print (L"SH-3\n");
2177 break;
2178
2179 case 0x105:
2180 Print (L"SH-4\n");
2181 break;
2182
2183 case 0x118:
2184 Print (L"ARM\n");
2185 break;
2186
2187 case 0x119:
2188 Print (L"StrongARM\n");
2189 break;
2190
2191 case 0x12C:
2192 Print (L"6x86\n");
2193 break;
2194
2195 case 0x12D:
2196 Print (L"MediaGX\n");
2197 break;
2198
2199 case 0x12E:
2200 Print (L"MII\n");
2201 break;
2202
2203 case 0x140:
2204 Print (L"WinChip\n");
2205 break;
2206
2207 case 0x15E:
2208 Print (L"DSP\n");
2209 break;
2210
2211 case 0x1F4:
2212 Print (L"Video Processor\n");
2213 break;
2214
2215 default:
2216 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gShellDebug1HiiHandle);
2217 }
2218
2219 }
2220
2221 /**
2222 Display processor voltage information.
2223
2224 @param[in] Voltage The Voltage.
2225 Bit 7 Set to 0, indicating 'legacy' mode for processor voltage
2226 Bits 6:4 Reserved, must be zero
2227 Bits 3:0 Voltage Capability.
2228 A Set bit indicates that the voltage is supported.
2229 Bit 0 - 5V
2230 Bit 1 - 3.3V
2231 Bit 2 - 2.9V
2232 Bit 3 - Reserved, must be zero.
2233
2234 Note:
2235 Setting of multiple bits indicates the socket is configurable
2236 If bit 7 is set to 1, the remaining seven bits of the field are set to
2237 contain the processor's current voltage times 10.
2238 For example, the field value for a processor voltage of 1.8 volts would be
2239 92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.
2240
2241 @param[in] Option The option.
2242 **/
2243 VOID
DisplayProcessorVoltage(IN UINT8 Voltage,IN UINT8 Option)2244 DisplayProcessorVoltage (
2245 IN UINT8 Voltage,
2246 IN UINT8 Option
2247 )
2248 {
2249 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), gShellDebug1HiiHandle);
2250 //
2251 // Print option
2252 //
2253 PRINT_INFO_OPTION (Voltage, Option);
2254
2255 if (BIT (Voltage, 7) != 0) {
2256 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_CURRENT_VOLTAGE), gShellDebug1HiiHandle, (Voltage - 0x80));
2257 } else {
2258 if (BIT (Voltage, 0) != 0) {
2259 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_5V_SUPOPRTED), gShellDebug1HiiHandle);
2260 }
2261
2262 if (BIT (Voltage, 1) != 0) {
2263 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_33V_SUPPORTED), gShellDebug1HiiHandle);
2264 }
2265
2266 if (BIT (Voltage, 2) != 0) {
2267 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_29V_SUPPORTED), gShellDebug1HiiHandle);
2268 }
2269 //
2270 // check the reserved zero bits:
2271 //
2272 if (BIT (Voltage, 3) != 0) {
2273 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), gShellDebug1HiiHandle);
2274 }
2275
2276 if (BIT (Voltage, 4) != 0) {
2277 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2278 }
2279
2280 if (BIT (Voltage, 5) != 0) {
2281 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), gShellDebug1HiiHandle);
2282 }
2283
2284 if (BIT (Voltage, 6) != 0) {
2285 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT6_NOT_ZERO), gShellDebug1HiiHandle);
2286 }
2287 }
2288 }
2289
2290 /**
2291 Display processor information.
2292
2293 @param[in] Status The status.
2294 Bit 7 Reserved, must be 0
2295 Bit 6 CPU Socket Populated
2296 1 - CPU Socket Populated
2297 0 - CPU Socket Unpopulated
2298 Bits 5:3 Reserved, must be zero
2299 Bits 2:0 CPU Status
2300 0h - Unknown
2301 1h - CPU Enabled
2302 2h - CPU Disabled by User via BIOS Setup
2303 3h - CPU Disabled By BIOS (POST Error)
2304 4h - CPU is Idle, waiting to be enabled.
2305 5-6h - Reserved
2306 7h - Other
2307
2308 @param[in] Option The option
2309 **/
2310 VOID
DisplayProcessorStatus(IN UINT8 Status,IN UINT8 Option)2311 DisplayProcessorStatus (
2312 IN UINT8 Status,
2313 IN UINT8 Option
2314 )
2315 {
2316 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), gShellDebug1HiiHandle);
2317 PRINT_INFO_OPTION (Status, Option);
2318
2319 if (BIT (Status, 7) != 0) {
2320 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT7_NOT_ZERO), gShellDebug1HiiHandle);
2321 } else if (BIT (Status, 5) != 0) {
2322 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), gShellDebug1HiiHandle);
2323 } else if (BIT (Status, 4) != 0) {
2324 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2325 } else if (BIT (Status, 3) != 0) {
2326 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), gShellDebug1HiiHandle);
2327 }
2328 //
2329 // Check BIT 6
2330 //
2331 if (BIT (Status, 6) != 0) {
2332 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_POPULATED), gShellDebug1HiiHandle);
2333 } else {
2334 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED), gShellDebug1HiiHandle);
2335 }
2336 //
2337 // Check BITs 2:0
2338 //
2339 switch (Status & 0x07) {
2340 case 0:
2341 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2342 break;
2343
2344 case 1:
2345 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_ENABLED), gShellDebug1HiiHandle);
2346 break;
2347
2348 case 2:
2349 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DISABLED_BY_USER), gShellDebug1HiiHandle);
2350 break;
2351
2352 case 3:
2353 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DIABLED_BY_BIOS), gShellDebug1HiiHandle);
2354 break;
2355
2356 case 4:
2357 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_IDLE), gShellDebug1HiiHandle);
2358 break;
2359
2360 case 7:
2361 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHERS), gShellDebug1HiiHandle);
2362 break;
2363
2364 default:
2365 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2366 }
2367 }
2368
2369 /**
2370 Display information about Memory Controller Information (Type 5).
2371
2372 @param[in] Size Memory size.
2373 @param[in] SlotNum Which slot is this about.
2374 @param[in] Option Option for the level of detail output required.
2375 **/
2376 VOID
DisplayMaxMemoryModuleSize(IN UINT8 Size,IN UINT8 SlotNum,IN UINT8 Option)2377 DisplayMaxMemoryModuleSize (
2378 IN UINT8 Size,
2379 IN UINT8 SlotNum,
2380 IN UINT8 Option
2381 )
2382 {
2383 UINTN MaxSize;
2384 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE_LARGEST_MEM), gShellDebug1HiiHandle);
2385 //
2386 // MaxSize is determined by follow formula
2387 //
2388 MaxSize = (UINTN) 1 << Size;
2389 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gShellDebug1HiiHandle, MaxSize);
2390
2391 if (Option >= SHOW_DETAIL) {
2392 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_AMOUNT_MEM), gShellDebug1HiiHandle);
2393 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gShellDebug1HiiHandle, MaxSize, SlotNum, MaxSize * SlotNum);
2394 }
2395 }
2396
2397 /**
2398 Display information about memory configuration handles.
2399
2400 @param[in] Handles The buffer of handles to output info on.
2401 @param[in] SlotNum The number of handles in the above buffer.
2402 @param[in] Option Option for the level of detail output required.
2403 **/
2404 VOID
DisplayMemoryModuleConfigHandles(IN UINT16 * Handles,IN UINT8 SlotNum,IN UINT8 Option)2405 DisplayMemoryModuleConfigHandles (
2406 IN UINT16 *Handles,
2407 IN UINT8 SlotNum,
2408 IN UINT8 Option
2409 )
2410 {
2411 UINT8 Index;
2412 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_CONTROLLED), gShellDebug1HiiHandle, SlotNum);
2413
2414 if (Option >= SHOW_DETAIL) {
2415 //
2416 // No handle, Handles is INVALID.
2417 //
2418 if (SlotNum == 0) {
2419 return ;
2420 }
2421
2422 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_LIST_CONTROLLED), gShellDebug1HiiHandle);
2423 for (Index = 0; Index < SlotNum; Index++) {
2424 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLE), gShellDebug1HiiHandle, Index + 1, Handles[Index]);
2425 }
2426 }
2427 }
2428
2429 /**
2430 Display Memory Module Information (Type 6).
2431
2432 @param[in] BankConnections
2433 @param[in] Option
2434 **/
2435 VOID
DisplayMmBankConnections(IN UINT8 BankConnections,IN UINT8 Option)2436 DisplayMmBankConnections (
2437 IN UINT8 BankConnections,
2438 IN UINT8 Option
2439 )
2440 {
2441 UINT8 High;
2442 UINT8 Low;
2443
2444 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_CONNECTIONS), gShellDebug1HiiHandle);
2445 //
2446 // Print option
2447 //
2448 PRINT_INFO_OPTION (BankConnections, Option);
2449
2450 //
2451 // Divide it to high and low
2452 //
2453 High = (UINT8) (BankConnections & 0xF0);
2454 Low = (UINT8) (BankConnections & 0x0F);
2455 if (High != 0xF) {
2456 if (Low != 0xF) {
2457 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS), gShellDebug1HiiHandle, High, Low, High, Low);
2458 } else {
2459 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gShellDebug1HiiHandle, High, High);
2460 }
2461 } else {
2462 if (Low != 0xF) {
2463 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gShellDebug1HiiHandle, Low, Low);
2464 } else {
2465 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BANKS_CONNECTED), gShellDebug1HiiHandle);
2466 }
2467 }
2468 }
2469
2470 /**
2471 Display memory informcation.
2472
2473 Bits 0:6 Size (n),
2474 where 2**n is the size in MB with three special-case values:
2475 7Dh Not determinable (Installed Size only)
2476 7Eh Module is installed, but no memory has been enabled
2477 7Fh Not installed
2478 Bit 7 Defines whether the memory module has a single- (0)
2479 or double-bank (1) connection.
2480
2481 @param[in] Size - The size
2482 @param[in] Option - The option
2483 **/
2484 VOID
DisplayMmMemorySize(IN UINT8 Size,IN UINT8 Option)2485 DisplayMmMemorySize (
2486 IN UINT8 Size,
2487 IN UINT8 Option
2488 )
2489 {
2490 UINT8 Value;
2491 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), gShellDebug1HiiHandle);
2492 //
2493 // Print option
2494 //
2495 PRINT_INFO_OPTION (Size, Option);
2496
2497 //
2498 // Get the low bits(0-6 bit)
2499 //
2500 Value = (UINT8) (Size & 0x7F);
2501 if (Value == 0x7D) {
2502 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE_NOT_DETERMINABLE), gShellDebug1HiiHandle);
2503 } else if (Value == 0x7E) {
2504 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MODULE_INSTALLED), gShellDebug1HiiHandle);
2505 } else if (Value == 0x7F) {
2506 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_INSTALLED), gShellDebug1HiiHandle);
2507 } else {
2508 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE), gShellDebug1HiiHandle, 1 << Value);
2509 }
2510
2511 if (BIT (Size, 7) != 0) {
2512 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK), gShellDebug1HiiHandle);
2513 } else {
2514 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK), gShellDebug1HiiHandle);
2515 }
2516 }
2517
2518 /**
2519 Display Cache Configuration.
2520
2521 @param[in] CacheConfiguration Cache Configuration.
2522 Bits 15:10 Reserved, must be 0
2523 Bits 9:8 Operational Mode
2524 0h - Write Through
2525 1h - Write Back
2526 2h - Varies with Memory Address
2527 3h - Unknown
2528 Bit 7 Enabled/Disabled
2529 1 - Enabled
2530 0 - Disabled
2531 Bits 6:5 Location
2532 0h - Internal
2533 1h - External
2534 2h - Reserved
2535 3h - Unknown
2536 Bit 4 Reserved, must be zero
2537 Bit 3 Cache Socketed
2538 1 - Socketed
2539 0 - Unsocketed
2540 Bits 2:0 Cache Level
2541 1 through 8 (For example, an L1 cache would
2542 use value 000b and an L3 cache would use 010b.)
2543
2544 @param[in] Option The option
2545 **/
2546 VOID
DisplayCacheConfiguration(IN UINT16 CacheConfiguration,IN UINT8 Option)2547 DisplayCacheConfiguration (
2548 IN UINT16 CacheConfiguration,
2549 IN UINT8 Option
2550 )
2551 {
2552 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_CONFIGURATION), gShellDebug1HiiHandle);
2553 PRINT_INFO_OPTION (CacheConfiguration, Option);
2554
2555 if (BIT (CacheConfiguration, 15) != 0) {
2556 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT15_NOT_ZERO), gShellDebug1HiiHandle);
2557 } else if (BIT (CacheConfiguration, 14) != 0) {
2558 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT14_NOT_ZERO), gShellDebug1HiiHandle);
2559 } else if (BIT (CacheConfiguration, 13) != 0) {
2560 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT13_NOT_ZERO), gShellDebug1HiiHandle);
2561 } else if (BIT (CacheConfiguration, 12) != 0) {
2562 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT12_NOT_ZERO), gShellDebug1HiiHandle);
2563 } else if (BIT (CacheConfiguration, 11) != 0) {
2564 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT11_NOT_ZERO), gShellDebug1HiiHandle);
2565 } else if (BIT (CacheConfiguration, 10) != 0) {
2566 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT10_NOT_ZERO), gShellDebug1HiiHandle);
2567 } else if (BIT (CacheConfiguration, 4) != 0) {
2568 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2569 }
2570
2571 //
2572 // Check BITs 9:8
2573 //
2574 switch ((CacheConfiguration & 0x300) >> 8) {
2575 case 0:
2576 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_WRITE_THROUGH), gShellDebug1HiiHandle);
2577 break;
2578
2579 case 1:
2580 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_WRITE_BACK), gShellDebug1HiiHandle);
2581 break;
2582
2583 case 2:
2584 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_VARIES_WITH_MEM_ADDR), gShellDebug1HiiHandle);
2585 break;
2586
2587 case 3:
2588 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2589 break;
2590 }
2591
2592 //
2593 // Check BIT 7
2594 //
2595 if (BIT (CacheConfiguration, 7) != 0) {
2596 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);
2597 } else {
2598 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
2599 }
2600
2601 //
2602 // Check BITs 6:5
2603 //
2604 switch ((CacheConfiguration & 0x60) >> 5) {
2605 case 0:
2606 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_INTERNAL), gShellDebug1HiiHandle);
2607 break;
2608
2609 case 1:
2610 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_EXTERNAL), gShellDebug1HiiHandle);
2611 break;
2612
2613 case 2:
2614 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2615 break;
2616
2617 case 3:
2618 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2619 break;
2620 }
2621
2622 //
2623 // Check BIT 3
2624 //
2625 if (BIT (CacheConfiguration, 3) != 0) {
2626 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_SOCKETED), gShellDebug1HiiHandle);
2627 } else {
2628 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_NOT_SOCKETED), gShellDebug1HiiHandle);
2629 }
2630
2631
2632 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_LEVEL), gShellDebug1HiiHandle, (CacheConfiguration & 0x07) + 1);
2633 }
2634
2635 /**
2636 The Slot ID field of the System Slot structure provides a mechanism to
2637 correlate the physical attributes of the slot to its logical access method
2638 (which varies based on the Slot Type field).
2639
2640 @param[in] SlotId - The slot ID
2641 @param[in] SlotType - The slot type
2642 @param[in] Option - The Option
2643 **/
2644 VOID
DisplaySystemSlotId(IN UINT16 SlotId,IN UINT8 SlotType,IN UINT8 Option)2645 DisplaySystemSlotId (
2646 IN UINT16 SlotId,
2647 IN UINT8 SlotType,
2648 IN UINT8 Option
2649 )
2650 {
2651 //
2652 // Display slot type first
2653 //
2654 DisplaySystemSlotType (SlotType, Option);
2655
2656 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);
2657 //
2658 // print option
2659 //
2660 PRINT_INFO_OPTION (SlotType, Option);
2661
2662 switch (SlotType) {
2663 //
2664 // Slot Type: MCA
2665 //
2666 case 0x04:
2667 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_MICRO_CHAN), gShellDebug1HiiHandle);
2668 if (SlotId > 0 && SlotId < 15) {
2669 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), gShellDebug1HiiHandle, SlotId);
2670 } else {
2671 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), gShellDebug1HiiHandle);
2672 }
2673 break;
2674
2675 //
2676 // EISA
2677 //
2678 case 0x05:
2679 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_EISA_NUM), gShellDebug1HiiHandle);
2680 if (SlotId > 0 && SlotId < 15) {
2681 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), gShellDebug1HiiHandle, SlotId);
2682 } else {
2683 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), gShellDebug1HiiHandle);
2684 }
2685 break;
2686
2687 //
2688 // Slot Type: PCI
2689 //
2690 case 0x06:
2691 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gShellDebug1HiiHandle, SlotId);
2692 break;
2693
2694 //
2695 // PCMCIA
2696 //
2697 case 0x07:
2698 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_IDENTIFIES_ADAPTER_NUM), gShellDebug1HiiHandle, SlotId);
2699 break;
2700
2701 //
2702 // Slot Type: PCI-E
2703 //
2704 case 0xA5:
2705 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gShellDebug1HiiHandle, SlotId);
2706 break;
2707
2708 default:
2709 if ((SlotType >= 0x0E && SlotType <= 0x12) || (SlotType >= 0xA6 && SlotType <= 0xB6)){
2710 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gShellDebug1HiiHandle, SlotId);
2711 } else {
2712 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_SLOT_ID), gShellDebug1HiiHandle);
2713 }
2714 }
2715 }
2716
2717 /**
2718 Display System Boot Information (Type 32) information.
2719
2720 @param[in] Parameter The parameter.
2721 @param[in] Option The options.
2722 **/
2723 VOID
DisplaySystemBootStatus(IN UINT8 Parameter,IN UINT8 Option)2724 DisplaySystemBootStatus (
2725 IN UINT8 Parameter,
2726 IN UINT8 Option
2727 )
2728 {
2729 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_BOOT_STATUS), gShellDebug1HiiHandle);
2730 //
2731 // Print option
2732 //
2733 PRINT_INFO_OPTION (Parameter, Option);
2734
2735 //
2736 // Check value and print
2737 //
2738 if (Parameter == 0) {
2739 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_ERRORS_DETECTED), gShellDebug1HiiHandle);
2740 } else if (Parameter == 1) {
2741 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BOOTABLE_MEDIA), gShellDebug1HiiHandle);
2742 } else if (Parameter == 2) {
2743 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NORMAL_OP_SYSTEM), gShellDebug1HiiHandle);
2744 } else if (Parameter == 3) {
2745 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FIRMWARE_DETECTED), gShellDebug1HiiHandle);
2746 } else if (Parameter == 4) {
2747 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM), gShellDebug1HiiHandle);
2748 } else if (Parameter == 5) {
2749 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USER_REQUESTED_BOOT), gShellDebug1HiiHandle);
2750 } else if (Parameter == 6) {
2751 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_SECURITY_VIOLATION), gShellDebug1HiiHandle);
2752 } else if (Parameter == 7) {
2753 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PREV_REQ_IMAGE), gShellDebug1HiiHandle);
2754 } else if (Parameter == 8) {
2755 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER), gShellDebug1HiiHandle);
2756 } else if (Parameter >= 9 && Parameter <= 127) {
2757 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FUTURE_ASSIGNMENT), gShellDebug1HiiHandle);
2758 } else if (Parameter >= 128 && Parameter <= 191) {
2759 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VENDOR_OEM_SPECIFIC), gShellDebug1HiiHandle);
2760 } else if (Parameter >= 192) {
2761 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRODUCT_SPEC_IMPLMENTATION), gShellDebug1HiiHandle);
2762 } else {
2763 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_VALUE), gShellDebug1HiiHandle);
2764 }
2765 }
2766
2767 /**
2768 Display Portable Battery (Type 22) information.
2769
2770 The date the cell pack was manufactured, in packed format:
2771 Bits 15:9 Year, biased by 1980, in the range 0 to 127.
2772 Bits 8:5 Month, in the range 1 to 12.
2773 Bits 4:0 Date, in the range 1 to 31.
2774 For example, 01 February 2000 would be identified as
2775 0010 1000 0100 0001b (0x2841).
2776
2777 @param[in] Date The date
2778 @param[in] Option The option
2779 **/
2780 VOID
DisplaySBDSManufactureDate(IN UINT16 Date,IN UINT8 Option)2781 DisplaySBDSManufactureDate (
2782 IN UINT16 Date,
2783 IN UINT8 Option
2784 )
2785 {
2786 UINTN Day;
2787 UINTN Month;
2788 UINTN Year;
2789
2790 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SBDS_MANUFACTURE_DATE), gShellDebug1HiiHandle);
2791 PRINT_INFO_OPTION (Date, Option);
2792 //
2793 // Print date
2794 //
2795 Day = Date & 0x001F;
2796 Month = (Date & 0x01E0) >> 5;
2797 Year = ((Date & 0xFE00) >> 9) + 1980;
2798 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONTH_DAY_YEAR), gShellDebug1HiiHandle, Day, Month, Year);
2799
2800 }
2801
2802 /**
2803 Display System Reset (Type 23) information.
2804
2805
2806 Identifies the system-reset capabilities for the system.
2807 Bits 7:6 Reserved for future assignment via this specification, set to 00b.
2808 Bit 5 System contains a watchdog timer, either True (1) or False (0).
2809 Bits 4:3 Boot Option on Limit.
2810 Identifies the system action to be taken when the Reset Limit is reached, one of:
2811 00b Reserved, do not use.
2812 01b Operating system
2813 10b System utilities
2814 11b Do not rebootBits
2815 2:1 Boot Option. Indicates the action to be taken following a watchdog reset, one of:
2816 00b Reserved, do not use.
2817 01b Operating system
2818 10b System utilities
2819 11b Do not reboot
2820 Bit 0 Status.
2821 1b The system reset is enabled by the user
2822 0b The system reset is not enabled by the user
2823
2824 @param[in] Reset Reset
2825 @param[in] Option The option
2826 **/
2827 VOID
DisplaySystemResetCapabilities(IN UINT8 Reset,IN UINT8 Option)2828 DisplaySystemResetCapabilities (
2829 IN UINT8 Reset,
2830 IN UINT8 Option
2831 )
2832 {
2833 UINTN Temp;
2834
2835 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_RESET_CAPABILITIES), gShellDebug1HiiHandle);
2836 PRINT_INFO_OPTION (Reset, Option);
2837
2838 //
2839 // Check reserved bits 7:6
2840 //
2841 if ((Reset & 0xC0) != 0) {
2842 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO), gShellDebug1HiiHandle);
2843 }
2844 //
2845 // Watch dog
2846 //
2847 if (BIT (Reset, 5) != 0) {
2848 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER_2), gShellDebug1HiiHandle);
2849 } else {
2850 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_NOT_CONTAIN_TIMER), gShellDebug1HiiHandle);
2851 }
2852 //
2853 // Boot Option on Limit
2854 //
2855 Temp = (Reset & 0x18) >> 3;
2856 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION_LIMIT), gShellDebug1HiiHandle);
2857 switch (Temp) {
2858 case 0:
2859 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2860 break;
2861
2862 case 1:
2863 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), gShellDebug1HiiHandle);
2864 break;
2865
2866 case 2:
2867 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), gShellDebug1HiiHandle);
2868 break;
2869
2870 case 3:
2871 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT_BITS), gShellDebug1HiiHandle);
2872 break;
2873 }
2874 //
2875 // Boot Option
2876 //
2877 Temp = (Reset & 0x06) >> 1;
2878 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION), gShellDebug1HiiHandle);
2879 switch (Temp) {
2880 case 0:
2881 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2882 break;
2883
2884 case 1:
2885 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), gShellDebug1HiiHandle);
2886 break;
2887
2888 case 2:
2889 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), gShellDebug1HiiHandle);
2890 break;
2891
2892 case 3:
2893 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT), gShellDebug1HiiHandle);
2894 break;
2895 }
2896 //
2897 // Reset enable flag
2898 //
2899 if ((Reset & 0x01) != 0) {
2900 Print (L"The system reset is enabled by the user\n");
2901 } else {
2902 Print (L"The system reset is disabled by the user\n");
2903 }
2904 }
2905
2906 /**
2907 Display Hardware Security (Type 24) information.
2908
2909
2910 Identifies the password and reset status for the system:
2911
2912 Bits 7:6 Power-on Password Status, one of:
2913 00b Disabled
2914 01b Enabled
2915 10b Not Implemented
2916 11b Unknown
2917 Bits 5:4 Keyboard Password Status, one of:
2918 00b Disabled
2919 01b Enabled
2920 10b Not Implemented
2921 11b Unknown
2922 Bits 3:2 Administrator Password Status, one of:
2923 00b Disabled
2924 01b Enabled
2925 10b Not Implemented
2926 11b Unknown
2927 Bits 1:0 Front Panel Reset Status, one of:
2928 00b Disabled
2929 01b Enabled
2930 10b Not Implemented
2931 11b Unknown
2932
2933 @param[in] Settings The device settings.
2934 @param[in] Option The device options.
2935 **/
2936 VOID
DisplayHardwareSecuritySettings(IN UINT8 Settings,IN UINT8 Option)2937 DisplayHardwareSecuritySettings (
2938 IN UINT8 Settings,
2939 IN UINT8 Option
2940 )
2941 {
2942 UINTN Temp;
2943
2944 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HARDWARE_SECURITY_SET), gShellDebug1HiiHandle);
2945 PRINT_INFO_OPTION (Settings, Option);
2946
2947 //
2948 // Power-on Password Status
2949 //
2950 Temp = (Settings & 0xC0) >> 6;
2951 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_ON_PASSWORD), gShellDebug1HiiHandle);
2952 switch (Temp) {
2953 case 0:
2954 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
2955 break;
2956
2957 case 1:
2958 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gShellDebug1HiiHandle);
2959 break;
2960
2961 case 2:
2962 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gShellDebug1HiiHandle);
2963 break;
2964
2965 case 3:
2966 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2967 break;
2968 }
2969 //
2970 // Keyboard Password Status
2971 //
2972 Temp = (Settings & 0x30) >> 4;
2973 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_PASSWORD), gShellDebug1HiiHandle);
2974 switch (Temp) {
2975 case 0:
2976 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
2977 break;
2978
2979 case 1:
2980 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gShellDebug1HiiHandle);
2981 break;
2982
2983 case 2:
2984 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gShellDebug1HiiHandle);
2985 break;
2986
2987 case 3:
2988 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2989 break;
2990 }
2991 //
2992 // Administrator Password Status
2993 //
2994 Temp = (Settings & 0x0C) >> 2;
2995 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ADMIN_PASSWORD_STATUS), gShellDebug1HiiHandle);
2996 switch (Temp) {
2997 case 0:
2998 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
2999 break;
3000
3001 case 1:
3002 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gShellDebug1HiiHandle);
3003 break;
3004
3005 case 2:
3006 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gShellDebug1HiiHandle);
3007 break;
3008
3009 case 3:
3010 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
3011 break;
3012 }
3013 //
3014 // Front Panel Reset Status
3015 //
3016 Temp = Settings & 0x3;
3017 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FRONT_PANEL_RESET), gShellDebug1HiiHandle);
3018 switch (Temp) {
3019 case 0:
3020 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
3021 break;
3022
3023 case 1:
3024 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gShellDebug1HiiHandle);
3025 break;
3026
3027 case 2:
3028 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gShellDebug1HiiHandle);
3029 break;
3030
3031 case 3:
3032 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
3033 break;
3034 }
3035 }
3036
3037 /**
3038 Display Out-of-Band Remote Access (Type 30) information.
3039
3040 @param[in] Connections The device characteristics.
3041 @param[in] Option The device options.
3042 **/
3043 VOID
DisplayOBRAConnections(IN UINT8 Connections,IN UINT8 Option)3044 DisplayOBRAConnections (
3045 IN UINT8 Connections,
3046 IN UINT8 Option
3047 )
3048 {
3049 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONNECTIONS), gShellDebug1HiiHandle);
3050 PRINT_INFO_OPTION (Connections, Option);
3051
3052 //
3053 // Check reserved bits 7:2
3054 //
3055 if ((Connections & 0xFC) != 0) {
3056 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO_2), gShellDebug1HiiHandle);
3057 }
3058 //
3059 // Outbound Connection
3060 //
3061 if (BIT (Connections, 1) != 0) {
3062 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OUTBOUND_CONN_ENABLED), gShellDebug1HiiHandle);
3063 } else {
3064 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTUBOUND_CONN_DISABLED), gShellDebug1HiiHandle);
3065 }
3066 //
3067 // Inbound Connection
3068 //
3069 if (BIT (Connections, 0) != 0) {
3070 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOIUND_CONN_ENABLED), gShellDebug1HiiHandle);
3071 } else {
3072 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOUND_CONN_DISABLED), gShellDebug1HiiHandle);
3073 }
3074 }
3075
3076 /**
3077 Display System Power Supply (Type 39) information.
3078
3079 @param[in] Characteristics The device characteristics.
3080 @param[in] Option The device options.
3081 **/
3082 VOID
DisplaySPSCharacteristics(IN UINT16 Characteristics,IN UINT8 Option)3083 DisplaySPSCharacteristics (
3084 IN UINT16 Characteristics,
3085 IN UINT8 Option
3086 )
3087 {
3088 UINTN Temp;
3089
3090 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_CHAR), gShellDebug1HiiHandle);
3091 PRINT_INFO_OPTION (Characteristics, Option);
3092
3093 //
3094 // Check reserved bits 15:14
3095 //
3096 if ((Characteristics & 0xC000) != 0) {
3097 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_15_14_RSVD), gShellDebug1HiiHandle);
3098 }
3099 //
3100 // Bits 13:10 - DMTF Power Supply Type
3101 //
3102 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), gShellDebug1HiiHandle);
3103 Temp = (Characteristics & 0x1C00) >> 10;
3104 switch (Temp) {
3105 case 1:
3106 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
3107 break;
3108
3109 case 2:
3110 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
3111 break;
3112
3113 case 3:
3114 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LINEAR), gShellDebug1HiiHandle);
3115 break;
3116
3117 case 4:
3118 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SWITCHING), gShellDebug1HiiHandle);
3119 break;
3120
3121 case 5:
3122 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BATTERY), gShellDebug1HiiHandle);
3123 break;
3124
3125 case 6:
3126 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UPS), gShellDebug1HiiHandle);
3127 break;
3128
3129 case 7:
3130 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONVERTER), gShellDebug1HiiHandle);
3131 break;
3132
3133 case 8:
3134 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_REGULATOR), gShellDebug1HiiHandle);
3135 break;
3136
3137 default:
3138 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_2), gShellDebug1HiiHandle);
3139 }
3140 //
3141 // Bits 9:7 - Status
3142 //
3143 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), gShellDebug1HiiHandle);
3144 Temp = (Characteristics & 0x380) >> 7;
3145 switch (Temp) {
3146 case 1:
3147 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
3148 break;
3149
3150 case 2:
3151 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
3152 break;
3153
3154 case 3:
3155 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OK), gShellDebug1HiiHandle);
3156 break;
3157
3158 case 4:
3159 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NON_CRITICAL), gShellDebug1HiiHandle);
3160 break;
3161
3162 case 5:
3163 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CRITICAL_POWER_SUPPLY), gShellDebug1HiiHandle);
3164 break;
3165
3166 default:
3167 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED), gShellDebug1HiiHandle);
3168 }
3169 //
3170 // Bits 6:3 - DMTF Input Voltage Range Switching
3171 //
3172 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), gShellDebug1HiiHandle);
3173 Temp = (Characteristics & 0x78) >> 3;
3174 switch (Temp) {
3175 case 1:
3176 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
3177 break;
3178
3179 case 2:
3180 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
3181 break;
3182
3183 case 3:
3184 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MANUAL), gShellDebug1HiiHandle);
3185 break;
3186
3187 case 4:
3188 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AUTO_SWITCH), gShellDebug1HiiHandle);
3189 break;
3190
3191 case 5:
3192 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WIDE_RANGE), gShellDebug1HiiHandle);
3193 break;
3194
3195 case 6:
3196 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_APPLICABLE), gShellDebug1HiiHandle);
3197 break;
3198
3199 default:
3200 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_3), gShellDebug1HiiHandle);
3201 break;
3202 }
3203 //
3204 // Power supply is unplugged from the wall
3205 //
3206 if (BIT (Characteristics, 2) != 0) {
3207 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_UNPLUGGED), gShellDebug1HiiHandle);
3208 } else {
3209 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PLUGGED), gShellDebug1HiiHandle);
3210 }
3211 //
3212 // Power supply is present
3213 //
3214 if (BIT (Characteristics, 1) != 0) {
3215 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PRESENT), gShellDebug1HiiHandle);
3216 } else {
3217 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_PRESENT), gShellDebug1HiiHandle);
3218 }
3219 //
3220 // hot replaceable
3221 //
3222 if (BIT (Characteristics, 0) != 0) {
3223 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_REPLACE), gShellDebug1HiiHandle);
3224 } else {
3225 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_REPLACE), gShellDebug1HiiHandle);
3226 }
3227 }
3228