2 Build a table, each item is (Key, Info) pair.
3 And give a interface of query a string out of a table.
5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "../UefiShellDebug1CommandsLib.h"
17 #include "QueryTable.h"
18 #include "PrintInfo.h"
20 TABLE_ITEM SystemWakeupTypeTable
[] = {
55 TABLE_ITEM SystemEnclosureTypeTable
[] = {
70 L
" Low Profile Desktop"
118 L
" Main Server Chassis"
122 L
" Expansion Chassis"
134 L
" Bus Expansion Chassis"
138 L
" Peripheral Chassis"
146 L
" Rack Mount Chassis"
154 L
" Multi-system Chassis"
174 TABLE_ITEM SystemEnclosureStatusTable
[] = {
201 TABLE_ITEM SESecurityStatusTable
[] = {
216 L
" External interface locked out"
220 L
" External interface enabled"
224 TABLE_ITEM ProcessorTypeTable
[] = {
235 L
" Central Processor"
251 TABLE_ITEM ProcessorUpgradeTable
[] = {
270 L
"Replaceable Piggy Back"
354 TABLE_ITEM McErrorDetectMethodTable
[] = {
389 TABLE_ITEM McErrorCorrectCapabilityTable
[] = {
404 L
"Single Bit Error Correcting"
408 L
"Double Bit Error Correcting"
416 TABLE_ITEM McInterleaveSupportTable
[] = {
427 L
"One Way Interleave"
431 L
"Two Way Interleave"
435 L
"Four Way Interleave"
439 L
"Eight Way Interleave"
443 L
"Sixteen Way Interleave"
447 TABLE_ITEM McMemorySpeedsTable
[] = {
470 TABLE_ITEM MemoryModuleVoltageTable
[] = {
485 TABLE_ITEM MmMemoryTypeTable
[] = {
532 TABLE_ITEM MmErrorStatusTable
[] = {
535 L
" Uncorrectable errors received"
539 L
" Correctable errors received"
543 L
" Error Status obtained from the event log"
547 TABLE_ITEM CacheSRAMTypeTable
[] = {
578 TABLE_ITEM CacheErrCorrectingTypeTable
[] = {
605 L
"Sixteen Way Interleave"
609 TABLE_ITEM CacheSystemCacheTypeTable
[] = {
632 TABLE_ITEM CacheAssociativityTable
[] = {
647 L
"2-way Set-Associative"
651 L
"4-way Set-Associative"
659 L
"8-way Set-Associative"
663 L
"16-way Set-Associative"
667 L
"12-way Set-Associative"
671 L
"24-way Set-Associative"
675 L
"32-way Set-Associative"
679 L
"48-way Set-Associative"
683 L
"64-way Set-Associative"
687 TABLE_ITEM PortConnectorTypeTable
[] = {
770 L
"Circular DIN-8 male"
774 L
"Circular DIN-8 female"
786 L
"9 Pin Dual Inline (pin 10 cut)"
790 L
"25 Pin Dual Inline (pin 26 cut)"
794 L
"50 Pin Dual Inline"
798 L
"68 Pin Dual Inline"
802 L
"On Board Sound Input from CD-ROM"
806 L
"Mini-Centronics Type-14"
810 L
"Mini-Centronics Type-26"
814 L
"Mini-jack (headphones)"
826 L
"SAS/SATA Plug Receptacle"
854 TABLE_ITEM PortTypeTable
[] = {
861 L
"Parallel Port XT/AT Compatible"
865 L
"Parallel Port PS/2"
877 L
"Parallel Port ECP/EPP"
881 L
"Serial Port XT/AT Compatible"
885 L
"Serial Port 16450 Compatible"
889 L
"Serial Port 16550 Compatible"
893 L
"Serial Port 16550A Compatible"
925 L
"FireWire (IEEE P1394)"
997 L
"8251 FIFO Compatible"
1005 TABLE_ITEM SystemSlotTypeTable
[] = {
1044 L
"Processor Card Slot"
1048 L
"Proprietary Memory Card Slot"
1052 L
"I/O Riser Card Slot"
1060 L
"PCI - 66MHz Capable"
1124 L
"PCI Express Gen 26"
1128 L
"PCI Express Gen 2 X1"
1132 L
"PCI Express Gen 2 X2"
1136 L
"PCI Express Gen 2 X4"
1140 L
"PCI Express Gen 2 X8"
1144 L
"PCI Express Gen 2 X16"
1148 TABLE_ITEM SystemSlotDataBusWidthTable
[] = {
1179 TABLE_ITEM SystemSlotCurrentUsageTable
[] = {
1198 TABLE_ITEM SystemSlotLengthTable
[] = {
1217 TABLE_ITEM SlotCharacteristics1Table
[] = {
1220 L
" Characteristics Unknown"
1224 L
" Provides 5.0 Volts"
1228 L
" Provides 3.3 Volts"
1232 L
" Slot's opening is shared with another slot, e.g. PCI/EISA shared slot."
1237 L
" PC Card slot supports PC Card-16"
1241 L
" PC Card slot supports CardBus"
1245 L
" PC Card slot supports Zoom Video "
1249 L
" PC Card slot supports Modem Ring Resume "
1253 TABLE_ITEM SlotCharacteristics2Table
[] = {
1256 L
" PCI slot supports Power Management Enable (PME#) signal"
1260 L
" Slot supports hot-plug devices"
1264 L
" PCI slot supports SMBus signal"
1268 TABLE_ITEM OnboardDeviceTypesTable
[] = {
1311 TABLE_ITEM SELTypesTable
[] = {
1318 L
" Single-bit ECC memory error"
1322 L
" Multi-bit ECC memory error"
1326 L
" Parity memory error"
1334 L
" I/O Channel Check"
1342 L
" POST Memory Resize"
1350 L
" PCI Parity Error"
1354 L
" PCI System Error"
1362 L
" EISA FailSafe Timer time-out"
1366 L
" Correctable memory log disabled"
1370 L
" Logging disabled for a specific Event Type"
1378 L
" System Limit Exceeded"
1382 L
" Asynchronous hardware timer expired and issued a system reset"
1386 L
" System configuration information"
1390 L
" Hard-disk information"
1394 L
" System reconfigured"
1398 L
" Uncorrectable CPU-complex error"
1402 L
" Log Area Reset/Cleared"
1410 L
" Unused by SMBIOS specification"
1414 L
" System and OEM specified"
1422 TABLE_ITEM SELVarDataFormatTypeTable
[] = {
1437 L
" Multiple-Event Handle "
1441 L
" POST Results Bitmap "
1448 L
" System Management Type"
1455 L
" Multiple-Event System Management Type "
1467 TABLE_ITEM PostResultsBitmapDw1Table
[] = {
1470 L
" Channel 2 Timer error "
1474 L
" Master PIC (8259 #1) error "
1478 L
" Slave PIC (8259 #2) error "
1482 L
" CMOS Battery Failure "
1486 L
" CMOS System Options Not Set "
1490 L
" CMOS Checksum Error "
1494 L
" CMOS Configuration Error "
1498 L
" Mouse and Keyboard Swapped "
1502 L
" Keyboard Locked "
1506 L
" Keyboard Not Functional "
1510 L
" Keyboard Controller Not Functional "
1514 L
" CMOS Memory Size Different "
1518 L
" Memory Decreased in Size "
1522 L
" Cache Memory Error "
1526 L
" Floppy Drive 0 Error "
1530 L
" Floppy Drive 1 Error "
1534 L
" Floppy Controller Failure "
1538 L
" Number of ATA Drives Reduced Error "
1542 L
" CMOS Time Not Set "
1546 L
" DDC Monitor Configuration Change "
1550 L
" Reserved, set to 0 "
1554 L
" Reserved, set to 0 "
1558 L
" Reserved, set to 0 "
1562 L
" Reserved, set to 0 "
1566 L
" Second DWORD has valid data "
1570 L
" Reserved, set to 0 "
1574 L
" Reserved, set to 0 "
1578 L
" Reserved, set to 0 "
1582 L
" Normally 0; available for OEM assignment "
1586 L
" Normally 0; available for OEM assignment "
1590 L
" Normally 0; available for OEM assignment "
1594 L
" Normally 0; available for OEM assignment "
1598 TABLE_ITEM PostResultsBitmapDw2Table
[] = {
1601 L
" Normally 0; available for OEM assignment "
1605 L
" Normally 0; available for OEM assignment "
1609 L
" Normally 0; available for OEM assignment "
1613 L
" Normally 0; available for OEM assignment "
1617 L
" Normally 0; available for OEM assignment "
1621 L
" Normally 0; available for OEM assignment "
1625 L
" Normally 0; available for OEM assignment "
1629 L
" PCI Memory Conflict "
1633 L
" PCI I/O Conflict "
1637 L
" PCI IRQ Conflict "
1641 L
" PNP Memory Conflict "
1645 L
" PNP 32 bit Memory Conflict "
1649 L
" PNP I/O Conflict "
1653 L
" PNP IRQ Conflict "
1657 L
" PNP DMA Conflict "
1661 L
" Bad PNP Serial ID Checksum "
1665 L
" Bad PNP Resource Data Checksum "
1669 L
" Static Resource Conflict "
1673 L
" NVRAM Checksum Error, NVRAM Cleared "
1677 L
" System Board Device Resource Conflict "
1681 L
" Primary Output Device Not Found "
1685 L
" Primary Input Device Not Found "
1689 L
" Primary Boot Device Not Found "
1693 L
" NVRAM Cleared By Jumper "
1697 L
" NVRAM Data Invalid, NVRAM Cleared "
1701 L
" FDC Resource Conflict "
1705 L
" Primary ATA Controller Resource Conflict "
1709 L
" Secondary ATA Controller Resource Conflict "
1713 L
" Parallel Port Resource Conflict "
1717 L
" Serial Port 1 Resource Conflict "
1721 L
" Serial Port 2 Resource Conflict "
1725 L
" Audio Resource Conflict "
1729 TABLE_ITEM SELSysManagementTypesTable
[] = {
1732 L
" +2.5V Out of range, #2 "
1736 L
" +3.3V Out of range "
1740 L
" +5V Out of range "
1744 L
" -5V Out of range "
1748 L
" +12V Out of range "
1752 L
" -12V Out of range "
1756 L
" Reserved for future out-of-range voltage levels "
1760 L
" System board temperature out of range "
1764 L
" Processor #1 temperature out of range "
1768 L
" Processor #2 temperature out of range "
1772 L
" Processor #3 temperature out of range "
1776 L
" Processor #4 temperature out of range "
1780 L
" Reserved for future out-of-range temperatures"
1784 L
" Fan n (n = 0 to 7) Out of range "
1788 L
" Reserved for future assignment via this specification "
1792 L
" Chassis secure switch activated "
1796 TABLE_ITEM PMALocationTable
[] = {
1807 L
" System board or motherboard"
1815 L
" EISA add-on card"
1827 L
" PCMCIA add-on card"
1831 L
" Proprietary add-on card"
1839 L
" PC-98/C20 add-on card"
1843 L
" PC-98/C24 add-on card"
1847 L
" PC-98/E add-on card"
1851 L
" PC-98/Local bus add-on card"
1855 TABLE_ITEM PMAUseTable
[] = {
1878 L
" Non-volatile RAM"
1886 TABLE_ITEM PMAErrorCorrectionTypesTable
[] = {
1917 TABLE_ITEM MemoryDeviceFormFactorTable
[] = {
1948 L
" Proprietary Card"
1980 TABLE_ITEM MemoryDeviceTypeTable
[] = {
2071 TABLE_ITEM MemoryDeviceTypeDetailTable
[] = {
2122 TABLE_ITEM MemoryErrorTypeTable
[] = {
2145 L
" Single-bit error"
2149 L
" Double-bit error"
2169 L
" Corrected single-bit error"
2177 L
" Uncorrectable error"
2181 TABLE_ITEM MemoryErrorGranularityTable
[] = {
2196 L
" Memory partition level"
2200 TABLE_ITEM MemoryErrorOperationTable
[] = {
2223 TABLE_ITEM PointingDeviceTypeTable
[] = {
2254 TABLE_ITEM PointingDeviceInterfaceTable
[] = {
2285 L
" ADB(Apple Desktop Bus"
2293 L
" Bus mouse mirco-DIN"
2301 TABLE_ITEM PBDeviceChemistryTable
[] = {
2320 L
" Nickel metal hydride "
2332 L
" Lithium Polymer "
2336 TABLE_ITEM VPLocationTable
[] = {
2359 L
" Non-recoverable "
2363 TABLE_ITEM VPStatusTable
[] = {
2386 L
" System Management Module "
2398 L
" Processor Module "
2410 TABLE_ITEM CoolingDeviceStatusTable
[] = {
2433 L
" Non-recoverable "
2437 TABLE_ITEM CoolingDeviceTypeTable
[] = {
2452 L
" Centrifugal Blower "
2464 L
" Power Supply Fan "
2472 L
" Integrated Refrigeration "
2480 L
" Passive Cooling "
2484 TABLE_ITEM TemperatureProbeStatusTable
[] = {
2507 L
" Non-recoverable "
2511 TABLE_ITEM TemperatureProbeLocTable
[] = {
2534 L
" System Management Module "
2546 L
" Processor Module "
2558 TABLE_ITEM ECPStatusTable
[] = {
2581 L
" Non-recoverable "
2585 TABLE_ITEM ECPLocTable
[] = {
2608 L
" System Management Module "
2620 L
" Processor Module "
2632 TABLE_ITEM MDTypeTable
[] = {
2643 L
" National Semiconductor LM75 "
2647 L
" National Semiconductor LM78 "
2651 L
" National Semiconductor LM79 "
2655 L
" National Semiconductor LM80 "
2659 L
" National Semiconductor LM81 "
2663 L
" Analog Devices ADM9240 "
2667 L
" Dallas Semiconductor DS1780 "
2675 L
" Genesys GL518SM "
2679 L
" Winbond W83781D "
2683 L
" Holtek HT82H791 "
2687 TABLE_ITEM MDAddressTypeTable
[] = {
2710 TABLE_ITEM MemoryChannelTypeTable
[] = {
2729 TABLE_ITEM IPMIDIBMCInterfaceTypeTable
[] = {
2736 L
" KCS: Keyboard Controller Style "
2740 L
" SMIC: Server Management Interface Chip "
2744 L
" BT: Block Transfer "
2748 L
" Reserved for future assignment by this specification "
2752 TABLE_ITEM StructureTypeInfoTable
[] = {
2755 L
" BIOS Information"
2759 L
" System Information"
2763 L
" Base Board Information"
2767 L
" System Enclosure"
2771 L
" Processor Information"
2775 L
" Memory Controller Information "
2779 L
" Memory Module Information "
2783 L
" Cache Information "
2787 L
" Port Connector Information "
2795 L
" On Board Devices Information "
2803 L
" System Configuration Options "
2807 L
" BIOS Language Information "
2811 L
" Group Associations "
2815 L
" System Event Log "
2819 L
" Physical Memory Array "
2827 L
" 32-bit Memory Error Information "
2831 L
" Memory Array Mapped Address "
2835 L
" Memory Device Mapped Address "
2839 L
" Built-in Pointing Device "
2843 L
" Portable Battery "
2851 L
" Hardware Security "
2855 L
" System Power Controls "
2867 L
" Temperature Probe "
2871 L
" Electrical Current Probe "
2875 L
" Out-of-Band Remote Access "
2879 L
" Boot Integrity Services (BIS) Entry Point"
2883 L
" System Boot Information "
2887 L
" 64-bit Memory Error Information "
2891 L
" Management Device "
2895 L
" Management Device Component "
2899 L
" Management Device Threshold Data "
2907 L
" IPMI Device Information "
2911 L
" System Power Supply"
2925 Given a table and a Key, return the responding info.
2928 Table[Index].Key is change from UINT8 to UINT16,
2929 in order to deal with "0xaa - 0xbb".
2932 DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option)
2935 Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07.
2936 Then all the Key Value between Low and High gets the same string
2939 @param[in] Table The begin address of table.
2940 @param[in] Number The number of table items.
2941 @param[in] Key The query Key.
2942 @param[in,out] Info Input as empty buffer; output as data buffer.
2943 @param[in] InfoLen The max number of characters for Info.
2945 @return the found Key and Info is valid.
2946 @retval QUERY_TABLE_UNFOUND and Info should be NULL.
2950 IN TABLE_ITEM
*Table
,
2953 IN OUT CHAR16
*Info
,
2959 // High byte and Low byte of word
2964 for (Index
= 0; Index
< Number
; Index
++) {
2965 High
= (UINT8
) (Table
[Index
].Key
>> 8);
2966 Low
= (UINT8
) (Table
[Index
].Key
& 0x00FF);
2968 // Check if Key is in the range
2970 if (High
> Low
&& Key
>= Low
&& Key
<= High
) {
2971 StrnCpy (Info
, Table
[Index
].Info
, InfoLen
-1);
2972 StrnCat (Info
, L
"\n", InfoLen
- StrLen(Info
));
2976 // Check if Key == Value in the table
2978 if (Table
[Index
].Key
== Key
) {
2979 StrnCpy (Info
, Table
[Index
].Info
, InfoLen
-1);
2980 StrnCat (Info
, L
"\n", InfoLen
- StrLen(Info
));
2985 StrnCpy (Info
, L
"Undefined Value\n", InfoLen
);
2986 return QUERY_TABLE_UNFOUND
;
2991 IN TABLE_ITEM
*Table
,
2997 Routine Description:
2998 Given a table of bit info and a Key,
2999 return the responding info to the Key.
3002 Table - Point to a table which maintains a map of 'bit' to 'message'
3003 Number - Number of table items.
3004 Bits - The Key of query the bit map information.
3012 // Get certain bit of 'Value':
3014 #define BIT(Value, bit) ((Value) & ((UINT32) 1) << (bit))
3016 // Clear certain bit of 'Value':
3018 #define CLR_BIT(Value, bit) ((Value) -= (BIT (Value, bit)))
3027 // query the table and print information
3029 for (Index
= 0; Index
< Number
; Index
++) {
3030 if (BIT (Value
, Table
[Index
].Key
) != 0) {
3031 Print (Table
[Index
].Info
);
3036 // clear the bit, for reserved bits test
3038 CLR_BIT (Value
, Table
[Index
].Key
);
3043 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_NO_INFO
), gShellDebug1HiiHandle
);
3047 ShellPrintHiiEx(-1,-1,NULL
,
3048 STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_BITS_SET
),
3049 gShellDebug1HiiHandle
,
3057 // //////////////////////////////////////////////////////////////////
3059 // Following uses QueryTable functions to simplify the coding.
3060 // QueryTable(), PrintBitsInfo()
3063 #define PRINT_TABLE_ITEM(Table, Key) \
3067 Num = sizeof (Table) / sizeof (TABLE_ITEM); \
3068 ZeroMem (Info, sizeof (Info)); \
3069 QueryTable (Table, Num, Key, Info, sizeof(Info)/sizeof(Info[0])); \
3073 #define PRINT_BITS_INFO(Table, bits) \
3076 Num = sizeof (Table) / sizeof (TABLE_ITEM); \
3077 PrintBitsInfo (Table, Num, (UINT32) bits); \
3081 ////////////////////////////////////////////////////////////////////
3083 // System Information (Type 1)
3086 DisplaySystemWakeupType (
3091 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE
), gShellDebug1HiiHandle
);
3092 PRINT_INFO_OPTION (Type
, Option
);
3093 PRINT_TABLE_ITEM (SystemWakeupTypeTable
, Type
);
3096 // System Enclosure (Type 3)
3099 DisplaySystemEnclosureType (
3104 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE
), gShellDebug1HiiHandle
);
3105 PRINT_INFO_OPTION (Type
, Option
);
3107 // query table and print info
3109 PRINT_TABLE_ITEM (SystemEnclosureTypeTable
, Type
);
3111 if (BIT (Type
, 7) != 0) {
3112 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CHASSIS_LOCK_PRESENT
), gShellDebug1HiiHandle
);
3117 DisplaySystemEnclosureStatus (
3122 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS
), gShellDebug1HiiHandle
);
3123 PRINT_INFO_OPTION (Status
, Option
);
3124 PRINT_TABLE_ITEM (SystemEnclosureStatusTable
, Status
);
3128 DisplaySESecurityStatus (
3133 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY
), gShellDebug1HiiHandle
);
3134 PRINT_INFO_OPTION (Status
, Option
);
3135 PRINT_TABLE_ITEM (SESecurityStatusTable
, Status
);
3138 // Processor Information (Type 4)
3141 DisplayProcessorType (
3146 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE
), gShellDebug1HiiHandle
);
3147 PRINT_INFO_OPTION (Type
, Option
);
3148 PRINT_TABLE_ITEM (ProcessorTypeTable
, Type
);
3152 DisplayProcessorUpgrade (
3157 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE
), gShellDebug1HiiHandle
);
3158 PRINT_INFO_OPTION (Upgrade
, Option
);
3159 PRINT_TABLE_ITEM (ProcessorUpgradeTable
, Upgrade
);
3162 // Memory Controller Information (Type 5)
3165 DisplayMcErrorDetectMethod (
3170 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD
), gShellDebug1HiiHandle
);
3171 PRINT_INFO_OPTION (Method
, Option
);
3172 PRINT_TABLE_ITEM (McErrorDetectMethodTable
, Method
);
3176 DisplayMcErrorCorrectCapability (
3181 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY
), gShellDebug1HiiHandle
);
3182 PRINT_INFO_OPTION (Capability
, Option
);
3183 PRINT_BITS_INFO (McErrorCorrectCapabilityTable
, Capability
);
3187 DisplayMcInterleaveSupport (
3192 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT
), gShellDebug1HiiHandle
);
3193 PRINT_INFO_OPTION (Support
, Option
);
3194 PRINT_TABLE_ITEM (McInterleaveSupportTable
, Support
);
3198 DisplayMcMemorySpeeds (
3203 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED
), gShellDebug1HiiHandle
);
3204 PRINT_INFO_OPTION (Speed
, Option
);
3205 PRINT_BITS_INFO (McMemorySpeedsTable
, Speed
);
3209 DisplayMemoryModuleVoltage (
3214 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES
), gShellDebug1HiiHandle
);
3215 PRINT_INFO_OPTION (Voltage
, Option
);
3216 PRINT_BITS_INFO (MemoryModuleVoltageTable
, Voltage
);
3219 // Memory Module Information (Type 6)
3222 DisplayMmMemoryType (
3227 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE
), gShellDebug1HiiHandle
);
3228 PRINT_INFO_OPTION (Type
, Option
);
3229 PRINT_BITS_INFO (MmMemoryTypeTable
, Type
);
3233 DisplayMmErrorStatus (
3238 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS
), gShellDebug1HiiHandle
);
3239 PRINT_INFO_OPTION (Status
, Option
);
3240 PRINT_BITS_INFO (MmErrorStatusTable
, Status
);
3243 // Cache Information (Type 7)
3246 DisplayCacheSRAMType (
3251 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE
), gShellDebug1HiiHandle
);
3252 PRINT_INFO_OPTION ((UINT8
) Type
, Option
);
3253 PRINT_BITS_INFO (CacheSRAMTypeTable
, (UINT8
) Type
);
3257 DisplayCacheErrCorrectingType (
3262 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING
), gShellDebug1HiiHandle
);
3263 PRINT_INFO_OPTION (Type
, Option
);
3264 PRINT_TABLE_ITEM (CacheErrCorrectingTypeTable
, Type
);
3268 DisplayCacheSystemCacheType (
3273 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE
), gShellDebug1HiiHandle
);
3274 PRINT_INFO_OPTION (Type
, Option
);
3275 PRINT_TABLE_ITEM (CacheSystemCacheTypeTable
, Type
);
3279 DisplayCacheAssociativity (
3280 UINT8 Associativity
,
3284 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY
), gShellDebug1HiiHandle
);
3285 PRINT_INFO_OPTION (Associativity
, Option
);
3286 PRINT_TABLE_ITEM (CacheAssociativityTable
, Associativity
);
3289 // Port Connector Information (Type 8)
3292 DisplayPortConnectorType (
3297 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE
), gShellDebug1HiiHandle
);
3298 PRINT_INFO_OPTION (Type
, Option
);
3299 PRINT_TABLE_ITEM (PortConnectorTypeTable
, Type
);
3308 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE
), gShellDebug1HiiHandle
);
3309 PRINT_INFO_OPTION (Type
, Option
);
3310 PRINT_TABLE_ITEM (PortTypeTable
, Type
);
3313 // System Slots (Type 9)
3316 DisplaySystemSlotType (
3321 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE
), gShellDebug1HiiHandle
);
3322 PRINT_INFO_OPTION (Type
, Option
);
3323 PRINT_TABLE_ITEM (SystemSlotTypeTable
, Type
);
3327 DisplaySystemSlotDataBusWidth (
3332 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA
), gShellDebug1HiiHandle
);
3333 PRINT_INFO_OPTION (Width
, Option
);
3334 PRINT_TABLE_ITEM (SystemSlotDataBusWidthTable
, Width
);
3338 DisplaySystemSlotCurrentUsage (
3343 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE
), gShellDebug1HiiHandle
);
3344 PRINT_INFO_OPTION (Usage
, Option
);
3345 PRINT_TABLE_ITEM (SystemSlotCurrentUsageTable
, Usage
);
3349 DisplaySystemSlotLength (
3354 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH
), gShellDebug1HiiHandle
);
3355 PRINT_INFO_OPTION (Length
, Option
);
3356 PRINT_TABLE_ITEM (SystemSlotLengthTable
, Length
);
3360 DisplaySlotCharacteristics1 (
3365 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS
), gShellDebug1HiiHandle
);
3366 PRINT_INFO_OPTION (Chara1
, Option
);
3367 PRINT_BITS_INFO (SlotCharacteristics1Table
, Chara1
);
3371 DisplaySlotCharacteristics2 (
3376 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2
), gShellDebug1HiiHandle
);
3377 PRINT_INFO_OPTION (Chara2
, Option
);
3378 PRINT_BITS_INFO (SlotCharacteristics2Table
, Chara2
);
3381 // On Board Devices Information (Type 10)
3384 DisplayOnboardDeviceTypes (
3389 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3390 PRINT_INFO_OPTION (Type
, Option
);
3391 PRINT_TABLE_ITEM (OnboardDeviceTypesTable
, Type
);
3394 // System Event Log (Type 15)
3402 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE
), gShellDebug1HiiHandle
);
3403 PRINT_INFO_OPTION (Type
, Option
);
3404 PRINT_TABLE_ITEM (SELTypesTable
, Type
);
3408 DisplaySELVarDataFormatType (
3413 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT
), gShellDebug1HiiHandle
);
3414 PRINT_INFO_OPTION (Type
, Option
);
3415 PRINT_TABLE_ITEM (SELVarDataFormatTypeTable
, Type
);
3419 DisplayPostResultsBitmapDw1 (
3424 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP
), gShellDebug1HiiHandle
);
3425 PRINT_INFO_OPTION (Key
, Option
);
3426 PRINT_BITS_INFO (PostResultsBitmapDw1Table
, Key
);
3430 DisplayPostResultsBitmapDw2 (
3435 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD
), gShellDebug1HiiHandle
);
3436 PRINT_INFO_OPTION (Key
, Option
);
3437 PRINT_BITS_INFO (PostResultsBitmapDw2Table
, Key
);
3441 DisplaySELSysManagementTypes (
3448 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_TYPES
), gShellDebug1HiiHandle
);
3449 PRINT_INFO_OPTION (SMType
, Option
);
3452 // Deal with wide range Value
3454 if (SMType
>= 0x80000000) {
3455 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_OEM_ASSIGNED
), gShellDebug1HiiHandle
);
3456 } else if (SMType
>= 0x00020000) {
3457 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN
), gShellDebug1HiiHandle
);
3458 } else if (SMType
>= 0x00010000) {
3459 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_PROBE
), gShellDebug1HiiHandle
);
3460 } else if (SMType
>= 0x31) {
3461 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN
), gShellDebug1HiiHandle
);
3464 // Deal with One byte data
3466 Temp
= (UINT8
) (SMType
& 0x3F);
3467 PRINT_TABLE_ITEM (SELSysManagementTypesTable
, Temp
);
3471 // Physical Memory Array (Type 16)
3474 DisplayPMALocation (
3479 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION
), gShellDebug1HiiHandle
);
3480 PRINT_INFO_OPTION (Location
, Option
);
3481 PRINT_TABLE_ITEM (PMALocationTable
, Location
);
3490 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION
), gShellDebug1HiiHandle
);
3491 PRINT_INFO_OPTION (Use
, Option
);
3492 PRINT_TABLE_ITEM (PMAUseTable
, Use
);
3496 DisplayPMAErrorCorrectionTypes (
3501 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR
), gShellDebug1HiiHandle
);
3502 PRINT_INFO_OPTION (Type
, Option
);
3503 PRINT_TABLE_ITEM (PMAErrorCorrectionTypesTable
, Type
);
3506 // Memory Device (Type 17)
3509 DisplayMemoryDeviceFormFactor (
3514 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR
), gShellDebug1HiiHandle
);
3515 PRINT_INFO_OPTION (FormFactor
, Option
);
3516 PRINT_TABLE_ITEM (MemoryDeviceFormFactorTable
, FormFactor
);
3520 DisplayMemoryDeviceType (
3525 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3526 PRINT_INFO_OPTION (Type
, Option
);
3527 PRINT_TABLE_ITEM (MemoryDeviceTypeTable
, Type
);
3531 DisplayMemoryDeviceTypeDetail (
3536 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL
), gShellDebug1HiiHandle
);
3537 PRINT_INFO_OPTION (para
, Option
);
3538 PRINT_BITS_INFO (MemoryDeviceTypeDetailTable
, para
);
3541 // 32-bit Memory Error Information (Type 18)
3544 DisplayMemoryErrorType (
3549 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO
), gShellDebug1HiiHandle
);
3550 PRINT_INFO_OPTION (ErrorType
, Option
);
3551 PRINT_TABLE_ITEM (MemoryErrorTypeTable
, ErrorType
);
3555 DisplayMemoryErrorGranularity (
3560 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY
), gShellDebug1HiiHandle
);
3561 PRINT_INFO_OPTION (Granularity
, Option
);
3562 PRINT_TABLE_ITEM (MemoryErrorGranularityTable
, Granularity
);
3566 DisplayMemoryErrorOperation (
3571 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP
), gShellDebug1HiiHandle
);
3572 PRINT_INFO_OPTION (Operation
, Option
);
3573 PRINT_TABLE_ITEM (MemoryErrorOperationTable
, Operation
);
3576 // Built-in Pointing Device (Type 21)
3579 DisplayPointingDeviceType (
3584 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3585 PRINT_INFO_OPTION (Type
, Option
);
3586 PRINT_TABLE_ITEM (PointingDeviceTypeTable
, Type
);
3590 DisplayPointingDeviceInterface (
3595 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE
), gShellDebug1HiiHandle
);
3596 PRINT_INFO_OPTION (Interface
, Option
);
3597 PRINT_TABLE_ITEM (PointingDeviceInterfaceTable
, Interface
);
3600 // Portable Battery (Type 22)
3603 DisplayPBDeviceChemistry (
3608 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM
), gShellDebug1HiiHandle
);
3609 PRINT_INFO_OPTION (Key
, Option
);
3610 PRINT_TABLE_ITEM (PBDeviceChemistryTable
, Key
);
3613 // Voltage Probe (Type 26)
3623 Loc
= (UINT8
) ((Key
& 0xE0) >> 5);
3624 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC
), gShellDebug1HiiHandle
);
3625 PRINT_INFO_OPTION (Loc
, Option
);
3626 PRINT_TABLE_ITEM (VPLocationTable
, Loc
);
3637 Status
= (UINT8
) (Key
& 0x1F);
3638 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_STATUS
), gShellDebug1HiiHandle
);
3639 PRINT_INFO_OPTION (Status
, Option
);
3640 PRINT_TABLE_ITEM (VPStatusTable
, Status
);
3643 // Voltage Probe (Type 27)
3646 DisplayCoolingDeviceStatus (
3653 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3654 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_STATUS
), gShellDebug1HiiHandle
);
3655 PRINT_INFO_OPTION (Status
, Option
);
3656 PRINT_TABLE_ITEM (CoolingDeviceStatusTable
, Status
);
3660 DisplayCoolingDeviceType (
3667 Type
= (UINT8
) (Key
& 0x1F);
3668 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_TYPE
), gShellDebug1HiiHandle
);
3669 PRINT_INFO_OPTION (Type
, Option
);
3670 PRINT_TABLE_ITEM (CoolingDeviceTypeTable
, Type
);
3673 // Temperature Probe (Type 28)
3676 DisplayTemperatureProbeStatus (
3683 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3684 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_TEMP_PROBE
), gShellDebug1HiiHandle
);
3685 PRINT_INFO_OPTION (Status
, Option
);
3686 PRINT_TABLE_ITEM (TemperatureProbeStatusTable
, Status
);
3690 DisplayTemperatureProbeLoc (
3697 Loc
= (UINT8
) (Key
& 0x1F);
3698 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC
), gShellDebug1HiiHandle
);
3699 PRINT_INFO_OPTION (Loc
, Option
);
3700 PRINT_TABLE_ITEM (TemperatureProbeLocTable
, Loc
);
3703 // Electrical Current Probe (Type 29)
3713 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3714 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_STATUS
), gShellDebug1HiiHandle
);
3715 PRINT_INFO_OPTION (Status
, Option
);
3716 PRINT_TABLE_ITEM (ECPStatusTable
, Status
);
3727 Loc
= (UINT8
) (Key
& 0x1F);
3728 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_LOC
), gShellDebug1HiiHandle
);
3729 PRINT_INFO_OPTION (Loc
, Option
);
3730 PRINT_TABLE_ITEM (ECPLocTable
, Loc
);
3733 // Management Device (Type 34)
3741 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE
), gShellDebug1HiiHandle
);
3742 PRINT_INFO_OPTION (Key
, Option
);
3743 PRINT_TABLE_ITEM (MDTypeTable
, Key
);
3747 DisplayMDAddressType (
3752 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE
), gShellDebug1HiiHandle
);
3753 PRINT_INFO_OPTION (Key
, Option
);
3754 PRINT_TABLE_ITEM (MDAddressTypeTable
, Key
);
3757 // Memory Channel (Type 37)
3760 DisplayMemoryChannelType (
3765 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE
), gShellDebug1HiiHandle
);
3766 PRINT_INFO_OPTION (Key
, Option
);
3767 PRINT_TABLE_ITEM (MemoryChannelTypeTable
, Key
);
3770 // IPMI Device Information (Type 38)
3773 DisplayIPMIDIBMCInterfaceType (
3778 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE
), gShellDebug1HiiHandle
);
3779 PRINT_INFO_OPTION (Key
, Option
);
3780 PRINT_TABLE_ITEM (IPMIDIBMCInterfaceTypeTable
, Key
);
3784 DisplayStructureTypeInfo (
3792 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE
), gShellDebug1HiiHandle
);
3793 PRINT_INFO_OPTION (Key
, Option
);
3794 PRINT_TABLE_ITEM (StructureTypeInfoTable
, Key
);