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 - 2010, 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"
2926 IN TABLE_ITEM
*Table
,
2932 Routine Description:
2933 Function Description
2934 Given a table and a Key, return the responding info.
2937 Table - The begin address of table
2938 Number - The number of table items
2940 Info - Input as empty buffer; output as data buffer.
2943 if Key found - return found Key and Info
2944 if Key unfound - return QUERY_TABLE_UNFOUND, Info=NULL
2947 Table[Index].Key is change from UINT8 to UINT16,
2948 in order to deal with "0xaa - 0xbb".
2951 DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option)
2954 Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07.
2955 Then all the Key Value between Low and High gets the same string
2962 // High byte and Low byte of word
2967 for (Index
= 0; Index
< Number
; Index
++) {
2968 High
= (UINT8
) (Table
[Index
].Key
>> 8);
2969 Low
= (UINT8
) (Table
[Index
].Key
& 0x00FF);
2971 // Check if Key is in the range
2973 if (High
> Low
&& Key
>= Low
&& Key
<= High
) {
2974 StrCpy (Info
, Table
[Index
].Info
);
2975 StrCat (Info
, L
"\n");
2979 // Check if Key == Value in the table
2981 if (Table
[Index
].Key
== Key
) {
2982 StrCpy (Info
, Table
[Index
].Info
);
2983 StrCat (Info
, L
"\n");
2988 StrCpy (Info
, L
"Undefined Value\n");
2989 return QUERY_TABLE_UNFOUND
;
2994 IN TABLE_ITEM
*Table
,
3000 Routine Description:
3001 Given a table of bit info and a Key,
3002 return the responding info to the Key.
3005 Table - Point to a table which maintains a map of 'bit' to 'message'
3006 Number - Number of table items.
3007 Bits - The Key of query the bit map information.
3015 // Get certain bit of 'Value':
3017 #define BIT(Value, bit) ((Value) & ((UINT32) 1) << (bit))
3019 // Clear certain bit of 'Value':
3021 #define CLR_BIT(Value, bit) ((Value) -= (BIT (Value, bit)))
3030 // query the table and print information
3032 for (Index
= 0; Index
< Number
; Index
++) {
3033 if (BIT (Value
, Table
[Index
].Key
) != 0) {
3034 Print (Table
[Index
].Info
);
3039 // clear the bit, for reserved bits test
3041 CLR_BIT (Value
, Table
[Index
].Key
);
3046 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_NO_INFO
), gShellDebug1HiiHandle
);
3050 ShellPrintHiiEx(-1,-1,NULL
,
3051 STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_BITS_SET
),
3052 gShellDebug1HiiHandle
,
3060 // //////////////////////////////////////////////////////////////////
3062 // Following uses QueryTable functions to simplify the coding.
3063 // QueryTable(), PrintBitsInfo()
3066 #define PRINT_TABLE_ITEM(Table, Key) \
3070 Num = sizeof (Table) / sizeof (TABLE_ITEM); \
3071 ZeroMem (Info, sizeof (Info)); \
3072 QueryTable (Table, Num, Key, Info); \
3076 #define PRINT_BITS_INFO(Table, bits) \
3079 Num = sizeof (Table) / sizeof (TABLE_ITEM); \
3080 PrintBitsInfo (Table, Num, (UINT32) bits); \
3084 ////////////////////////////////////////////////////////////////////
3086 // System Information (Type 1)
3089 DisplaySystemWakeupType (
3094 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE
), gShellDebug1HiiHandle
);
3095 PRINT_INFO_OPTION (Type
, Option
);
3096 PRINT_TABLE_ITEM (SystemWakeupTypeTable
, Type
);
3099 // System Enclosure (Type 3)
3102 DisplaySystemEnclosureType (
3107 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE
), gShellDebug1HiiHandle
);
3108 PRINT_INFO_OPTION (Type
, Option
);
3110 // query table and print info
3112 PRINT_TABLE_ITEM (SystemEnclosureTypeTable
, Type
);
3114 if (BIT (Type
, 7) != 0) {
3115 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CHASSIS_LOCK_PRESENT
), gShellDebug1HiiHandle
);
3120 DisplaySystemEnclosureStatus (
3125 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS
), gShellDebug1HiiHandle
);
3126 PRINT_INFO_OPTION (Status
, Option
);
3127 PRINT_TABLE_ITEM (SystemEnclosureStatusTable
, Status
);
3131 DisplaySESecurityStatus (
3136 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY
), gShellDebug1HiiHandle
);
3137 PRINT_INFO_OPTION (Status
, Option
);
3138 PRINT_TABLE_ITEM (SESecurityStatusTable
, Status
);
3141 // Processor Information (Type 4)
3144 DisplayProcessorType (
3149 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE
), gShellDebug1HiiHandle
);
3150 PRINT_INFO_OPTION (Type
, Option
);
3151 PRINT_TABLE_ITEM (ProcessorTypeTable
, Type
);
3155 DisplayProcessorUpgrade (
3160 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE
), gShellDebug1HiiHandle
);
3161 PRINT_INFO_OPTION (Upgrade
, Option
);
3162 PRINT_TABLE_ITEM (ProcessorUpgradeTable
, Upgrade
);
3165 // Memory Controller Information (Type 5)
3168 DisplayMcErrorDetectMethod (
3173 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD
), gShellDebug1HiiHandle
);
3174 PRINT_INFO_OPTION (Method
, Option
);
3175 PRINT_TABLE_ITEM (McErrorDetectMethodTable
, Method
);
3179 DisplayMcErrorCorrectCapability (
3184 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY
), gShellDebug1HiiHandle
);
3185 PRINT_INFO_OPTION (Capability
, Option
);
3186 PRINT_BITS_INFO (McErrorCorrectCapabilityTable
, Capability
);
3190 DisplayMcInterleaveSupport (
3195 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT
), gShellDebug1HiiHandle
);
3196 PRINT_INFO_OPTION (Support
, Option
);
3197 PRINT_TABLE_ITEM (McInterleaveSupportTable
, Support
);
3201 DisplayMcMemorySpeeds (
3206 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED
), gShellDebug1HiiHandle
);
3207 PRINT_INFO_OPTION (Speed
, Option
);
3208 PRINT_BITS_INFO (McMemorySpeedsTable
, Speed
);
3212 DisplayMemoryModuleVoltage (
3217 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES
), gShellDebug1HiiHandle
);
3218 PRINT_INFO_OPTION (Voltage
, Option
);
3219 PRINT_BITS_INFO (MemoryModuleVoltageTable
, Voltage
);
3222 // Memory Module Information (Type 6)
3225 DisplayMmMemoryType (
3230 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE
), gShellDebug1HiiHandle
);
3231 PRINT_INFO_OPTION (Type
, Option
);
3232 PRINT_BITS_INFO (MmMemoryTypeTable
, Type
);
3236 DisplayMmErrorStatus (
3241 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS
), gShellDebug1HiiHandle
);
3242 PRINT_INFO_OPTION (Status
, Option
);
3243 PRINT_BITS_INFO (MmErrorStatusTable
, Status
);
3246 // Cache Information (Type 7)
3249 DisplayCacheSRAMType (
3254 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE
), gShellDebug1HiiHandle
);
3255 PRINT_INFO_OPTION ((UINT8
) Type
, Option
);
3256 PRINT_BITS_INFO (CacheSRAMTypeTable
, (UINT8
) Type
);
3260 DisplayCacheErrCorrectingType (
3265 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING
), gShellDebug1HiiHandle
);
3266 PRINT_INFO_OPTION (Type
, Option
);
3267 PRINT_TABLE_ITEM (CacheErrCorrectingTypeTable
, Type
);
3271 DisplayCacheSystemCacheType (
3276 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE
), gShellDebug1HiiHandle
);
3277 PRINT_INFO_OPTION (Type
, Option
);
3278 PRINT_TABLE_ITEM (CacheSystemCacheTypeTable
, Type
);
3282 DisplayCacheAssociativity (
3283 UINT8 Associativity
,
3287 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY
), gShellDebug1HiiHandle
);
3288 PRINT_INFO_OPTION (Associativity
, Option
);
3289 PRINT_TABLE_ITEM (CacheAssociativityTable
, Associativity
);
3292 // Port Connector Information (Type 8)
3295 DisplayPortConnectorType (
3300 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE
), gShellDebug1HiiHandle
);
3301 PRINT_INFO_OPTION (Type
, Option
);
3302 PRINT_TABLE_ITEM (PortConnectorTypeTable
, Type
);
3311 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE
), gShellDebug1HiiHandle
);
3312 PRINT_INFO_OPTION (Type
, Option
);
3313 PRINT_TABLE_ITEM (PortTypeTable
, Type
);
3316 // System Slots (Type 9)
3319 DisplaySystemSlotType (
3324 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE
), gShellDebug1HiiHandle
);
3325 PRINT_INFO_OPTION (Type
, Option
);
3326 PRINT_TABLE_ITEM (SystemSlotTypeTable
, Type
);
3330 DisplaySystemSlotDataBusWidth (
3335 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA
), gShellDebug1HiiHandle
);
3336 PRINT_INFO_OPTION (Width
, Option
);
3337 PRINT_TABLE_ITEM (SystemSlotDataBusWidthTable
, Width
);
3341 DisplaySystemSlotCurrentUsage (
3346 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE
), gShellDebug1HiiHandle
);
3347 PRINT_INFO_OPTION (Usage
, Option
);
3348 PRINT_TABLE_ITEM (SystemSlotCurrentUsageTable
, Usage
);
3352 DisplaySystemSlotLength (
3357 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH
), gShellDebug1HiiHandle
);
3358 PRINT_INFO_OPTION (Length
, Option
);
3359 PRINT_TABLE_ITEM (SystemSlotLengthTable
, Length
);
3363 DisplaySlotCharacteristics1 (
3368 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS
), gShellDebug1HiiHandle
);
3369 PRINT_INFO_OPTION (Chara1
, Option
);
3370 PRINT_BITS_INFO (SlotCharacteristics1Table
, Chara1
);
3374 DisplaySlotCharacteristics2 (
3379 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2
), gShellDebug1HiiHandle
);
3380 PRINT_INFO_OPTION (Chara2
, Option
);
3381 PRINT_BITS_INFO (SlotCharacteristics2Table
, Chara2
);
3384 // On Board Devices Information (Type 10)
3387 DisplayOnboardDeviceTypes (
3392 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3393 PRINT_INFO_OPTION (Type
, Option
);
3394 PRINT_TABLE_ITEM (OnboardDeviceTypesTable
, Type
);
3397 // System Event Log (Type 15)
3405 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE
), gShellDebug1HiiHandle
);
3406 PRINT_INFO_OPTION (Type
, Option
);
3407 PRINT_TABLE_ITEM (SELTypesTable
, Type
);
3411 DisplaySELVarDataFormatType (
3416 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT
), gShellDebug1HiiHandle
);
3417 PRINT_INFO_OPTION (Type
, Option
);
3418 PRINT_TABLE_ITEM (SELVarDataFormatTypeTable
, Type
);
3422 DisplayPostResultsBitmapDw1 (
3427 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP
), gShellDebug1HiiHandle
);
3428 PRINT_INFO_OPTION (Key
, Option
);
3429 PRINT_BITS_INFO (PostResultsBitmapDw1Table
, Key
);
3433 DisplayPostResultsBitmapDw2 (
3438 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD
), gShellDebug1HiiHandle
);
3439 PRINT_INFO_OPTION (Key
, Option
);
3440 PRINT_BITS_INFO (PostResultsBitmapDw2Table
, Key
);
3444 DisplaySELSysManagementTypes (
3451 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_TYPES
), gShellDebug1HiiHandle
);
3452 PRINT_INFO_OPTION (SMType
, Option
);
3455 // Deal with wide range Value
3457 if (SMType
>= 0x80000000) {
3458 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_OEM_ASSIGNED
), gShellDebug1HiiHandle
);
3459 } else if (SMType
>= 0x00020000) {
3460 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN
), gShellDebug1HiiHandle
);
3461 } else if (SMType
>= 0x00010000) {
3462 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_PROBE
), gShellDebug1HiiHandle
);
3463 } else if (SMType
>= 0x31) {
3464 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN
), gShellDebug1HiiHandle
);
3467 // Deal with One byte data
3469 Temp
= (UINT8
) (SMType
& 0x3F);
3470 PRINT_TABLE_ITEM (SELSysManagementTypesTable
, Temp
);
3474 // Physical Memory Array (Type 16)
3477 DisplayPMALocation (
3482 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION
), gShellDebug1HiiHandle
);
3483 PRINT_INFO_OPTION (Location
, Option
);
3484 PRINT_TABLE_ITEM (PMALocationTable
, Location
);
3493 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION
), gShellDebug1HiiHandle
);
3494 PRINT_INFO_OPTION (Use
, Option
);
3495 PRINT_TABLE_ITEM (PMAUseTable
, Use
);
3499 DisplayPMAErrorCorrectionTypes (
3504 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR
), gShellDebug1HiiHandle
);
3505 PRINT_INFO_OPTION (Type
, Option
);
3506 PRINT_TABLE_ITEM (PMAErrorCorrectionTypesTable
, Type
);
3509 // Memory Device (Type 17)
3512 DisplayMemoryDeviceFormFactor (
3517 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR
), gShellDebug1HiiHandle
);
3518 PRINT_INFO_OPTION (FormFactor
, Option
);
3519 PRINT_TABLE_ITEM (MemoryDeviceFormFactorTable
, FormFactor
);
3523 DisplayMemoryDeviceType (
3528 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3529 PRINT_INFO_OPTION (Type
, Option
);
3530 PRINT_TABLE_ITEM (MemoryDeviceTypeTable
, Type
);
3534 DisplayMemoryDeviceTypeDetail (
3539 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL
), gShellDebug1HiiHandle
);
3540 PRINT_INFO_OPTION (para
, Option
);
3541 PRINT_BITS_INFO (MemoryDeviceTypeDetailTable
, para
);
3544 // 32-bit Memory Error Information (Type 18)
3547 DisplayMemoryErrorType (
3552 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO
), gShellDebug1HiiHandle
);
3553 PRINT_INFO_OPTION (ErrorType
, Option
);
3554 PRINT_TABLE_ITEM (MemoryErrorTypeTable
, ErrorType
);
3558 DisplayMemoryErrorGranularity (
3563 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY
), gShellDebug1HiiHandle
);
3564 PRINT_INFO_OPTION (Granularity
, Option
);
3565 PRINT_TABLE_ITEM (MemoryErrorGranularityTable
, Granularity
);
3569 DisplayMemoryErrorOperation (
3574 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP
), gShellDebug1HiiHandle
);
3575 PRINT_INFO_OPTION (Operation
, Option
);
3576 PRINT_TABLE_ITEM (MemoryErrorOperationTable
, Operation
);
3579 // Built-in Pointing Device (Type 21)
3582 DisplayPointingDeviceType (
3587 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE
), gShellDebug1HiiHandle
);
3588 PRINT_INFO_OPTION (Type
, Option
);
3589 PRINT_TABLE_ITEM (PointingDeviceTypeTable
, Type
);
3593 DisplayPointingDeviceInterface (
3598 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE
), gShellDebug1HiiHandle
);
3599 PRINT_INFO_OPTION (Interface
, Option
);
3600 PRINT_TABLE_ITEM (PointingDeviceInterfaceTable
, Interface
);
3603 // Portable Battery (Type 22)
3606 DisplayPBDeviceChemistry (
3611 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM
), gShellDebug1HiiHandle
);
3612 PRINT_INFO_OPTION (Key
, Option
);
3613 PRINT_TABLE_ITEM (PBDeviceChemistryTable
, Key
);
3616 // Voltage Probe (Type 26)
3626 Loc
= (UINT8
) ((Key
& 0xE0) >> 5);
3627 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC
), gShellDebug1HiiHandle
);
3628 PRINT_INFO_OPTION (Loc
, Option
);
3629 PRINT_TABLE_ITEM (VPLocationTable
, Loc
);
3640 Status
= (UINT8
) (Key
& 0x1F);
3641 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_STATUS
), gShellDebug1HiiHandle
);
3642 PRINT_INFO_OPTION (Status
, Option
);
3643 PRINT_TABLE_ITEM (VPStatusTable
, Status
);
3646 // Voltage Probe (Type 27)
3649 DisplayCoolingDeviceStatus (
3656 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3657 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_STATUS
), gShellDebug1HiiHandle
);
3658 PRINT_INFO_OPTION (Status
, Option
);
3659 PRINT_TABLE_ITEM (CoolingDeviceStatusTable
, Status
);
3663 DisplayCoolingDeviceType (
3670 Type
= (UINT8
) (Key
& 0x1F);
3671 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_TYPE
), gShellDebug1HiiHandle
);
3672 PRINT_INFO_OPTION (Type
, Option
);
3673 PRINT_TABLE_ITEM (CoolingDeviceTypeTable
, Type
);
3676 // Temperature Probe (Type 28)
3679 DisplayTemperatureProbeStatus (
3686 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3687 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_TEMP_PROBE
), gShellDebug1HiiHandle
);
3688 PRINT_INFO_OPTION (Status
, Option
);
3689 PRINT_TABLE_ITEM (TemperatureProbeStatusTable
, Status
);
3693 DisplayTemperatureProbeLoc (
3700 Loc
= (UINT8
) (Key
& 0x1F);
3701 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC
), gShellDebug1HiiHandle
);
3702 PRINT_INFO_OPTION (Loc
, Option
);
3703 PRINT_TABLE_ITEM (TemperatureProbeLocTable
, Loc
);
3706 // Electrical Current Probe (Type 29)
3716 Status
= (UINT8
) ((Key
& 0xE0) >> 5);
3717 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_STATUS
), gShellDebug1HiiHandle
);
3718 PRINT_INFO_OPTION (Status
, Option
);
3719 PRINT_TABLE_ITEM (ECPStatusTable
, Status
);
3730 Loc
= (UINT8
) (Key
& 0x1F);
3731 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_LOC
), gShellDebug1HiiHandle
);
3732 PRINT_INFO_OPTION (Loc
, Option
);
3733 PRINT_TABLE_ITEM (ECPLocTable
, Loc
);
3736 // Management Device (Type 34)
3744 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE
), gShellDebug1HiiHandle
);
3745 PRINT_INFO_OPTION (Key
, Option
);
3746 PRINT_TABLE_ITEM (MDTypeTable
, Key
);
3750 DisplayMDAddressType (
3755 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE
), gShellDebug1HiiHandle
);
3756 PRINT_INFO_OPTION (Key
, Option
);
3757 PRINT_TABLE_ITEM (MDAddressTypeTable
, Key
);
3760 // Memory Channel (Type 37)
3763 DisplayMemoryChannelType (
3768 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE
), gShellDebug1HiiHandle
);
3769 PRINT_INFO_OPTION (Key
, Option
);
3770 PRINT_TABLE_ITEM (MemoryChannelTypeTable
, Key
);
3773 // IPMI Device Information (Type 38)
3776 DisplayIPMIDIBMCInterfaceType (
3781 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE
), gShellDebug1HiiHandle
);
3782 PRINT_INFO_OPTION (Key
, Option
);
3783 PRINT_TABLE_ITEM (IPMIDIBMCInterfaceTypeTable
, Key
);
3787 DisplayStructureTypeInfo (
3795 ShellPrintHiiEx(-1,-1,NULL
,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE
), gShellDebug1HiiHandle
);
3796 PRINT_INFO_OPTION (Key
, Option
);
3797 PRINT_TABLE_ITEM (StructureTypeInfoTable
, Key
);