summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView
AgeCommit message (Collapse)AuthorFilesLines
4 daysShellPkg/SmbiosView: Add new Socket Type for SMBIOS Type4Jason Zhao1-0/+4
The patch prints new socket type(Type 4, Offset 32h) for SMBIOS Type4 based on SMBIOS v3.8.0. Signed-off-by: Jason Zhao <jason.zhao@intel.com>
10 daysShellPkg: Correct smbiosview strings and conditions for SMBIOS Type9HoraceX Lien2-11/+10
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4826 Using smbiosview to dump SMBIOS Type9, some code condition and string are incorrect. Signed-off-by: HoraceX Lien <horacex.lien@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2024-07-25ShellPkg: Correct smbiosview strings for SMBIOS Type0HoraceX Lien2-30/+30
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4813 Some strings not match SMBIOS specification definition, include uppercase and lowercase, wrong characters, extra words,...etc Signed-off-by: HoraceX Lien <horacex.lien@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2024-07-23ShellPkg: Changes to print Type17 in SmbiosviewShenbagadevi R1-0/+7
Add changes to print PMIC and RCD details of Smbios Type17 in Shell smbiosview command. Cc: Gaoliming <gaoliming@byosoft.com.cn> Cc: Sainadh N <sainadhn@ami.com> Cc: Sundaresan S <sundaresans@ami.com> Cc: Srinivasan M <srinivasanm@ami.com> Cc: Ramesh R <rameshr@ami.com> Cc: Karthika R <karthikar@ami.com> Signed-off-by: Shenbagadevi R <shenbagadevir@ami.com> Reviewed-by: Giri Mudusuru <girimudusuru@microsoft.com>
2024-04-16ShellPkg/SmbiosView: Support New ProcessorUpgrade for SMBIOS Type4Jason Lou1-1/+29
The patch updates SmbiosView to support new ProcessorUpgrade for SMBIOS Type4 based on SMBIOS 3.8.0. Signed-off-by: Jason Lou <yun.lou@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Star Zeng <star.zeng@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com>
2024-04-10ShellPkg: Update smbiosview type 4 with SMBIOS 3.6 fieldsHoraceX Lien1-0/+4
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4737 update smbiosview type 4 related fileds. Signed-off-by: HoraceX Lien <horacex.lien@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2024-03-04ShellPkg/SmbiosView: Support New ProcessorFamily for SMBIOS Type4Jason Lou1-1/+33
The patch updates SmbiosView to support new ProcessorFamily for SMBIOS Type4 based on SMBIOS 3.8.0. Signed-off-by: Jason Lou <yun.lou@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhichao Gao <zhichao.gao@intel.com>
2024-02-02ShellPkg: Update smbiosview for LoongArchDongyan Qian2-0/+76
According to SMBIOS spec3.6, LoongArch information support has been added, so this patch is submitted for display as information in smbiosview. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Reviewed-by: Chao Li <lichao@loongson.cn> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-08-31ShellPkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0Eduardo Cuevas Farfan1-1/+33
This patch adds below definitions from SMBIOS 3.7.0 into QueryTable.c - ProcessorUpgradeSocketAM5 - ProcessorUpgradeSocketSP5 - ProcessorUpgradeSocketSP6 - ProcessorUpgradeSocketBGA883 - ProcessorUpgradeSocketBGA1190 - ProcessorUpgradeSocketBGA4129 - ProcessorUpgradeSocketLGA4710 - ProcessorUpgradeSocketLGA7529 Signed-off-by: Eduardo Cuevas Farfan <eduardo.cuevas.farfan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-08-30ShellPkg/SmbiosView: Update display of PCIe system slot IDNhi Pham1-1/+1
This updates the system slot ID up to SlotTypePCIExpressGen6andBeyond (0xC4) added by updating type 9 with SMBIOS version 3.5 to cover modern PCIe Gens. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-06-08ShellPkg/SmbiosView: type 45 and type 46 support.Simon Wang4-4/+222
The initial version of Smbios Specification 3.6.0 type 45 and type 46 support. Signed-off-by: Simon Wang <simowang@nvidia.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-06-02ShellPkg: Add a condition to print accurate type0 Bios Size in smbiosview.Thejaswani Putta1-1/+3
As per the SMBIOS spec, in smbios type0 table, if the Bios size is greater than 16MB, extended bios size is used to update size information and bios size is set to 0xff. when this data is printed by smbiosview, both bios size and extended bios size is printed if the smbios version is beyond 3.1, which is incorrect as Bios size is set to 0xff when rom size is more than 16MB. To fix this bug, added a condition to print bios size only when it is not set to 0xff or if the smbios version is older than 3.1. Signed-off-by: Thejaswani Putta <tputta@nvidia.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-05-12ShellPkg/UefiShellDebug1CommandsLib: Replace hardcoded SMBIOS strings.Giri Mudusuru2-8/+10
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3805 Replace hardcoded SMBIOS Anchor string and size with defines. Fix buffer overflow as described below. Smbios64BitPrintEPSInfo () is coded like: UINT8 Anchor[5]; MemToString (Anchor, SmbiosTable->AnchorString, 5); But the definition of MemToString() Copy Length of Src buffer to Dest buffer, add a NULL termination to Dest buffer. So Anchor needs to be +1 the size of the SMBIOS Anchor string `_SM3_`. Changes from v1 to v2: - Replace doxygen style inline comments Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Andrew Fish <afish@apple.com> Signed-off-by: Giri Mudusuru <girim@apple.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-04-11ShellPkg: Update smbiosview type 0/4/17/41 with SMBIOS 3.5 fieldsLin, MillerX2-91/+89
Signed-off-by: MillerX Lin <millerx.lin@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-01-18ShellPkg: Display SMBIOS Type38 fields in smbiosview in formatted viewPrakash.K2-3/+27
In smbiosview command in shell, below are the fields of SMBIOS Type38 table which can be displayed in formatted manner. 1. Base Address 1. IPMI Specification Version. 2. NV Storage Device Address. Base Address: As per spec, the value in Base Address field of SMBIOS type38 table should be right shifted by 1 if the interface type is SSIF. IPMI Specification Version: If the value in IPMI Specification Version field is 15H, it should be displayed 1.5. NV Storage Device Address: If the value in NV Storage Device Address field is 0xFF, it should be displayed as "No storage device is Present". Cc: Vasudevan Sambandan <vasudevans@ami.com> Cc: Sundaresan Selvaraj <sundaresans@ami.com> Cc: Gayathri Thunuguntla <gayathrit@ami.com> Signed-off-by: Prakash K <prakashk@ami.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-11-28ShellPkg/SmbiosView: Update ProcessorUpgradeTableZhang, JuX1-0/+36
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4156 Refer to the latest SMBIOS v3.6, SMBIOS Socket not completely defined. SMBIOS v3.6: https://www.dmtf.org/sites/default/files/standards/documents/ DSP0134_3.6.0.pdf Signed-off-by: JuX Zhang <jux.zhang@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2022-11-11ShellPkg:Improved Smbios Type9 data under smbiosviewSainadh Nagolu2-6/+13
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4135 Added spec version check while publishing new Type9 fields, added Slot Pitch field which was missing and corrected the publishing order as per Smbios spec. Cc: Vasudevan S <vasudevans@ami.com> Cc: Sundaresan S <sundaresans@ami.com> Signed-off-by: Sainadh Nagolu <sainadhn@ami.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-08-18ShellPkg: Improved Smbios Type 9 table changes in PrintInfo.cSainadh Nagolu1-5/+10
Since PeerGroups has a variable number of entries, new fields added after PeerGroups are defined in a extended structure. Done changes in PrintInfo.c to access those fields using SMBIOS_TABLE_TYPE9_EXTENDED structure from SmBios.h. Signed-off-by: Sainadh Nagolu <sainadhn@ami.com> Cc: Vasudevan Sambandan <vasudevans@ami.com> Cc: Sundaresan S <sundaresans@ami.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-08-15ShellPkg/SmbiosView: Display extended memory info in smbiosview -t 17Shengfengx Xue1-0/+5
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4014 If Configured Memory Speed is 65,535 MT/s or greater, and the actual speed is stored in the Extended Configured Memory Speed field. but current Smbiosview have no this logic. Signed-off-by: Shengfengx Xue <shengfengx.xue@intel.com>
2022-04-25ShellPkg: Update smbiosview type 0 with SMBIOS 3.5 fieldsBo Chang Ke2-0/+10
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3906 update smbiosview type 0 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2022-04-22ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fieldsBo Chang Ke4-6/+280
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896 update smbiosview type 9 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2022-04-15ShellPkg: Update smbiosview type 41 with SMBIOS 3.5 fieldsKe, Bo-ChangX1-0/+24
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3900 update smbiosview type 41 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2021-12-07ShellPkg: Apply uncrustify changesMichael Kubacki10-2723/+2863
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ShellPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2021-10-12ShellPkg: Support ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0Star Zeng1-1/+13
The patch adds entry into QueryTable.c for ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0. It also adds entries into QueryTable.c for ProcessorUpgradeSocketLGA4189 and ProcessorUpgradeSocketLGA1200 from SMBIOS 3.4.0. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-07-20MdePkg/Include: Smbios Specification 3.4.0 changesgthotala1-4/+4
The following changes were addressed, 1. Smbios specs 3.4.0 table-51 bit5&6, these fields moved from specific MemoryArrayLocationCXLFlexbus10AddonCard to generic MemoryArrayLocationCXLAddonCard to address both CXL1.0 and 2.0 CXL revisions. 2. Smbios specs 3.4.0 table-79, The memory technology name changed from MemoryTechnologyIntelPersistentMemory to MemoryTechnologyIntelOptanePersistentMemory. Signed-off-by: Thotala Gopi <gopi.thotala@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-04-12ShellPkg: Fix smbiosview system enclosure type tableRebecca Cran1-4/+4
The SystemEnclosureTypeTable in QueryTable.c contained a couple of errors: value 0x10 is "Lunch Box" not "Main Server Chassis", and the Sub Notebook value was repeated as 0x13 when that entry is for "SubChassis". The entries in-between needed adjusted. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2021-03-18ShellPkg/SmbiosView: add more items for smbiosview -t 3Mars CC Lin2-0/+17
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3177 Add ContainedElementCount, ContainedElementRecordLength and ContainedElements for smbiosview type 3. Signed-off-by: Mars CC Lin <mars_cc_lin@phoenix.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Philippe Mathieu-Daude <philmd@redhat.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2021-01-11ShellPkg: Remove bogus "Bits" text from some smbiosview strings.Rebecca Cran2-3/+3
Neither of the "CPU Socket Unpopulated" or "Do not reboot" messages should contain the word "Bits". Remove them and update the identifier for the "Do not reboot" message to remove the word "BITS". Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2020-12-10MdePkg,ShellPkg: Fix typo in SMBIOS_TABLE_TYPE17 field FirmwareVersionRebecca Cran1-1/+1
"FirmwareVersion" was misspelled "FirwareVersion". Also, update SmbiosView PrintInfo.c to use the new field name. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-12-10MdePkg,ShellPkg: Fix typo in SMBIOS_TABLE_TYPE4 field ProcessorManufacturerRebecca Cran1-1/+1
In SmBios.h, the SMBIOS_TABLE_TYPE4 field "ProcessorManufacture" should be "ProcessorManufacturer". Also, update SmbiosView PrintInfo.c to use the new field name. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-10-30ShellPkg: Add ARM64 SoC ID to Processor Characteristics in smbiosviewRebecca Cran1-0/+4
SMBIOS 3.4.0 defines bit 9 of the Type 4 table Processor Characteristics field to be the ARM64 SoC ID support. Add support for it to the smbiosview command. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-10-30ShellPkg: Fix smbiosview string definition name for "boot from CD"Rebecca Cran2-2/+2
The "boot from CD supported" string definition name should contain the word "from" instead of "form". Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-10-30ShellPkg: Fix a couple of typos in smbiosviewRebecca Cran1-2/+2
Fix a couple of typos in SmbiosViewStrings.uni: "Boot form CD" should be "Boot from CD", and "plugged from the wall" should be "plugged into the wall". Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-10-14ShellPkg/SmbiosView: Add DDR5 supportGao, Zhichao1-0/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2352 Refer to SMBIOS 3.4 spec, add new memory device type - DDR5 and LPDDR5 support for the shell command "smbiosview". Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2020-08-07ShellPkg: smbiosview - Change some type 17 field values formatSamer El-Haj-Mahmoud1-7/+7
Change how some SMBIOS TYpe 17 field values are printed: - TotalWidth, DataWidth, ConfiguredMemoryClockSpeed: Print as hex values instead of decimal, since there are some special meanings for certain values (e.g. 0xFFFF) - VolatileSize, NonVolatileSize, CacheSize, and LogicalSize: Print as "0x%lx" instead of "0x%x" to prevent truncating output when printing these QWORD fields. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Sami Mujawar <Sami.Mujawar@arm.com> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2020-06-15ShellPkg: smbiosview - print field values as unsigned integersRebecca Cran1-3/+3
This prevents overflow when printing DWORD fields such as the type 17 tables's extended DIMM size. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2019-11-14ShellPkg/SmbiosView: SMBIOS 3.3.0 Update "Intel persistent memory"Gao, Zhichao1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Memory Device (Type 17): - SMBIOSCR00179: update the string for Intel persistent memory Cc: Ray Ni <ray.ni@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
2019-11-14ShellPkg/SmbiosView: SMBIOS 3.3.0 Add value HBM and Die for type 17Gao, Zhichao1-0/+12
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Memory Device (Type 17): - SMBIOSCR00178: add new memory device type value (HBM) and new form factor value (Die) Cc: Ray Ni <ray.ni@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
2019-11-14ShellPkg/SmbiosView: SMBIOS 3.3.0 add support for CXL FlexbusGao, Zhichao1-0/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Various: - SMBIOSCR00183: add support for CXL Flexbus Cc: Ray Ni <ray.ni@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
2019-11-14ShellPkg/SmbiosView: SMBIOS 3.3.0 add PCI gen4 values for type 9Gao, Zhichao2-2/+28
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 System Slots (Type 9): - SMBIOSCR00184: add PCI Express Gen 4 values Add the SmBios.h to use the MARCOs or enums. Cc: Ray Ni <ray.ni@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
2019-10-17ShellPkg/UefiShellDebug1CommandsLib: Update to support SmBios 3.3.0Abner Chang4-4/+98
Shell command smbiosview updates for SMBIOS 3.3.0 spec. Bugzilla link, https://bugzilla.tianocore.org/show_bug.cgi?id=2202 Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Gilbert Chen <gilbert.chen@hpe.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2019-06-12ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogDataDandan Bi1-6/+14
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1498 This patch fix following bugs in func DisplaySysEventLogData: 1. Log increment (Log = (LOG_RECORD_FORMAT *) (LogData + Offset);) should happened in the end of while loop, not in the very beginning. 2. DisplaySELTypes function should be used in while loop instead of DisplaySELVarDataFormatType. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2019-04-09ShellPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney11-77/+11
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-08-30ShellPkg/SmbiosView: Update SmbiosView for SMBIOS3.2.0Dandan Bi4-19/+237
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>
2018-06-28ShellPkg: Clean up source filesLiming Gao4-36/+36
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-08-16ShellPkg: Update header file including styleSong, BinX5-5/+5
- Update header file including style to avoid MSDN C4464 warning Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-04-25ShellPkg SmbiosView: Display Type 0 BIOS segment in hexadecimalJeff Westfahl1-1/+1
The SMBIOS Type 0 BIOS segment field is currently displayed in decimal. Since this field is likely to have a value like 0xE800 or 0xF000, using hexadecimal seems like a better choice. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-03-06ShellPkg: Refine type cast for pointer subtractionHao Wu1-2/+2
For pointer subtraction, the result is of type "ptrdiff_t". According to the C11 standard (Committee Draft - April 12, 2011): "When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. The size of the result is implementation-defined, and its type (a signed integer type) is ptrdiff_t defined in the <stddef.h> header. If the result is not representable in an object of that type, the behavior is undefined." In our codes, there are cases that the pointer subtraction is not performed by pointers to elements of the same array object. This might lead to potential issues, since the behavior is undefined according to C11 standard. Also, since the size of type "ptrdiff_t" is implementation-defined. Some static code checkers may warn that the pointer subtraction might underflow first and then being cast to a bigger size. For example: UINT8 *Ptr1, *Ptr2; UINTN PtrDiff; ... PtrDiff = (UINTN) (Ptr1 - Ptr2); The commit will refine the pointer subtraction expressions by casting each pointer to UINTN first and then perform the subtraction: PtrDiff = (UINTN) Ptr1 - (UINTN) Ptr2; Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-10ShellPkg SmbiosView: Correct some outputs for Type 0/3/10Star Zeng3-3/+4
Type 0: Update "EDD Enhanced Disk Driver)..." to "EDD (Enhanced Disk Driver)..." for STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER Type 3: Use L" Laptop" instead of L" LapTop" in SystemEnclosureTypeTable to match SMBIOS spec. Type 10: The BIT7 of Device Type is representing the status of device whether it is enabled or disabled. But current code is not considering the BIT7 and will print "Undefined Value" for enabled device. Type 41 has same definition of Device Type, the code is correct and will be applied to Type 10 by this patch. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-10ShellPkg SmbiosView: Eliminate trailing " | " in PrintBitsInfo()Star Zeng1-5/+13
Current PrintBitsInfo() will always print an additional trailing " | " for the bit flags, for example, Base Board Feature Flags: Hosting board | Replaceable | Th patch is to eliminate trailing " | " in PrintBitsInfo(), then the output will be like below Base Board Feature Flags: Hosting board | Replaceable Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>