ShellPkg/SmbiosView: Update SmbiosView for SMBIOS3.2.0

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1099

Update SmbiosView to parse the new definitions which
are introduced in SMBIOS3.2.0

V2:
1. Add structure length check before dump the fileds in
Type 9 and Type 17 in case some fileds are not organized
and reported by drivers.
2. Dump the InterfaceTypeSpecificData in Type 42.

V3:
1. Correct the structure length in Type17.
2. Remove the redundant check "if (PeerGroupCount > 0)" in Type 9.
3. Use the Uint16 filed instead of Bits field in union
MEMORY_DEVICE_OPERATING_MODE_CAPABILITY to dump data.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Dandan Bi
2018-08-27 13:21:48 +08:00
committed by Star Zeng
parent 79e4f2a56a
commit 7475ac5157
4 changed files with 237 additions and 19 deletions

View File

@ -579,6 +579,22 @@ TABLE_ITEM ProcessorUpgradeTable[] = {
{
0x38,
L"Socket SP3r2"
},
{
0x39,
L"Socket LGA2066"
},
{
0x3A,
L"Socket BGA1392"
},
{
0x3B,
L"Socket BGA1510"
},
{
0x3C,
L"Socket BGA1528"
}
};
@ -1088,6 +1104,10 @@ TABLE_ITEM PortConnectorTypeTable[] = {
0x22,
L"SAS/SATA Plug Receptacle"
},
{
0x23,
L"USB Type-C Receptacle"
},
{
0xA0,
L"PC-98"
@ -1251,6 +1271,14 @@ TABLE_ITEM PortTypeTable[] = {
0x21,
L"SAS Port"
},
{
0x22,
L"Multi-Function Display Port (MFDP)"
},
{
0x23,
L"Thunderbolt"
},
{
0xA0,
L"8251 Compatible"
@ -1576,6 +1604,10 @@ TABLE_ITEM SystemSlotCurrentUsageTable[] = {
0x04,
L" In use"
},
{
0x05,
L" Unavailable"
}
};
TABLE_ITEM SystemSlotLengthTable[] = {
@ -1645,6 +1677,10 @@ TABLE_ITEM SlotCharacteristics2Table[] = {
{
2,
L" PCI slot supports SMBus signal"
},
{
3,
L" PCIe slot supports bifurcation"
}
};
@ -2468,6 +2504,10 @@ TABLE_ITEM MemoryDeviceTypeTable[] = {
{
0x1E,
L" LPDDR4"
},
{
0x1F,
L" Logical non-volatile device"
}
};
@ -2530,6 +2570,61 @@ TABLE_ITEM MemoryDeviceTypeDetailTable[] = {
}
};
TABLE_ITEM MemoryDeviceMemoryTechnologyTable[] = {
{
0x01,
L" Other"
},
{
0x02,
L" Unknown"
},
{
0x03,
L" DRAM"
},
{
0x04,
L" NVDIMM-N"
},
{
0x05,
L" NVDIMM-F"
},
{
0x06,
L" NVDIMM-P"
},
{
0x07,
L" Intel persistent memory"
}
};
TABLE_ITEM MemoryDeviceMemoryOperatingModeCapabilityTable[] = {
{
1,
L" Other"
},
{
2,
L" Unknown"
},
{
3,
L" Volatile memory"
},
{
4,
L" Byte-accessible persistent memory"
},
{
5,
L" Block-accessible persistent memory"
}
};
TABLE_ITEM MemoryErrorTypeTable[] = {
{
0x01,
@ -3155,7 +3250,11 @@ TABLE_ITEM IPMIDIBMCInterfaceTypeTable[] = {
L" BT: Block Transfer "
},
{
0xFF04,
0x04,
L" SSIF: SMBus System Interface "
},
{
0xFF05,
L" Reserved for future assignment by this specification "
},
};
@ -4222,6 +4321,40 @@ DisplayMemoryDeviceTypeDetail (
PRINT_BITS_INFO (MemoryDeviceTypeDetailTable, Para);
}
/**
Display Memory Device (Type 17) memory technology.
@param[in] Para The key of the structure.
@param[in] Option The optional information.
**/
VOID
DisplayMemoryDeviceMemoryTechnology (
IN UINT8 Para,
IN UINT8 Option
)
{
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_MEMORY_TECHNOLOGY), gShellDebug1HiiHandle);
PRINT_INFO_OPTION (Para, Option);
PRINT_TABLE_ITEM (MemoryDeviceMemoryTechnologyTable, Para);
}
/**
Display Memory Device (Type 17) memory operating mode capability.
@param[in] Para The key of the structure.
@param[in] Option The optional information.
**/
VOID
DisplayMemoryDeviceMemoryOperatingModeCapability (
IN UINT16 Para,
IN UINT8 Option
)
{
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_MEM_OPER_MODE_CAPA), gShellDebug1HiiHandle);
PRINT_INFO_OPTION (Para, Option);
PRINT_BITS_INFO (MemoryDeviceMemoryOperatingModeCapabilityTable, Para);
}
/**
Display 32-bit Memory Error Information (Type 18) type.