ShellPkg: Update header file including style
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / PrintInfo.c
1 /** @file
2 Module for clarifying the content of the smbios structure element information.
3
4 Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
6 (C) Copyright 2015-2017 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
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
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
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
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_H (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 if (AE_SMBIOS_VERSION (0x3, 0x1) && (Struct->Hdr->Length > 0x18)) {
339 ShellPrintHiiEx (
340 -1,
341 -1,
342 NULL,
343 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTENDED_BIOS_SIZE),
344 gShellDebug1HiiHandle,
345 Struct->Type0->ExtendedBiosSize.Size,
346 (Struct->Type0->ExtendedBiosSize.Unit == 0x0) ? L"MB": L"GB"
347 );
348 }
349 break;
350
351 //
352 // System Information (Type 1)
353 //
354 case 1:
355 PRINT_PENDING_STRING (Struct, Type1, Manufacturer);
356 PRINT_PENDING_STRING (Struct, Type1, ProductName);
357 PRINT_PENDING_STRING (Struct, Type1, Version);
358 PRINT_PENDING_STRING (Struct, Type1, SerialNumber);
359 PRINT_BIT_FIELD (Struct, Type1, Uuid, 16);
360 DisplaySystemWakeupType (Struct->Type1->WakeUpType, Option);
361 if (AE_SMBIOS_VERSION (0x2, 0x4) && (Struct->Hdr->Length > 0x19)) {
362 PRINT_PENDING_STRING (Struct, Type1, SKUNumber);
363 PRINT_PENDING_STRING (Struct, Type1, Family);
364 }
365
366 break;
367
368 //
369 // Baseboard Information (Type 2)
370 //
371 case 2:
372 PRINT_PENDING_STRING (Struct, Type2, Manufacturer);
373 PRINT_PENDING_STRING (Struct, Type2, ProductName);
374 PRINT_PENDING_STRING (Struct, Type2, Version);
375 PRINT_PENDING_STRING (Struct, Type2, SerialNumber);
376 if (Struct->Hdr->Length > 0x8) {
377 PRINT_PENDING_STRING (Struct, Type2, AssetTag);
378 DisplayBaseBoardFeatureFlags (*(UINT8 *) &Struct->Type2->FeatureFlag, Option);
379 PRINT_PENDING_STRING (Struct, Type2, LocationInChassis);
380 PRINT_STRUCT_VALUE_H (Struct, Type2, ChassisHandle);
381 DisplayBaseBoardBoardType (Struct->Type2->BoardType, Option);
382 }
383 break;
384
385 //
386 // System Enclosure (Type 3)
387 //
388 case 3:
389 PRINT_PENDING_STRING (Struct, Type3, Manufacturer);
390 PRINT_STRUCT_VALUE (Struct, Type3, Type);
391 DisplaySystemEnclosureType (Struct->Type3->Type, Option);
392 PRINT_PENDING_STRING (Struct, Type3, Version);
393 PRINT_PENDING_STRING (Struct, Type3, SerialNumber);
394 PRINT_PENDING_STRING (Struct, Type3, AssetTag);
395 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), gShellDebug1HiiHandle);
396 DisplaySystemEnclosureStatus (Struct->Type3->BootupState, Option);
397 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), gShellDebug1HiiHandle);
398 DisplaySystemEnclosureStatus (Struct->Type3->PowerSupplyState, Option);
399 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), gShellDebug1HiiHandle);
400 DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option);
401 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);
402 DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option);
403 if (AE_SMBIOS_VERSION (0x2, 0x3)) {
404 if (Struct->Hdr->Length > 0xD) {
405 PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);
406 }
407 if (Struct->Hdr->Length > 0x11) {
408 PRINT_STRUCT_VALUE (Struct, Type3, Height);
409 }
410 if (Struct->Hdr->Length > 0x12) {
411 PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords);
412 }
413 }
414 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) {
415 if (Struct->Hdr->Length > (0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength))) {
416 PRINT_SMBIOS_STRING (Struct, Buffer[0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength)], SKUNumber);
417 }
418 }
419 break;
420
421 //
422 // Processor Information (Type 4)
423 //
424 case 4:
425 PRINT_SMBIOS_STRING (Struct, Struct->Type4->Socket, SocketDesignation)
426 DisplayProcessorType (Struct->Type4->ProcessorType, Option);
427 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0x28) &&
428 (Struct->Type4->ProcessorFamily == 0xFE)) {
429 //
430 // Get family from ProcessorFamily2 field
431 //
432 DisplayProcessorFamily2 (Struct->Type4->ProcessorFamily2, Option);
433 } else {
434 DisplayProcessorFamily (Struct->Type4->ProcessorFamily, Option);
435 }
436 PRINT_PENDING_STRING (Struct, Type4, ProcessorManufacture);
437 PRINT_BIT_FIELD (Struct, Type4, ProcessorId, 8);
438 PRINT_PENDING_STRING (Struct, Type4, ProcessorVersion);
439 DisplayProcessorVoltage (*(UINT8 *) &(Struct->Type4->Voltage), Option);
440 PRINT_STRUCT_VALUE (Struct, Type4, ExternalClock);
441 PRINT_STRUCT_VALUE (Struct, Type4, MaxSpeed);
442 PRINT_STRUCT_VALUE (Struct, Type4, CurrentSpeed);
443 DisplayProcessorStatus (Struct->Type4->Status, Option);
444 DisplayProcessorUpgrade (Struct->Type4->ProcessorUpgrade, Option);
445 PRINT_STRUCT_VALUE_H (Struct, Type4, L1CacheHandle);
446 PRINT_STRUCT_VALUE_H (Struct, Type4, L2CacheHandle);
447 PRINT_STRUCT_VALUE_H (Struct, Type4, L3CacheHandle);
448 if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0x20)) {
449 PRINT_PENDING_STRING (Struct, Type4, SerialNumber);
450 PRINT_PENDING_STRING (Struct, Type4, AssetTag);
451 PRINT_PENDING_STRING (Struct, Type4, PartNumber);
452 }
453 if (AE_SMBIOS_VERSION (0x2, 0x5) && (Struct->Hdr->Length > 0x23)) {
454 PRINT_STRUCT_VALUE (Struct, Type4, CoreCount);
455 PRINT_STRUCT_VALUE (Struct, Type4, EnabledCoreCount);
456 PRINT_STRUCT_VALUE (Struct, Type4, ThreadCount);
457 DisplayProcessorCharacteristics (Struct->Type4->ProcessorCharacteristics, Option);
458 }
459 if ((SmbiosMajorVersion >= 0x3) && (Struct->Hdr->Length > 0x2A)) {
460 PRINT_STRUCT_VALUE (Struct, Type4, CoreCount2);
461 PRINT_STRUCT_VALUE (Struct, Type4, EnabledCoreCount2);
462 PRINT_STRUCT_VALUE (Struct, Type4, ThreadCount2);
463 }
464 break;
465
466 //
467 // Memory Controller Information (Type 5)
468 //
469 case 5:
470 {
471 UINT8 SlotNum;
472 SlotNum = Struct->Type5->AssociatedMemorySlotNum;
473
474 DisplayMcErrorDetectMethod (Struct->Type5->ErrDetectMethod, Option);
475 DisplayMcErrorCorrectCapability (*(UINT8 *) &(Struct->Type5->ErrCorrectCapability), Option);
476 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), gShellDebug1HiiHandle);
477 DisplayMcInterleaveSupport (Struct->Type5->SupportInterleave, Option);
478 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), gShellDebug1HiiHandle);
479 DisplayMcInterleaveSupport (Struct->Type5->CurrentInterleave, Option);
480 DisplayMaxMemoryModuleSize (Struct->Type5->MaxMemoryModuleSize, SlotNum, Option);
481 DisplayMcMemorySpeeds (*(UINT16 *) &(Struct->Type5->SupportSpeed), Option);
482 DisplayMmMemoryType (Struct->Type5->SupportMemoryType, Option);
483 DisplayMemoryModuleVoltage (Struct->Type5->MemoryModuleVoltage, Option);
484 PRINT_STRUCT_VALUE (Struct, Type5, AssociatedMemorySlotNum);
485 //
486 // According to SMBIOS Specification, offset 0x0F
487 //
488 DisplayMemoryModuleConfigHandles ((UINT16 *) (&Buffer[0x0F]), SlotNum, Option);
489 DisplayMcErrorCorrectCapability (Buffer[0x0F + 2 * SlotNum], Option);
490 }
491 break;
492
493 //
494 // Memory Module Information (Type 6)
495 //
496 case 6:
497 PRINT_PENDING_STRING (Struct, Type6, SocketDesignation);
498 DisplayMmBankConnections (Struct->Type6->BankConnections, Option);
499 PRINT_STRUCT_VALUE (Struct, Type6, CurrentSpeed);
500 DisplayMmMemoryType (*(UINT16 *) &(Struct->Type6->CurrentMemoryType), Option);
501 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), gShellDebug1HiiHandle);
502 DisplayMmMemorySize (*(UINT8 *) &(Struct->Type6->InstalledSize), Option);
503 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);
504 DisplayMmMemorySize (*(UINT8 *) &(Struct->Type6->EnabledSize), Option);
505 DisplayMmErrorStatus (Struct->Type6->ErrorStatus, Option);
506 break;
507
508 //
509 // Cache Information (Type 7)
510 //
511 case 7:
512 PRINT_PENDING_STRING (Struct, Type7, SocketDesignation);
513 DisplayCacheConfiguration (Struct->Type7->CacheConfiguration, Option);
514 PRINT_STRUCT_VALUE_H (Struct, Type7, MaximumCacheSize);
515 PRINT_STRUCT_VALUE_H (Struct, Type7, InstalledSize);
516 PRINT_STRUCT_VALUE_H (Struct, Type7, SupportedSRAMType);
517 PRINT_STRUCT_VALUE_H (Struct, Type7, CurrentSRAMType);
518 DisplayCacheSRAMType (ReadUnaligned16 ((UINT16 *) (UINTN) &(Struct->Type7->CurrentSRAMType)), Option);
519 PRINT_STRUCT_VALUE_H (Struct, Type7, CacheSpeed);
520 DisplayCacheErrCorrectingType (Struct->Type7->ErrorCorrectionType, Option);
521 DisplayCacheSystemCacheType (Struct->Type7->SystemCacheType, Option);
522 DisplayCacheAssociativity (Struct->Type7->Associativity, Option);
523 if (AE_SMBIOS_VERSION (0x3, 0x1) && (Struct->Hdr->Length > 0x13)) {
524 PRINT_STRUCT_VALUE_H (Struct, Type7, MaximumCacheSize2);
525 PRINT_STRUCT_VALUE_H (Struct, Type7, InstalledSize2);
526 }
527 break;
528
529 //
530 // Port Connector Information (Type 8)
531 //
532 case 8:
533 PRINT_PENDING_STRING (Struct, Type8, InternalReferenceDesignator);
534 Print (L"Internal ");
535 DisplayPortConnectorType (Struct->Type8->InternalConnectorType, Option);
536 PRINT_PENDING_STRING (Struct, Type8, ExternalReferenceDesignator);
537 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), gShellDebug1HiiHandle);
538 DisplayPortConnectorType (Struct->Type8->ExternalConnectorType, Option);
539 DisplayPortType (Struct->Type8->PortType, Option);
540 break;
541
542 //
543 // System Slots (Type 9)
544 //
545 case 9:
546 PRINT_PENDING_STRING (Struct, Type9, SlotDesignation);
547 DisplaySystemSlotType (Struct->Type9->SlotType, Option);
548 DisplaySystemSlotDataBusWidth (Struct->Type9->SlotDataBusWidth, Option);
549 DisplaySystemSlotCurrentUsage (Struct->Type9->CurrentUsage, Option);
550 DisplaySystemSlotLength (Struct->Type9->SlotLength, Option);
551 DisplaySystemSlotId (
552 Struct->Type9->SlotID,
553 Struct->Type9->SlotType,
554 Option
555 );
556 DisplaySlotCharacteristics1 (*(UINT8 *) &(Struct->Type9->SlotCharacteristics1), Option);
557 DisplaySlotCharacteristics2 (*(UINT8 *) &(Struct->Type9->SlotCharacteristics2), Option);
558 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0xD)) {
559 PRINT_STRUCT_VALUE_H (Struct, Type9, SegmentGroupNum);
560 PRINT_STRUCT_VALUE_H (Struct, Type9, BusNum);
561 PRINT_STRUCT_VALUE_H (Struct, Type9, DevFuncNum);
562 }
563 break;
564
565 //
566 // On Board Devices Information (Type 10)
567 //
568 case 10:
569 {
570 UINTN NumOfDevice;
571 NumOfDevice = (Struct->Type10->Hdr.Length - sizeof (SMBIOS_STRUCTURE)) / (2 * sizeof (UINT8));
572 for (Index = 0; Index < NumOfDevice; Index++) {
573 ShellPrintEx(-1,-1,(((Struct->Type10->Device[Index].DeviceType) & 0x80) != 0) ? L"Device Enabled\n": L"Device Disabled\n");
574 DisplayOnboardDeviceTypes ((Struct->Type10->Device[Index].DeviceType) & 0x7F, Option);
575 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gShellDebug1HiiHandle);
576 ShellPrintEx(-1,-1,L"%a\n",LibGetSmbiosString (Struct, Struct->Type10->Device[Index].DescriptionString));
577 }
578 }
579 break;
580
581 //
582 // Oem Strings (Type 11)
583 //
584 case 11:
585 PRINT_STRUCT_VALUE (Struct, Type11, StringCount);
586 for (Index = 1; Index <= Struct->Type11->StringCount; Index++) {
587 ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));
588 }
589 break;
590
591 //
592 // System Configuration Options (Type 12)
593 //
594 case 12:
595 PRINT_STRUCT_VALUE (Struct, Type12, StringCount);
596 for (Index = 1; Index <= Struct->Type12->StringCount; Index++) {
597 ShellPrintEx(-1,-1,L"%a\n", LibGetSmbiosString (Struct, Index));
598 }
599 break;
600
601 //
602 // BIOS Language Information (Type 13)
603 //
604 case 13:
605 PRINT_STRUCT_VALUE (Struct, Type13, InstallableLanguages);
606 PRINT_STRUCT_VALUE (Struct, Type13, Flags);
607 PRINT_BIT_FIELD (Struct, Type13, Reserved, 15);
608 PRINT_PENDING_STRING (Struct, Type13, CurrentLanguages);
609 break;
610
611 //
612 // Group Associations (Type 14)
613 //
614 case 14:
615 {
616 UINT8 NumOfItem;
617 NumOfItem = (Struct->Type14->Hdr.Length - 5) / 3;
618 PRINT_PENDING_STRING (Struct, Type14, GroupName);
619 for (Index = 0; Index < NumOfItem; Index++) {
620 ShellPrintEx(-1,-1,L"ItemType %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemType);
621 ShellPrintEx(-1,-1,L"ItemHandle %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemHandle);
622 }
623 }
624 break;
625
626 //
627 // System Event Log (Type 15)
628 //
629 case 15:
630 {
631 EVENT_LOG_TYPE *Ptr;
632 UINT8 Count;
633 UINT8 *AccessMethodAddress;
634
635 PRINT_STRUCT_VALUE_H (Struct, Type15, LogAreaLength);
636 PRINT_STRUCT_VALUE_H (Struct, Type15, LogHeaderStartOffset);
637 PRINT_STRUCT_VALUE_H (Struct, Type15, LogDataStartOffset);
638 DisplaySELAccessMethod (Struct->Type15->AccessMethod, Option);
639 PRINT_STRUCT_VALUE_H (Struct, Type15, AccessMethodAddress);
640 DisplaySELLogStatus (Struct->Type15->LogStatus, Option);
641 PRINT_STRUCT_VALUE_H (Struct, Type15, LogChangeToken);
642 DisplaySysEventLogHeaderFormat (Struct->Type15->LogHeaderFormat, Option);
643 PRINT_STRUCT_VALUE_H (Struct, Type15, NumberOfSupportedLogTypeDescriptors);
644 PRINT_STRUCT_VALUE_H (Struct, Type15, LengthOfLogTypeDescriptor);
645
646 Count = Struct->Type15->NumberOfSupportedLogTypeDescriptors;
647 if (Count > 0) {
648 Ptr = Struct->Type15->EventLogTypeDescriptors;
649
650 //
651 // Display all Event Log type descriptors supported by system
652 //
653 for (Index = 0; Index < Count; Index++, Ptr++) {
654 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRTED_EVENT), gShellDebug1HiiHandle, Index + 1);
655 DisplaySELTypes (Ptr->LogType, Option);
656 DisplaySELVarDataFormatType (Ptr->DataFormatType, Option);
657 }
658
659 if (Option >= SHOW_DETAIL) {
660 switch (Struct->Type15->AccessMethod) {
661 case 03:
662 AccessMethodAddress = (UINT8 *) (UINTN) (Struct->Type15->AccessMethodAddress);
663 break;
664
665 case 00:
666 case 01:
667 case 02:
668 case 04:
669 default:
670 ShellPrintHiiEx(-1,-1,NULL,
671 STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED),
672 gShellDebug1HiiHandle,
673 Struct->Type15->AccessMethod
674 );
675 return EFI_UNSUPPORTED;
676 }
677 //
678 // Display Event Log Header
679 //
680 // Starting offset (or index) within the nonvolatile storage
681 // of the event-log's header, from the Access Method Address
682 //
683 DisplaySysEventLogHeader (
684 Struct->Type15->LogHeaderFormat,
685 AccessMethodAddress + Struct->Type15->LogHeaderStartOffset
686 );
687
688 //
689 // Display all Event Log data
690 //
691 // Starting offset (or index) within the nonvolatile storage
692 // of the event-log's first data byte, from the Access Method Address(0x14)
693 //
694 DisplaySysEventLogData (
695 AccessMethodAddress + Struct->Type15->LogDataStartOffset,
696 (UINT16)
697 (
698 Struct->Type15->LogAreaLength -
699 (Struct->Type15->LogDataStartOffset - Struct->Type15->LogHeaderStartOffset)
700 )
701 );
702 }
703
704 }
705 }
706 break;
707
708 //
709 // Physical Memory Array (Type 16)
710 //
711 case 16:
712 DisplayPMALocation (Struct->Type16->Location, Option);
713 DisplayPMAUse (Struct->Type16->Use, Option);
714 DisplayPMAErrorCorrectionTypes (
715 Struct->Type16->MemoryErrorCorrection,
716 Option
717 );
718 PRINT_STRUCT_VALUE_H (Struct, Type16, MaximumCapacity);
719 PRINT_STRUCT_VALUE_H (Struct, Type16, MemoryErrorInformationHandle);
720 PRINT_STRUCT_VALUE_H (Struct, Type16, NumberOfMemoryDevices);
721 if (AE_SMBIOS_VERSION (0x2, 0x7) && Struct->Hdr->Length > 0xF) {
722 PRINT_STRUCT_VALUE_LH (Struct, Type16, ExtendedMaximumCapacity);
723 }
724 break;
725
726 //
727 // Memory Device (Type 17)
728 //
729 case 17:
730 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryArrayHandle);
731 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryErrorInformationHandle);
732 PRINT_STRUCT_VALUE (Struct, Type17, TotalWidth);
733 PRINT_STRUCT_VALUE (Struct, Type17, DataWidth);
734 PRINT_STRUCT_VALUE (Struct, Type17, Size);
735 DisplayMemoryDeviceFormFactor (Struct->Type17->FormFactor, Option);
736 PRINT_STRUCT_VALUE_H (Struct, Type17, DeviceSet);
737 PRINT_PENDING_STRING (Struct, Type17, DeviceLocator);
738 PRINT_PENDING_STRING (Struct, Type17, BankLocator);
739 DisplayMemoryDeviceType (Struct->Type17->MemoryType, Option);
740 DisplayMemoryDeviceTypeDetail (ReadUnaligned16 ((UINT16 *) (UINTN) &(Struct->Type17->TypeDetail)), Option);
741 PRINT_STRUCT_VALUE_H (Struct, Type17, Speed);
742 PRINT_PENDING_STRING (Struct, Type17, Manufacturer);
743 PRINT_PENDING_STRING (Struct, Type17, SerialNumber);
744 PRINT_PENDING_STRING (Struct, Type17, AssetTag);
745 PRINT_PENDING_STRING (Struct, Type17, PartNumber);
746 if (AE_SMBIOS_VERSION (0x2, 0x6) && (Struct->Hdr->Length > 0x1B)) {
747 PRINT_STRUCT_VALUE_H (Struct, Type17, Attributes);
748 }
749 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x1C)) {
750 PRINT_STRUCT_VALUE (Struct, Type17, ExtendedSize);
751 PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredMemoryClockSpeed);
752 }
753 if (AE_SMBIOS_VERSION (0x2, 0x8) && (Struct->Hdr->Length > 0x22)) {
754 PRINT_STRUCT_VALUE (Struct, Type17, MinimumVoltage);
755 PRINT_STRUCT_VALUE (Struct, Type17, MaximumVoltage);
756 PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredVoltage);
757 }
758 break;
759
760 //
761 // 32-bit Memory Error Information (Type 18)
762 //
763 case 18:
764 DisplayMemoryErrorType (Struct->Type18->ErrorType, Option);
765 DisplayMemoryErrorGranularity (
766 Struct->Type18->ErrorGranularity,
767 Option
768 );
769 DisplayMemoryErrorOperation (Struct->Type18->ErrorOperation, Option);
770 PRINT_STRUCT_VALUE_H (Struct, Type18, VendorSyndrome);
771 PRINT_STRUCT_VALUE_H (Struct, Type18, MemoryArrayErrorAddress);
772 PRINT_STRUCT_VALUE_H (Struct, Type18, DeviceErrorAddress);
773 PRINT_STRUCT_VALUE_H (Struct, Type18, ErrorResolution);
774 break;
775
776 //
777 // Memory Array Mapped Address (Type 19)
778 //
779 case 19:
780 PRINT_STRUCT_VALUE_H (Struct, Type19, StartingAddress);
781 PRINT_STRUCT_VALUE_H (Struct, Type19, EndingAddress);
782 PRINT_STRUCT_VALUE_H (Struct, Type19, MemoryArrayHandle);
783 PRINT_STRUCT_VALUE_H (Struct, Type19, PartitionWidth);
784 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0xF)) {
785 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedStartingAddress);
786 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedEndingAddress);
787 }
788 break;
789
790 //
791 // Memory Device Mapped Address (Type 20)
792 //
793 case 20:
794 PRINT_STRUCT_VALUE_H (Struct, Type20, StartingAddress);
795 PRINT_STRUCT_VALUE_H (Struct, Type20, EndingAddress);
796 PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryDeviceHandle);
797 PRINT_STRUCT_VALUE_H (Struct, Type20, MemoryArrayMappedAddressHandle);
798 PRINT_STRUCT_VALUE_H (Struct, Type20, PartitionRowPosition);
799 PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavePosition);
800 PRINT_STRUCT_VALUE_H (Struct, Type20, InterleavedDataDepth);
801 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) {
802 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedStartingAddress);
803 PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedEndingAddress);
804 }
805 break;
806
807 //
808 // Built-in Pointing Device (Type 21)
809 //
810 case 21:
811 DisplayPointingDeviceType (Struct->Type21->Type, Option);
812 DisplayPointingDeviceInterface (Struct->Type21->Interface, Option);
813 PRINT_STRUCT_VALUE (Struct, Type21, NumberOfButtons);
814 break;
815
816 //
817 // Portable Battery (Type 22)
818 //
819 case 22:
820 PRINT_PENDING_STRING (Struct, Type22, Location);
821 PRINT_PENDING_STRING (Struct, Type22, Manufacturer);
822 PRINT_PENDING_STRING (Struct, Type22, ManufactureDate);
823 PRINT_PENDING_STRING (Struct, Type22, SerialNumber);
824 PRINT_PENDING_STRING (Struct, Type22, DeviceName);
825 DisplayPBDeviceChemistry (
826 Struct->Type22->DeviceChemistry,
827 Option
828 );
829 PRINT_STRUCT_VALUE_H (Struct, Type22, DeviceCapacity);
830 PRINT_STRUCT_VALUE_H (Struct, Type22, DesignVoltage);
831 PRINT_PENDING_STRING (Struct, Type22, SBDSVersionNumber);
832 PRINT_STRUCT_VALUE_H (Struct, Type22, MaximumErrorInBatteryData);
833 PRINT_STRUCT_VALUE_H (Struct, Type22, SBDSSerialNumber);
834 DisplaySBDSManufactureDate (
835 Struct->Type22->SBDSManufactureDate,
836 Option
837 );
838 PRINT_PENDING_STRING (Struct, Type22, SBDSDeviceChemistry);
839 PRINT_STRUCT_VALUE_H (Struct, Type22, DesignCapacityMultiplier);
840 PRINT_STRUCT_VALUE_H (Struct, Type22, OEMSpecific);
841 break;
842
843 //
844 // System Reset (Type 23)
845 //
846 case 23:
847 DisplaySystemResetCapabilities (
848 Struct->Type23->Capabilities,
849 Option
850 );
851 PRINT_STRUCT_VALUE_H (Struct, Type23, ResetCount);
852 PRINT_STRUCT_VALUE_H (Struct, Type23, ResetLimit);
853 PRINT_STRUCT_VALUE_H (Struct, Type23, TimerInterval);
854 PRINT_STRUCT_VALUE_H (Struct, Type23, Timeout);
855 break;
856
857 //
858 // Hardware Security (Type 24)
859 //
860 case 24:
861 DisplayHardwareSecuritySettings (
862 Struct->Type24->HardwareSecuritySettings,
863 Option
864 );
865 break;
866
867 //
868 // System Power Controls (Type 25)
869 //
870 case 25:
871 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMonth);
872 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnDayOfMonth);
873 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnHour);
874 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnMinute);
875 PRINT_STRUCT_VALUE_H (Struct, Type25, NextScheduledPowerOnSecond);
876 break;
877
878 //
879 // Voltage Probe (Type 26)
880 //
881 case 26:
882 PRINT_PENDING_STRING (Struct, Type26, Description);
883 DisplayVPLocation (*(UINT8 *) &(Struct->Type26->LocationAndStatus), Option);
884 DisplayVPStatus (*(UINT8 *) &(Struct->Type26->LocationAndStatus), Option);
885 PRINT_STRUCT_VALUE_H (Struct, Type26, MaximumValue);
886 PRINT_STRUCT_VALUE_H (Struct, Type26, MinimumValue);
887 PRINT_STRUCT_VALUE_H (Struct, Type26, Resolution);
888 PRINT_STRUCT_VALUE_H (Struct, Type26, Tolerance);
889 PRINT_STRUCT_VALUE_H (Struct, Type26, Accuracy);
890 PRINT_STRUCT_VALUE_H (Struct, Type26, OEMDefined);
891 PRINT_STRUCT_VALUE_H (Struct, Type26, NominalValue);
892 break;
893
894 //
895 // Cooling Device (Type 27)
896 //
897 case 27:
898 PRINT_STRUCT_VALUE_H (Struct, Type27, TemperatureProbeHandle);
899 DisplayCoolingDeviceStatus (*(UINT8 *) &(Struct->Type27->DeviceTypeAndStatus), Option);
900 DisplayCoolingDeviceType (*(UINT8 *) &(Struct->Type27->DeviceTypeAndStatus), Option);
901 PRINT_STRUCT_VALUE_H (Struct, Type27, CoolingUnitGroup);
902 PRINT_STRUCT_VALUE_H (Struct, Type27, OEMDefined);
903 PRINT_STRUCT_VALUE_H (Struct, Type27, NominalSpeed);
904 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0xE)) {
905 PRINT_PENDING_STRING (Struct, Type27, Description);
906 }
907 break;
908
909 //
910 // Temperature Probe (Type 28)
911 //
912 case 28:
913 PRINT_PENDING_STRING (Struct, Type28, Description);
914 DisplayTemperatureProbeStatus (*(UINT8 *) &(Struct->Type28->LocationAndStatus), Option);
915 DisplayTemperatureProbeLoc (*(UINT8 *) &(Struct->Type28->LocationAndStatus), Option);
916 PRINT_STRUCT_VALUE_H (Struct, Type28, MaximumValue);
917 PRINT_STRUCT_VALUE_H (Struct, Type28, MinimumValue);
918 PRINT_STRUCT_VALUE_H (Struct, Type28, Resolution);
919 PRINT_STRUCT_VALUE_H (Struct, Type28, Tolerance);
920 PRINT_STRUCT_VALUE_H (Struct, Type28, Accuracy);
921 PRINT_STRUCT_VALUE_H (Struct, Type28, OEMDefined);
922 PRINT_STRUCT_VALUE_H (Struct, Type28, NominalValue);
923 break;
924
925 //
926 // Electrical Current Probe (Type 29)
927 //
928 case 29:
929 PRINT_PENDING_STRING (Struct, Type29, Description);
930 DisplayECPStatus (*(UINT8 *) &(Struct->Type29->LocationAndStatus), Option);
931 DisplayECPLoc (*(UINT8 *) &(Struct->Type29->LocationAndStatus), Option);
932 PRINT_STRUCT_VALUE_H (Struct, Type29, MaximumValue);
933 PRINT_STRUCT_VALUE_H (Struct, Type29, MinimumValue);
934 PRINT_STRUCT_VALUE_H (Struct, Type29, Resolution);
935 PRINT_STRUCT_VALUE_H (Struct, Type29, Tolerance);
936 PRINT_STRUCT_VALUE_H (Struct, Type29, Accuracy);
937 PRINT_STRUCT_VALUE_H (Struct, Type29, OEMDefined);
938 PRINT_STRUCT_VALUE_H (Struct, Type29, NominalValue);
939 break;
940
941 //
942 // Out-of-Band Remote Access (Type 30)
943 //
944 case 30:
945 PRINT_PENDING_STRING (Struct, Type30, ManufacturerName);
946 DisplayOBRAConnections (Struct->Type30->Connections, Option);
947 break;
948
949 //
950 // Boot Integrity Services (BIS) Entry Point (Type 31)
951 //
952 case 31:
953 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE31), gShellDebug1HiiHandle);
954 break;
955
956 //
957 // System Boot Information (Type 32)
958 //
959 case 32:
960 PRINT_BIT_FIELD (Struct, Type32, Reserved, 6);
961 DisplaySystemBootStatus (Struct->Type32->BootStatus, Option);
962 break;
963
964 //
965 // 64-Bit Memory Error Information (Type 33)
966 //
967 case 33:
968 DisplayMemoryErrorType (Struct->Type33->ErrorType, Option);
969 DisplayMemoryErrorGranularity (
970 Struct->Type33->ErrorGranularity,
971 Option
972 );
973 DisplayMemoryErrorOperation (Struct->Type33->ErrorOperation, Option);
974 PRINT_STRUCT_VALUE_H (Struct, Type33, VendorSyndrome);
975 PRINT_STRUCT_VALUE_LH (Struct, Type33, MemoryArrayErrorAddress);
976 PRINT_STRUCT_VALUE_LH (Struct, Type33, DeviceErrorAddress);
977 PRINT_STRUCT_VALUE_H (Struct, Type33, ErrorResolution);
978 break;
979
980 //
981 // Management Device (Type 34)
982 //
983 case 34:
984 PRINT_PENDING_STRING (Struct, Type34, Description);
985 DisplayMDType (Struct->Type34->Type, Option);
986 PRINT_STRUCT_VALUE_H (Struct, Type34, Address);
987 DisplayMDAddressType (Struct->Type34->AddressType, Option);
988 break;
989
990 //
991 // Management Device Component (Type 35)
992 //
993 case 35:
994 PRINT_PENDING_STRING (Struct, Type35, Description);
995 PRINT_STRUCT_VALUE_H (Struct, Type35, ManagementDeviceHandle);
996 PRINT_STRUCT_VALUE_H (Struct, Type35, ComponentHandle);
997 PRINT_STRUCT_VALUE_H (Struct, Type35, ThresholdHandle);
998 break;
999
1000 //
1001 // Management Device Threshold Data (Type 36)
1002 //
1003 case 36:
1004 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonCritical);
1005 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonCritical);
1006 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdCritical);
1007 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdCritical);
1008 PRINT_STRUCT_VALUE_H (Struct, Type36, LowerThresholdNonRecoverable);
1009 PRINT_STRUCT_VALUE_H (Struct, Type36, UpperThresholdNonRecoverable);
1010 break;
1011
1012 //
1013 // Memory Channel (Type 37)
1014 //
1015 case 37:
1016 {
1017 UINT8 Count;
1018 MEMORY_DEVICE *Ptr;
1019 DisplayMemoryChannelType (Struct->Type37->ChannelType, Option);
1020 PRINT_STRUCT_VALUE_H (Struct, Type37, MaximumChannelLoad);
1021 PRINT_STRUCT_VALUE_H (Struct, Type37, MemoryDeviceCount);
1022
1023 Count = Struct->Type37->MemoryDeviceCount;
1024 Ptr = Struct->Type37->MemoryDevice;
1025 for (Index = 0; Index < Count; Index++) {
1026 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), gShellDebug1HiiHandle, Index + 1);
1027 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), gShellDebug1HiiHandle, Ptr[Index].DeviceLoad);
1028 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_HANDLE), gShellDebug1HiiHandle, Ptr[Index].DeviceHandle);
1029 }
1030 }
1031 break;
1032
1033 //
1034 // IPMI Device Information (Type 38)
1035 //
1036 case 38:
1037 DisplayIPMIDIBMCInterfaceType (Struct->Type38->InterfaceType, Option);
1038 PRINT_STRUCT_VALUE_H (Struct, Type38, IPMISpecificationRevision);
1039 PRINT_STRUCT_VALUE_H (Struct, Type38, I2CSlaveAddress);
1040 PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);
1041 PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);
1042 break;
1043
1044 //
1045 // System Power Supply (Type 39)
1046 //
1047 case 39:
1048 PRINT_STRUCT_VALUE_H (Struct, Type39, PowerUnitGroup);
1049 PRINT_PENDING_STRING (Struct, Type39, Location);
1050 PRINT_PENDING_STRING (Struct, Type39, DeviceName);
1051 PRINT_PENDING_STRING (Struct, Type39, Manufacturer);
1052 PRINT_PENDING_STRING (Struct, Type39, SerialNumber);
1053 PRINT_PENDING_STRING (Struct, Type39, AssetTagNumber);
1054 PRINT_PENDING_STRING (Struct, Type39, ModelPartNumber);
1055 PRINT_PENDING_STRING (Struct, Type39, RevisionLevel);
1056 PRINT_STRUCT_VALUE_H (Struct, Type39, MaxPowerCapacity);
1057 DisplaySPSCharacteristics (
1058 *(UINT16 *) &(Struct->Type39->PowerSupplyCharacteristics),
1059 Option
1060 );
1061 PRINT_STRUCT_VALUE_H (Struct, Type39, InputVoltageProbeHandle);
1062 PRINT_STRUCT_VALUE_H (Struct, Type39, CoolingDeviceHandle);
1063 PRINT_STRUCT_VALUE_H (Struct, Type39, InputCurrentProbeHandle);
1064 break;
1065
1066 //
1067 // Additional Information (Type 40)
1068 //
1069 case 40:
1070 {
1071 UINT8 NumberOfEntries;
1072 UINT8 EntryLength;
1073 ADDITIONAL_INFORMATION_ENTRY *Entries;
1074
1075 EntryLength = 0;
1076 Entries = Struct->Type40->AdditionalInfoEntries;
1077 NumberOfEntries = Struct->Type40->NumberOfAdditionalInformationEntries;
1078
1079 PRINT_STRUCT_VALUE_H (Struct, Type40, NumberOfAdditionalInformationEntries);
1080
1081 for (Index = 0; Index < NumberOfEntries; Index++) {
1082 EntryLength = Entries->EntryLength;
1083 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), gShellDebug1HiiHandle, EntryLength);
1084 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), gShellDebug1HiiHandle, Entries->ReferencedHandle);
1085 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), gShellDebug1HiiHandle, Entries->ReferencedOffset);
1086 PRINT_SMBIOS_STRING (Struct, Entries->EntryString, String);
1087 PRINT_SMBIOS_BIT_FIELD (Struct, Entries->Value, Value, EntryLength - 5);
1088 Entries = (ADDITIONAL_INFORMATION_ENTRY *) ((UINT8 *)Entries + EntryLength);
1089 }
1090 }
1091 break;
1092
1093 //
1094 // Onboard Devices Extended Information (Type 41)
1095 //
1096 case 41:
1097 PRINT_PENDING_STRING (Struct, Type41, ReferenceDesignation);
1098 ShellPrintEx(-1,-1,(((Struct->Type41->DeviceType) & 0x80) != 0) ? L"Device Enabled\n": L"Device Disabled\n");
1099 DisplayOnboardDeviceTypes ((Struct->Type41->DeviceType) & 0x7F, Option);
1100 PRINT_STRUCT_VALUE_H (Struct, Type41, DeviceTypeInstance);
1101 PRINT_STRUCT_VALUE_H (Struct, Type41, SegmentGroupNum);
1102 PRINT_STRUCT_VALUE_H (Struct, Type41, BusNum);
1103 PRINT_STRUCT_VALUE_H (Struct, Type41, DevFuncNum);
1104 break;
1105
1106 //
1107 // Management Controller Host Interface (Type 42)
1108 //
1109 case 42:
1110 DisplayMCHostInterfaceType (Struct->Type42->InterfaceType, Option);
1111 break;
1112
1113 //
1114 // TPM Device (Type 43)
1115 //
1116 case 43:
1117 PRINT_BIT_FIELD (Struct, Type43, VendorID, 4);
1118 PRINT_STRUCT_VALUE_H (Struct, Type43, MajorSpecVersion);
1119 PRINT_STRUCT_VALUE_H (Struct, Type43, MinorSpecVersion);
1120 PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion1);
1121 PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion2);
1122 PRINT_PENDING_STRING (Struct, Type43, Description);
1123 DisplayTpmDeviceCharacteristics (ReadUnaligned64 ((UINT64 *) (UINTN) &(Struct->Type43->Characteristics)), Option);
1124 PRINT_STRUCT_VALUE_H (Struct, Type43, OemDefined);
1125 break;
1126
1127 //
1128 // Inactive (Type 126)
1129 //
1130 case 126:
1131 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INACTIVE_STRUCT), gShellDebug1HiiHandle);
1132 break;
1133
1134 //
1135 // End-of-Table (Type 127)
1136 //
1137 case 127:
1138 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THIS_STRUCT_END_TABLE), gShellDebug1HiiHandle);
1139 break;
1140
1141 default:
1142 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE_UNDEFINED), gShellDebug1HiiHandle);
1143 break;
1144 }
1145
1146 return EFI_SUCCESS;
1147 }
1148
1149 /**
1150 Display BIOS Information (Type 0) information.
1151
1152 @param[in] Chara The information bits.
1153 @param[in] Option The optional information.
1154 **/
1155 VOID
1156 DisplayBiosCharacteristics (
1157 IN UINT64 Chara,
1158 IN UINT8 Option
1159 )
1160 {
1161 //
1162 // Print header
1163 //
1164 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR), gShellDebug1HiiHandle);
1165 //
1166 // print option
1167 //
1168 PRINT_INFO_OPTION (Chara, Option);
1169
1170 //
1171 // Check all the bits and print information
1172 // This function does not use Table because table of bits
1173 // are designed not to deal with UINT64
1174 //
1175 if (BIT (Chara, 0) != 0) {
1176 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
1177 }
1178
1179 if (BIT (Chara, 1) != 0) {
1180 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
1181 }
1182
1183 if (BIT (Chara, 2) != 0) {
1184 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), gShellDebug1HiiHandle);
1185 }
1186
1187 if (BIT (Chara, 3) != 0) {
1188 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), gShellDebug1HiiHandle);
1189 }
1190
1191 if (BIT (Chara, 4) != 0) {
1192 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), gShellDebug1HiiHandle);
1193 }
1194
1195 if (BIT (Chara, 5) != 0) {
1196 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), gShellDebug1HiiHandle);
1197 }
1198
1199 if (BIT (Chara, 6) != 0) {
1200 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), gShellDebug1HiiHandle);
1201 }
1202
1203 if (BIT (Chara, 7) != 0) {
1204 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), gShellDebug1HiiHandle);
1205 }
1206
1207 if (BIT (Chara, 8) != 0) {
1208 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), gShellDebug1HiiHandle);
1209 }
1210
1211 if (BIT (Chara, 9) != 0) {
1212 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), gShellDebug1HiiHandle);
1213 }
1214
1215 if (BIT (Chara, 10) != 0) {
1216 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), gShellDebug1HiiHandle);
1217 }
1218
1219 if (BIT (Chara, 11) != 0) {
1220 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), gShellDebug1HiiHandle);
1221 }
1222
1223 if (BIT (Chara, 12) != 0) {
1224 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), gShellDebug1HiiHandle);
1225 }
1226
1227 if (BIT (Chara, 13) != 0) {
1228 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), gShellDebug1HiiHandle);
1229 }
1230
1231 if (BIT (Chara, 14) != 0) {
1232 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), gShellDebug1HiiHandle);
1233 }
1234
1235 if (BIT (Chara, 15) != 0) {
1236 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gShellDebug1HiiHandle);
1237 }
1238
1239 if (BIT (Chara, 16) != 0) {
1240 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1241 }
1242
1243 if (BIT (Chara, 17) != 0) {
1244 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), gShellDebug1HiiHandle);
1245 }
1246
1247 if (BIT (Chara, 18) != 0) {
1248 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), gShellDebug1HiiHandle);
1249 }
1250
1251 if (BIT (Chara, 19) != 0) {
1252 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), gShellDebug1HiiHandle);
1253 }
1254
1255 if (BIT (Chara, 20) != 0) {
1256 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), gShellDebug1HiiHandle);
1257 }
1258
1259 if (BIT (Chara, 21) != 0) {
1260 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), gShellDebug1HiiHandle);
1261 }
1262
1263 if (BIT (Chara, 22) != 0) {
1264 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), gShellDebug1HiiHandle);
1265 }
1266
1267 if (BIT (Chara, 23) != 0) {
1268 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), gShellDebug1HiiHandle);
1269 }
1270
1271 if (BIT (Chara, 24) != 0) {
1272 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), gShellDebug1HiiHandle);
1273 }
1274
1275 if (BIT (Chara, 25) != 0) {
1276 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), gShellDebug1HiiHandle);
1277 }
1278
1279 if (BIT (Chara, 26) != 0) {
1280 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), gShellDebug1HiiHandle);
1281 }
1282
1283 if (BIT (Chara, 27) != 0) {
1284 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), gShellDebug1HiiHandle);
1285 }
1286
1287 if (BIT (Chara, 28) != 0) {
1288 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), gShellDebug1HiiHandle);
1289 }
1290
1291 if (BIT (Chara, 29) != 0) {
1292 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), gShellDebug1HiiHandle);
1293 }
1294
1295 if (BIT (Chara, 30) != 0) {
1296 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), gShellDebug1HiiHandle);
1297 }
1298
1299 if (BIT (Chara, 31) != 0) {
1300 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), gShellDebug1HiiHandle);
1301 }
1302 //
1303 // Just print the Reserved
1304 //
1305 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), gShellDebug1HiiHandle);
1306 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), gShellDebug1HiiHandle);
1307 }
1308
1309 /**
1310 Display Bios Characteristice extensions1 information.
1311
1312 @param[in] Byte1 The information.
1313 @param[in] Option The optional information.
1314 **/
1315 VOID
1316 DisplayBiosCharacteristicsExt1 (
1317 IN UINT8 Byte1,
1318 IN UINT8 Option
1319 )
1320 {
1321 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), gShellDebug1HiiHandle);
1322 //
1323 // Print option
1324 //
1325 PRINT_INFO_OPTION (Byte1, Option);
1326
1327 //
1328 // check bit and print
1329 //
1330 if (BIT (Byte1, 0) != 0) {
1331 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), gShellDebug1HiiHandle);
1332 }
1333
1334 if (BIT (Byte1, 1) != 0) {
1335 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), gShellDebug1HiiHandle);
1336 }
1337
1338 if (BIT (Byte1, 2) != 0) {
1339 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), gShellDebug1HiiHandle);
1340 }
1341
1342 if (BIT (Byte1, 3) != 0) {
1343 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1344 }
1345
1346 if (BIT (Byte1, 4) != 0) {
1347 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1348 }
1349
1350 if (BIT (Byte1, 5) != 0) {
1351 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), gShellDebug1HiiHandle);
1352 }
1353
1354 if (BIT (Byte1, 6) != 0) {
1355 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), gShellDebug1HiiHandle);
1356 }
1357
1358 if (BIT (Byte1, 7) != 0) {
1359 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), gShellDebug1HiiHandle);
1360 }
1361 }
1362
1363 /**
1364 Display Bios Characteristice extensions2 information.
1365
1366 @param[in] byte2 The information.
1367 @param[in] Option The optional information.
1368 **/
1369 VOID
1370 DisplayBiosCharacteristicsExt2 (
1371 IN UINT8 byte2,
1372 IN UINT8 Option
1373 )
1374 {
1375 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), gShellDebug1HiiHandle);
1376 //
1377 // Print option
1378 //
1379 PRINT_INFO_OPTION (byte2, Option);
1380
1381 if (BIT (byte2, 0) != 0) {
1382 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_BOOT_SPEC_SUPP), gShellDebug1HiiHandle);
1383 }
1384
1385 if (BIT (byte2, 1) != 0) {
1386 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FUNCTION_KEY_INIT), gShellDebug1HiiHandle);
1387 }
1388
1389 if (AE_SMBIOS_VERSION (0x2, 0x4)) {
1390 if (BIT (byte2, 2) != 0) {
1391 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLE_TAR_CONT_DIST), gShellDebug1HiiHandle);
1392 }
1393 if (AE_SMBIOS_VERSION (0x2, 0x7)) {
1394 if (BIT (byte2, 3) != 0) {
1395 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UEFI_SPEC_SUPPORT), gShellDebug1HiiHandle);
1396 }
1397 if (BIT (byte2, 4) != 0) {
1398 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VIRTUAL_MACHINE), gShellDebug1HiiHandle);
1399 }
1400 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 5);
1401 } else {
1402 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 3);
1403 }
1404 } else {
1405 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gShellDebug1HiiHandle, 2);
1406 }
1407 }
1408
1409 /**
1410 Display Processor Information (Type 4) information.
1411
1412 @param[in] Family The family value.
1413 @param[in] Option The option value.
1414 **/
1415 VOID
1416 DisplayProcessorFamily (
1417 UINT8 Family,
1418 UINT8 Option
1419 )
1420 {
1421 //
1422 // Print prompt message
1423 //
1424 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gShellDebug1HiiHandle);
1425 //
1426 // Print option
1427 //
1428 PRINT_INFO_OPTION (Family, Option);
1429
1430 //
1431 // Use switch to check
1432 //
1433 switch (Family) {
1434 case 0x01:
1435 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER), gShellDebug1HiiHandle);
1436 break;
1437
1438 case 0x02:
1439 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
1440 break;
1441
1442 case 0x03:
1443 Print (L"8086\n");
1444 break;
1445
1446 case 0x04:
1447 Print (L"80286\n");
1448 break;
1449
1450 case 0x05:
1451 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL386_PROCESSOR), gShellDebug1HiiHandle);
1452 break;
1453
1454 case 0x06:
1455 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL486_PROCESSOR), gShellDebug1HiiHandle);
1456 break;
1457
1458 case 0x07:
1459 Print (L"8087\n");
1460 break;
1461
1462 case 0x08:
1463 Print (L"80287\n");
1464 break;
1465
1466 case 0x09:
1467 Print (L"80387\n");
1468 break;
1469
1470 case 0x0A:
1471 Print (L"80487\n");
1472 break;
1473
1474 case 0x0B:
1475 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_FAMILY), gShellDebug1HiiHandle);
1476 break;
1477
1478 case 0x0C:
1479 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PRO_PROC), gShellDebug1HiiHandle);
1480 break;
1481
1482 case 0x0D:
1483 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_II_PROC), gShellDebug1HiiHandle);
1484 break;
1485
1486 case 0x0E:
1487 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_MMX), gShellDebug1HiiHandle);
1488 break;
1489
1490 case 0x0F:
1491 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CELERON_PROC), gShellDebug1HiiHandle);
1492 break;
1493
1494 case 0x10:
1495 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_XEON_PROC), gShellDebug1HiiHandle);
1496 break;
1497
1498 case 0x11:
1499 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_PROC), gShellDebug1HiiHandle);
1500 break;
1501
1502 case 0x12:
1503 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_M1_FAMILY), gShellDebug1HiiHandle);
1504 break;
1505
1506 case 0x13:
1507 Print (L"M2 Family\n");
1508 break;
1509
1510 case 0x14:
1511 Print (L"Intel Celeron M\n");
1512 break;
1513
1514 case 0x15:
1515 Print (L"Intel Pentium 4 HT\n");
1516 break;
1517
1518 case 0x18:
1519 Print (L"AMD Duron\n");
1520 break;
1521
1522 case 0x19:
1523 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_K5_FAMILY), gShellDebug1HiiHandle);
1524 break;
1525
1526 case 0x1A:
1527 Print (L"K6 Family\n");
1528 break;
1529
1530 case 0x1B:
1531 Print (L"K6-2\n");
1532 break;
1533
1534 case 0x1C:
1535 Print (L"K6-3\n");
1536 break;
1537
1538 case 0x1D:
1539 Print (L"AMD Althon Processor Family\n");
1540 break;
1541
1542 case 0x1E:
1543 Print (L"AMD 29000 Family\n");
1544 break;
1545
1546 case 0x1F:
1547 Print (L"K6-2+\n");
1548 break;
1549
1550 case 0x20:
1551 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_FAMILY), gShellDebug1HiiHandle);
1552 break;
1553
1554 case 0x21:
1555 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_601), gShellDebug1HiiHandle);
1556 break;
1557
1558 case 0x22:
1559 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603), gShellDebug1HiiHandle);
1560 break;
1561
1562 case 0x23:
1563 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603_PLUS), gShellDebug1HiiHandle);
1564 break;
1565
1566 case 0x24:
1567 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_604), gShellDebug1HiiHandle);
1568 break;
1569
1570 case 0x25:
1571 Print (L"Power PC 620\n");
1572 break;
1573
1574 case 0x26:
1575 Print (L"Power PC 704\n");
1576 break;
1577
1578 case 0x27:
1579 Print (L"Power PC 750\n");
1580 break;
1581
1582 case 0x28:
1583 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_DUO), gShellDebug1HiiHandle);
1584 break;
1585
1586 case 0x29:
1587 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_DUO_MOBILE), gShellDebug1HiiHandle);
1588 break;
1589
1590 case 0x2A:
1591 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_SOLO_MOBILE), gShellDebug1HiiHandle);
1592 break;
1593
1594 case 0x2B:
1595 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_ATOM), gShellDebug1HiiHandle);
1596 break;
1597
1598 case 0x2C:
1599 Print (L"Intel(R) Core(TM) M processor\n");
1600 break;
1601
1602 case 0x2D:
1603 Print (L"Intel(R) Core(TM) m3 processor\n");
1604 break;
1605
1606 case 0x2E:
1607 Print (L"Intel(R) Core(TM) m5 processor\n");
1608 break;
1609
1610 case 0x2F:
1611 Print (L"Intel(R) Core(TM) m7 processor\n");
1612 break;
1613
1614 case 0x30:
1615 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ALPHA_FAMILY_2), gShellDebug1HiiHandle);
1616 break;
1617
1618 case 0x31:
1619 Print (L"Alpha 21064\n");
1620 break;
1621
1622 case 0x32:
1623 Print (L"Alpha 21066\n");
1624 break;
1625
1626 case 0x33:
1627 Print (L"Alpha 21164\n");
1628 break;
1629
1630 case 0x34:
1631 Print (L"Alpha 21164PC\n");
1632 break;
1633
1634 case 0x35:
1635 Print (L"Alpha 21164a\n");
1636 break;
1637
1638 case 0x36:
1639 Print (L"Alpha 21264\n");
1640 break;
1641
1642 case 0x37:
1643 Print (L"Alpha 21364\n");
1644 break;
1645
1646 case 0x38:
1647 Print (L"AMD Turion II Ultra Dual-Core Mobile M Processor Family\n");
1648 break;
1649
1650 case 0x39:
1651 Print (L"AMD Turion II Dual-Core Mobile M Processor Family\n");
1652 break;
1653
1654 case 0x3A:
1655 Print (L"AMD Althon II Dual-Core M Processor Family\n");
1656 break;
1657
1658 case 0x3B:
1659 Print (L"AMD Opteron 6100 Series Processor\n");
1660 break;
1661
1662 case 0x3C:
1663 Print (L"AMD Opteron 4100 Series Processor\n");
1664 break;
1665
1666 case 0x3D:
1667 Print (L"AMD Opteron 6200 Series Processor\n");
1668 break;
1669
1670 case 0x3E:
1671 Print (L"AMD Opteron 4200 Series Processor\n");
1672 break;
1673
1674 case 0x3F:
1675 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_FX_SERIES), gShellDebug1HiiHandle);
1676 break;
1677
1678 case 0x40:
1679 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MIPS_FAMILY), gShellDebug1HiiHandle);
1680 break;
1681
1682 case 0x41:
1683 Print (L"MIPS R4000\n");
1684 break;
1685
1686 case 0x42:
1687 Print (L"MIPS R4200\n");
1688 break;
1689
1690 case 0x43:
1691 Print (L"MIPS R4400\n");
1692 break;
1693
1694 case 0x44:
1695 Print (L"MIPS R4600\n");
1696 break;
1697
1698 case 0x45:
1699 Print (L"MIPS R10000\n");
1700 break;
1701
1702 case 0x46:
1703 Print (L"AMD C-Series Processor\n");
1704 break;
1705
1706 case 0x47:
1707 Print (L"AMD E-Series Processor\n");
1708 break;
1709
1710 case 0x48:
1711 Print (L"AMD A-Series Processor\n");
1712 break;
1713
1714 case 0x49:
1715 Print (L"AMD G-Series Processor\n");
1716 break;
1717
1718 case 0x4A:
1719 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_Z_SERIES), gShellDebug1HiiHandle);
1720 break;
1721
1722 case 0x4B:
1723 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_R_SERIES), gShellDebug1HiiHandle);
1724 break;
1725
1726 case 0x4C:
1727 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_4300_SERIES), gShellDebug1HiiHandle);
1728 break;
1729
1730 case 0x4D:
1731 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_6300_SERIES), gShellDebug1HiiHandle);
1732 break;
1733
1734 case 0x4E:
1735 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_3300_SERIES), gShellDebug1HiiHandle);
1736 break;
1737
1738 case 0x4F:
1739 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_FIREPRO_SERIES), gShellDebug1HiiHandle);
1740 break;
1741
1742 case 0x50:
1743 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SPARC_FAMILY), gShellDebug1HiiHandle);
1744 break;
1745
1746 case 0x51:
1747 Print (L"SuperSparc\n");
1748 break;
1749
1750 case 0x52:
1751 Print (L"microSparc II\n");
1752 break;
1753
1754 case 0x53:
1755 Print (L"microSparc IIep\n");
1756 break;
1757
1758 case 0x54:
1759 Print (L"UltraSparc\n");
1760 break;
1761
1762 case 0x55:
1763 Print (L"UltraSparc II\n");
1764 break;
1765
1766 case 0x56:
1767 Print (L"UltraSparcIIi\n");
1768 break;
1769
1770 case 0x57:
1771 Print (L"UltraSparcIII\n");
1772 break;
1773
1774 case 0x58:
1775 Print (L"UltraSparcIIIi\n");
1776 break;
1777
1778 case 0x60:
1779 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_68040_FAMILY), gShellDebug1HiiHandle);
1780 break;
1781
1782 case 0x61:
1783 Print (L"68xx\n");
1784 break;
1785
1786 case 0x62:
1787 Print (L"68000\n");
1788 break;
1789
1790 case 0x63:
1791 Print (L"68010\n");
1792 break;
1793
1794 case 0x64:
1795 Print (L"68020\n");
1796 break;
1797
1798 case 0x65:
1799 Print (L"68030\n");
1800 break;
1801
1802 case 0x66:
1803 Print (L"AMD Athlon(TM) X4 Quad-Core Processor Family\n");
1804 break;
1805
1806 case 0x67:
1807 Print (L"AMD Opteron(TM) X1000 Series Processor\n");
1808 break;
1809
1810 case 0x68:
1811 Print (L"AMD Opteron(TM) X2000 Series APU\n");
1812 break;
1813
1814 case 0x69:
1815 Print (L"AMD Opteron(TM) A-Series Processor\n");
1816 break;
1817
1818 case 0x6A:
1819 Print (L"AMD Opteron(TM) X3000 Series APU\n");
1820 break;
1821
1822 case 0x6B:
1823 Print (L"AMD Zen Processor Family\n");
1824 break;
1825
1826 case 0x70:
1827 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle);
1828 break;
1829
1830 case 0x78:
1831 Print (L"Crusoe TM5000\n");
1832 break;
1833
1834 case 0x79:
1835 Print (L"Crusoe TM3000\n");
1836 break;
1837
1838 case 0x7A:
1839 Print (L"Efficeon TM8000\n");
1840 break;
1841
1842 case 0x80:
1843 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WEITEK), gShellDebug1HiiHandle);
1844 break;
1845
1846 case 0x82:
1847 Print (L"Itanium\n");
1848 break;
1849
1850 case 0x83:
1851 Print (L"AMD Athlon64\n");
1852 break;
1853
1854 case 0x84:
1855 Print (L"AMD Opteron\n");
1856 break;
1857
1858 case 0x85:
1859 Print (L"AMD Sempron\n");
1860 break;
1861
1862 case 0x86:
1863 Print (L"AMD Turion64 Mobile\n");
1864 break;
1865
1866 case 0x87:
1867 Print (L"Dual-Core AMD Opteron\n");
1868 break;
1869
1870 case 0x88:
1871 Print (L"AMD Athlon 64X2 DualCore\n");
1872 break;
1873
1874 case 0x89:
1875 Print (L"AMD Turion 64X2 Mobile\n");
1876 break;
1877
1878 case 0x8A:
1879 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_QUAD_CORE), gShellDebug1HiiHandle);
1880 break;
1881
1882 case 0x8B:
1883 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_THIRD_GENERATION), gShellDebug1HiiHandle);
1884 break;
1885
1886 case 0x8C:
1887 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_FX_QUAD_CORE), gShellDebug1HiiHandle);
1888 break;
1889
1890 case 0x8D:
1891 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_X4_QUAD_CORE), gShellDebug1HiiHandle);
1892 break;
1893
1894 case 0x8E:
1895 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_X2_DUAL_CORE), gShellDebug1HiiHandle);
1896 break;
1897
1898 case 0x8F:
1899 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_ATHLON_X2_DUAL_CORE), gShellDebug1HiiHandle);
1900 break;
1901
1902 case 0x90:
1903 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PA_RISC_FAMILY), gShellDebug1HiiHandle);
1904 break;
1905
1906 case 0x91:
1907 Print (L"PA-RISC 8500\n");
1908 break;
1909
1910 case 0x92:
1911 Print (L"PA-RISC 8000\n");
1912 break;
1913
1914 case 0x93:
1915 Print (L"PA-RISC 7300LC\n");
1916 break;
1917
1918 case 0x94:
1919 Print (L"PA-RISC 7200\n");
1920 break;
1921
1922 case 0x95:
1923 Print (L"PA-RISC 7100LC\n");
1924 break;
1925
1926 case 0x96:
1927 Print (L"PA-RISC 7100\n");
1928 break;
1929
1930 case 0xA0:
1931 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_V30_FAMILY), gShellDebug1HiiHandle);
1932 break;
1933
1934 case 0xA1:
1935 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3200_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1936 break;
1937
1938 case 0xA2:
1939 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3000_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1940 break;
1941
1942 case 0xA3:
1943 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5300_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1944 break;
1945
1946 case 0xA4:
1947 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5100_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1948 break;
1949
1950 case 0xA5:
1951 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5000_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1952 break;
1953
1954 case 0xA6:
1955 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_LV_DUAL_CORE), gShellDebug1HiiHandle);
1956 break;
1957
1958 case 0xA7:
1959 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_ULV_DUAL_CORE), gShellDebug1HiiHandle);
1960 break;
1961
1962 case 0xA8:
1963 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7100_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1964 break;
1965
1966 case 0xA9:
1967 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5400_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1968 break;
1969
1970 case 0xAA:
1971 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_QUAD_CORE), gShellDebug1HiiHandle);
1972 break;
1973
1974 case 0xAB:
1975 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5200_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1976 break;
1977
1978 case 0xAC:
1979 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7200_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
1980 break;
1981
1982 case 0xAD:
1983 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7300_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1984 break;
1985
1986 case 0xAE:
1987 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7400_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
1988 break;
1989
1990 case 0xAF:
1991 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7400_SERIES_MULTI_CORE), gShellDebug1HiiHandle);
1992 break;
1993
1994 case 0xB0:
1995 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_XEON), gShellDebug1HiiHandle);
1996 break;
1997
1998 case 0xB1:
1999 Print (L"Pentium III Processorwith Intel SpeedStep Technology\n");
2000 break;
2001
2002 case 0xB2:
2003 Print (L"Pentium 4 processor\n");
2004 break;
2005
2006 case 0xB3:
2007 Print (L"Intel Xeon Processor\n");
2008 break;
2009
2010 case 0xB4:
2011 Print (L"AS400 Family\n");
2012 break;
2013
2014 case 0xB5:
2015 Print (L"Intel Xeon processor MP\n");
2016 break;
2017
2018 case 0xB6:
2019 Print (L"AMD Althon XP Processor Family\n");
2020 break;
2021
2022 case 0xB7:
2023 Print (L"AMD Althon MP Promcessor Family\n");
2024 break;
2025
2026 case 0xB8:
2027 Print (L"Intel Itanium 2 processor\n");
2028 break;
2029
2030 case 0xB9:
2031 Print (L"Intel Penium M processor\n");
2032 break;
2033
2034 case 0xBA:
2035 Print (L"Intel Celeron D processor\n");
2036 break;
2037
2038 case 0xBB:
2039 Print (L"Intel Pentium D processor\n");
2040 break;
2041
2042 case 0xBC:
2043 Print (L"Intel Pentium Processor Extreme Edition\n");
2044 break;
2045
2046 case 0xBD:
2047 Print (L"Intel Core Solo Processor\n");
2048 break;
2049
2050 case 0xBF:
2051 Print (L"Intel Core 2 Duo Processor\n");
2052 break;
2053
2054 case 0xC0:
2055 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_SOLO), gShellDebug1HiiHandle);
2056 break;
2057
2058 case 0xC1:
2059 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_EXTREME), gShellDebug1HiiHandle);
2060 break;
2061
2062 case 0xC2:
2063 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_QUAD), gShellDebug1HiiHandle);
2064 break;
2065
2066 case 0xC3:
2067 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_EXTREME), gShellDebug1HiiHandle);
2068 break;
2069
2070 case 0xC4:
2071 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_DUO_MOBILE), gShellDebug1HiiHandle);
2072 break;
2073
2074 case 0xC5:
2075 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE2_SOLO_MOBILE), gShellDebug1HiiHandle);
2076 break;
2077
2078 case 0xC6:
2079 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CORE_I7), gShellDebug1HiiHandle);
2080 break;
2081
2082 case 0xC7:
2083 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_CELERON_DUAL_CORE), gShellDebug1HiiHandle);
2084 break;
2085
2086 case 0xC8:
2087 Print (L"IBM 390\n");
2088 break;
2089
2090 case 0xC9:
2091 Print (L"G4\n");
2092 break;
2093
2094 case 0xCA:
2095 Print (L"G5\n");
2096 break;
2097
2098 case 0xCB:
2099 Print (L"G6\n");
2100 break;
2101
2102 case 0xCC:
2103 Print (L"zArchitecture\n");
2104 break;
2105
2106 case 0xCD:
2107 Print (L"Intel Core i5 processor\n");
2108 break;
2109
2110 case 0xCE:
2111 Print (L"Intel Core i3 processor\n");
2112 break;
2113
2114 case 0xD2:
2115 Print (L"ViaC7M\n");
2116 break;
2117
2118 case 0xD3:
2119 Print (L"ViaC7D\n");
2120 break;
2121
2122 case 0xD4:
2123 Print (L"ViaC7\n");
2124 break;
2125
2126 case 0xD5:
2127 Print (L"Eden\n");
2128 break;
2129
2130 case 0xD6:
2131 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_MULTI_CORE), gShellDebug1HiiHandle);
2132 break;
2133
2134 case 0xD7:
2135 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2136 break;
2137
2138 case 0xD8:
2139 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_3_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2140 break;
2141
2142 case 0xDA:
2143 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2144 break;
2145
2146 case 0xDB:
2147 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_5_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2148 break;
2149
2150 case 0xDD:
2151 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_DUAL_CORE), gShellDebug1HiiHandle);
2152 break;
2153
2154 case 0xDE:
2155 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_QUAD_CORE), gShellDebug1HiiHandle);
2156 break;
2157
2158 case 0xDF:
2159 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL_XEON_7_SERIES_MULTI_CORE), gShellDebug1HiiHandle);
2160 break;
2161
2162 case 0xE0:
2163 Print (L"Multi-Core Intel Xeon processor 3400 Series\n");
2164 break;
2165
2166 case 0xE4:
2167 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_OPTERON_3000_SERIES), gShellDebug1HiiHandle);
2168 break;
2169
2170 case 0xE5:
2171 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_SEMPRON_II), gShellDebug1HiiHandle);
2172 break;
2173
2174
2175 case 0xE6:
2176 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_EMBEDDED_OPTERON_QUAD_CORE), gShellDebug1HiiHandle);
2177 break;
2178
2179 case 0xE7:
2180 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_PHENOM_TRIPLE_CORE), gShellDebug1HiiHandle);
2181 break;
2182
2183 case 0xE8:
2184 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_TURION_ULTRA_DUAL_CORE_MOBILE), gShellDebug1HiiHandle);
2185 break;
2186
2187 case 0xE9:
2188 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_TURION_DUAL_CORE_MOBILE), gShellDebug1HiiHandle);
2189 break;
2190
2191 case 0xEA:
2192 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_ATHLON_DUAL_CORE), gShellDebug1HiiHandle);
2193 break;
2194
2195 case 0xEB:
2196 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AMD_SEMPRON_SI), gShellDebug1HiiHandle);
2197 break;
2198
2199 case 0xEC:
2200 Print (L"AMD Phenom II Processor Family\n");
2201 break;
2202
2203 case 0xED:
2204 Print (L"AMD Althon II Processor Family\n");
2205 break;
2206
2207 case 0xEE:
2208 Print (L"Six-Core AMD Opteron Processor Family\n");
2209 break;
2210
2211 case 0xEF:
2212 Print (L"AMD Sempron M Processor Family\n");
2213 break;
2214
2215 case 0xFA:
2216 Print (L"i860\n");
2217 break;
2218
2219 case 0xFB:
2220 Print (L"i960\n");
2221 break;
2222
2223 default:
2224 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gShellDebug1HiiHandle);
2225 }
2226 //
2227 // end switch
2228 //
2229 }
2230
2231 /**
2232 Display processor family information.
2233
2234 @param[in] Family2 The family value.
2235 @param[in] Option The option value.
2236 **/
2237 VOID
2238 DisplayProcessorFamily2 (
2239 IN UINT16 Family2,
2240 IN UINT8 Option
2241 )
2242 {
2243 //
2244 // Print prompt message
2245 //
2246 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gShellDebug1HiiHandle);
2247
2248 //
2249 // Print option
2250 //
2251 PRINT_INFO_OPTION (Family2, Option);
2252
2253 //
2254 // Use switch to check
2255 //
2256 switch (Family2) {
2257 case 0x100:
2258 Print (L"ARMv7\n");
2259 break;
2260
2261 case 0x101:
2262 Print (L"ARMv8\n");
2263 break;
2264
2265 case 0x104:
2266 Print (L"SH-3\n");
2267 break;
2268
2269 case 0x105:
2270 Print (L"SH-4\n");
2271 break;
2272
2273 case 0x118:
2274 Print (L"ARM\n");
2275 break;
2276
2277 case 0x119:
2278 Print (L"StrongARM\n");
2279 break;
2280
2281 case 0x12C:
2282 Print (L"6x86\n");
2283 break;
2284
2285 case 0x12D:
2286 Print (L"MediaGX\n");
2287 break;
2288
2289 case 0x12E:
2290 Print (L"MII\n");
2291 break;
2292
2293 case 0x140:
2294 Print (L"WinChip\n");
2295 break;
2296
2297 case 0x15E:
2298 Print (L"DSP\n");
2299 break;
2300
2301 case 0x1F4:
2302 Print (L"Video Processor\n");
2303 break;
2304
2305 default:
2306 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gShellDebug1HiiHandle);
2307 }
2308
2309 }
2310
2311 /**
2312 Display processor voltage information.
2313
2314 @param[in] Voltage The Voltage.
2315 Bit 7 Set to 0, indicating 'legacy' mode for processor voltage
2316 Bits 6:4 Reserved, must be zero
2317 Bits 3:0 Voltage Capability.
2318 A Set bit indicates that the voltage is supported.
2319 Bit 0 - 5V
2320 Bit 1 - 3.3V
2321 Bit 2 - 2.9V
2322 Bit 3 - Reserved, must be zero.
2323
2324 Note:
2325 Setting of multiple bits indicates the socket is configurable
2326 If bit 7 is set to 1, the remaining seven bits of the field are set to
2327 contain the processor's current voltage times 10.
2328 For example, the field value for a processor voltage of 1.8 volts would be
2329 92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.
2330
2331 @param[in] Option The option.
2332 **/
2333 VOID
2334 DisplayProcessorVoltage (
2335 IN UINT8 Voltage,
2336 IN UINT8 Option
2337 )
2338 {
2339 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), gShellDebug1HiiHandle);
2340 //
2341 // Print option
2342 //
2343 PRINT_INFO_OPTION (Voltage, Option);
2344
2345 if (BIT (Voltage, 7) != 0) {
2346 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_CURRENT_VOLTAGE), gShellDebug1HiiHandle, (Voltage - 0x80));
2347 } else {
2348 if (BIT (Voltage, 0) != 0) {
2349 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_5V_SUPOPRTED), gShellDebug1HiiHandle);
2350 }
2351
2352 if (BIT (Voltage, 1) != 0) {
2353 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_33V_SUPPORTED), gShellDebug1HiiHandle);
2354 }
2355
2356 if (BIT (Voltage, 2) != 0) {
2357 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_29V_SUPPORTED), gShellDebug1HiiHandle);
2358 }
2359 //
2360 // check the reserved zero bits:
2361 //
2362 if (BIT (Voltage, 3) != 0) {
2363 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), gShellDebug1HiiHandle);
2364 }
2365
2366 if (BIT (Voltage, 4) != 0) {
2367 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2368 }
2369
2370 if (BIT (Voltage, 5) != 0) {
2371 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), gShellDebug1HiiHandle);
2372 }
2373
2374 if (BIT (Voltage, 6) != 0) {
2375 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT6_NOT_ZERO), gShellDebug1HiiHandle);
2376 }
2377 }
2378 }
2379
2380 /**
2381 Display processor information.
2382
2383 @param[in] Status The status.
2384 Bit 7 Reserved, must be 0
2385 Bit 6 CPU Socket Populated
2386 1 - CPU Socket Populated
2387 0 - CPU Socket Unpopulated
2388 Bits 5:3 Reserved, must be zero
2389 Bits 2:0 CPU Status
2390 0h - Unknown
2391 1h - CPU Enabled
2392 2h - CPU Disabled by User via BIOS Setup
2393 3h - CPU Disabled By BIOS (POST Error)
2394 4h - CPU is Idle, waiting to be enabled.
2395 5-6h - Reserved
2396 7h - Other
2397
2398 @param[in] Option The option
2399 **/
2400 VOID
2401 DisplayProcessorStatus (
2402 IN UINT8 Status,
2403 IN UINT8 Option
2404 )
2405 {
2406 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), gShellDebug1HiiHandle);
2407 PRINT_INFO_OPTION (Status, Option);
2408
2409 if (BIT (Status, 7) != 0) {
2410 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT7_NOT_ZERO), gShellDebug1HiiHandle);
2411 } else if (BIT (Status, 5) != 0) {
2412 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), gShellDebug1HiiHandle);
2413 } else if (BIT (Status, 4) != 0) {
2414 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2415 } else if (BIT (Status, 3) != 0) {
2416 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), gShellDebug1HiiHandle);
2417 }
2418 //
2419 // Check BIT 6
2420 //
2421 if (BIT (Status, 6) != 0) {
2422 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_POPULATED), gShellDebug1HiiHandle);
2423 } else {
2424 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED), gShellDebug1HiiHandle);
2425 }
2426 //
2427 // Check BITs 2:0
2428 //
2429 switch (Status & 0x07) {
2430 case 0:
2431 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2432 break;
2433
2434 case 1:
2435 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_ENABLED), gShellDebug1HiiHandle);
2436 break;
2437
2438 case 2:
2439 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DISABLED_BY_USER), gShellDebug1HiiHandle);
2440 break;
2441
2442 case 3:
2443 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DIABLED_BY_BIOS), gShellDebug1HiiHandle);
2444 break;
2445
2446 case 4:
2447 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_IDLE), gShellDebug1HiiHandle);
2448 break;
2449
2450 case 7:
2451 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHERS), gShellDebug1HiiHandle);
2452 break;
2453
2454 default:
2455 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2456 }
2457 }
2458
2459 /**
2460 Display information about Memory Controller Information (Type 5).
2461
2462 @param[in] Size Memory size.
2463 @param[in] SlotNum Which slot is this about.
2464 @param[in] Option Option for the level of detail output required.
2465 **/
2466 VOID
2467 DisplayMaxMemoryModuleSize (
2468 IN UINT8 Size,
2469 IN UINT8 SlotNum,
2470 IN UINT8 Option
2471 )
2472 {
2473 UINTN MaxSize;
2474 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE_LARGEST_MEM), gShellDebug1HiiHandle);
2475 //
2476 // MaxSize is determined by follow formula
2477 //
2478 MaxSize = (UINTN) 1 << Size;
2479 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gShellDebug1HiiHandle, MaxSize);
2480
2481 if (Option >= SHOW_DETAIL) {
2482 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_AMOUNT_MEM), gShellDebug1HiiHandle);
2483 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gShellDebug1HiiHandle, MaxSize, SlotNum, MaxSize * SlotNum);
2484 }
2485 }
2486
2487 /**
2488 Display information about memory configuration handles.
2489
2490 @param[in] Handles The buffer of handles to output info on.
2491 @param[in] SlotNum The number of handles in the above buffer.
2492 @param[in] Option Option for the level of detail output required.
2493 **/
2494 VOID
2495 DisplayMemoryModuleConfigHandles (
2496 IN UINT16 *Handles,
2497 IN UINT8 SlotNum,
2498 IN UINT8 Option
2499 )
2500 {
2501 UINT8 Index;
2502 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_CONTROLLED), gShellDebug1HiiHandle, SlotNum);
2503
2504 if (Option >= SHOW_DETAIL) {
2505 //
2506 // No handle, Handles is INVALID.
2507 //
2508 if (SlotNum == 0) {
2509 return ;
2510 }
2511
2512 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_LIST_CONTROLLED), gShellDebug1HiiHandle);
2513 for (Index = 0; Index < SlotNum; Index++) {
2514 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLE), gShellDebug1HiiHandle, Index + 1, Handles[Index]);
2515 }
2516 }
2517 }
2518
2519 /**
2520 Display Memory Module Information (Type 6).
2521
2522 @param[in] BankConnections
2523 @param[in] Option
2524 **/
2525 VOID
2526 DisplayMmBankConnections (
2527 IN UINT8 BankConnections,
2528 IN UINT8 Option
2529 )
2530 {
2531 UINT8 High;
2532 UINT8 Low;
2533
2534 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_CONNECTIONS), gShellDebug1HiiHandle);
2535 //
2536 // Print option
2537 //
2538 PRINT_INFO_OPTION (BankConnections, Option);
2539
2540 //
2541 // Divide it to high and low
2542 //
2543 High = (UINT8) (BankConnections & 0xF0);
2544 Low = (UINT8) (BankConnections & 0x0F);
2545 if (High != 0xF) {
2546 if (Low != 0xF) {
2547 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS), gShellDebug1HiiHandle, High, Low, High, Low);
2548 } else {
2549 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gShellDebug1HiiHandle, High, High);
2550 }
2551 } else {
2552 if (Low != 0xF) {
2553 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gShellDebug1HiiHandle, Low, Low);
2554 } else {
2555 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BANKS_CONNECTED), gShellDebug1HiiHandle);
2556 }
2557 }
2558 }
2559
2560 /**
2561 Display memory informcation.
2562
2563 Bits 0:6 Size (n),
2564 where 2**n is the size in MB with three special-case values:
2565 7Dh Not determinable (Installed Size only)
2566 7Eh Module is installed, but no memory has been enabled
2567 7Fh Not installed
2568 Bit 7 Defines whether the memory module has a single- (0)
2569 or double-bank (1) connection.
2570
2571 @param[in] Size - The size
2572 @param[in] Option - The option
2573 **/
2574 VOID
2575 DisplayMmMemorySize (
2576 IN UINT8 Size,
2577 IN UINT8 Option
2578 )
2579 {
2580 UINT8 Value;
2581 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), gShellDebug1HiiHandle);
2582 //
2583 // Print option
2584 //
2585 PRINT_INFO_OPTION (Size, Option);
2586
2587 //
2588 // Get the low bits(0-6 bit)
2589 //
2590 Value = (UINT8) (Size & 0x7F);
2591 if (Value == 0x7D) {
2592 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE_NOT_DETERMINABLE), gShellDebug1HiiHandle);
2593 } else if (Value == 0x7E) {
2594 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MODULE_INSTALLED), gShellDebug1HiiHandle);
2595 } else if (Value == 0x7F) {
2596 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_INSTALLED), gShellDebug1HiiHandle);
2597 } else {
2598 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE), gShellDebug1HiiHandle, 1 << Value);
2599 }
2600
2601 if (BIT (Size, 7) != 0) {
2602 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK), gShellDebug1HiiHandle);
2603 } else {
2604 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK), gShellDebug1HiiHandle);
2605 }
2606 }
2607
2608 /**
2609 Display Cache Configuration.
2610
2611 @param[in] CacheConfiguration Cache Configuration.
2612 Bits 15:10 Reserved, must be 0
2613 Bits 9:8 Operational Mode
2614 0h - Write Through
2615 1h - Write Back
2616 2h - Varies with Memory Address
2617 3h - Unknown
2618 Bit 7 Enabled/Disabled
2619 1 - Enabled
2620 0 - Disabled
2621 Bits 6:5 Location
2622 0h - Internal
2623 1h - External
2624 2h - Reserved
2625 3h - Unknown
2626 Bit 4 Reserved, must be zero
2627 Bit 3 Cache Socketed
2628 1 - Socketed
2629 0 - Unsocketed
2630 Bits 2:0 Cache Level
2631 1 through 8 (For example, an L1 cache would
2632 use value 000b and an L3 cache would use 010b.)
2633
2634 @param[in] Option The option
2635 **/
2636 VOID
2637 DisplayCacheConfiguration (
2638 IN UINT16 CacheConfiguration,
2639 IN UINT8 Option
2640 )
2641 {
2642 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_CONFIGURATION), gShellDebug1HiiHandle);
2643 PRINT_INFO_OPTION (CacheConfiguration, Option);
2644
2645 if (BIT (CacheConfiguration, 15) != 0) {
2646 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT15_NOT_ZERO), gShellDebug1HiiHandle);
2647 } else if (BIT (CacheConfiguration, 14) != 0) {
2648 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT14_NOT_ZERO), gShellDebug1HiiHandle);
2649 } else if (BIT (CacheConfiguration, 13) != 0) {
2650 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT13_NOT_ZERO), gShellDebug1HiiHandle);
2651 } else if (BIT (CacheConfiguration, 12) != 0) {
2652 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT12_NOT_ZERO), gShellDebug1HiiHandle);
2653 } else if (BIT (CacheConfiguration, 11) != 0) {
2654 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT11_NOT_ZERO), gShellDebug1HiiHandle);
2655 } else if (BIT (CacheConfiguration, 10) != 0) {
2656 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT10_NOT_ZERO), gShellDebug1HiiHandle);
2657 } else if (BIT (CacheConfiguration, 4) != 0) {
2658 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gShellDebug1HiiHandle);
2659 }
2660
2661 //
2662 // Check BITs 9:8
2663 //
2664 switch ((CacheConfiguration & 0x300) >> 8) {
2665 case 0:
2666 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_WRITE_THROUGH), gShellDebug1HiiHandle);
2667 break;
2668
2669 case 1:
2670 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_WRITE_BACK), gShellDebug1HiiHandle);
2671 break;
2672
2673 case 2:
2674 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_VARIES_WITH_MEM_ADDR), gShellDebug1HiiHandle);
2675 break;
2676
2677 case 3:
2678 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2679 break;
2680 }
2681
2682 //
2683 // Check BIT 7
2684 //
2685 if (BIT (CacheConfiguration, 7) != 0) {
2686 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gShellDebug1HiiHandle);
2687 } else {
2688 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gShellDebug1HiiHandle);
2689 }
2690
2691 //
2692 // Check BITs 6:5
2693 //
2694 switch ((CacheConfiguration & 0x60) >> 5) {
2695 case 0:
2696 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_INTERNAL), gShellDebug1HiiHandle);
2697 break;
2698
2699 case 1:
2700 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_EXTERNAL), gShellDebug1HiiHandle);
2701 break;
2702
2703 case 2:
2704 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gShellDebug1HiiHandle);
2705 break;
2706
2707 case 3:
2708 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gShellDebug1HiiHandle);
2709 break;
2710 }
2711
2712 //
2713 // Check BIT 3
2714 //
2715 if (BIT (CacheConfiguration, 3) != 0) {
2716 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_SOCKETED), gShellDebug1HiiHandle);
2717 } else {
2718 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CACHE_NOT_SOCKETED), gShellDebug1HiiHandle);
2719 }
2720
2721