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