summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library
Commit message (Collapse)AuthorAgeFilesLines
* ShellPkg: add missing linefeed in reset messageHeinrich Schuchardt2024-09-241-1/+1
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4850 When running 'reset -s' no linefeed is printed. This results in the Linux command line prompt not being printed at the start of a new line: Shell> reset -s Reset with <null string> (0 bytes)user@workstation:/tmp$ Add the missing linefeed. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* ShellPkg/AcpiView: RAS2 ParserCarsten Haitzler2024-09-124-0/+143
| | | | | | Add a new parser for the RAS2 Table as specified in ACPI6.5 Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
* ShellPkg: Acpiview: Add GICC field parsingCarsten Haitzler2024-09-051-22/+87
| | | | | | | | ACPI 6.5 adds mode flags that could do with more human-readable display in Acpiview. This adds support for displaying those flags. Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
* ShellPkg/SmbiosView: Add new Socket Type for SMBIOS Type4Jason Zhao2024-09-031-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>
* ShellPkg: Correct smbiosview strings and conditions for SMBIOS Type9HoraceX Lien2024-08-282-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>
* ShellPkg/AcpiView: Add MPAM ParserRohit Mathew2024-08-015-2/+1267
| | | | | | | | | | | | | | | Add a parser for the MPAM (Memory system resource partitioning and monitoring) ACPI table. This parser would parse all MPAM related structures embedded as part of the ACPI table. Necessary validations are also performed where and when required. Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com> Cc: James Morse <james.Morse@arm.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Thomas Abraham <thomas.abraham@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: Add routines to print reserved fieldsRohit Mathew2024-08-012-0/+164
| | | | | | | | | | | | | Most of the ACPI tables have fields that are marked reserved. Implement functions "DumpReserved" and "DumpReservedBits" aligning with the print-formatter prototype to print out reserved fields. Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com> Cc: James Morse <james.Morse@arm.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Thomas Abraham <thomas.abraham@arm.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Add routine to print 16 charsRohit Mathew2024-08-012-0/+57
| | | | | | | | | | | | | | | Certain ACPI tables like MPAM has fields which are 16 bytes long. Routines similar to Dump12Chars but for 16 characters are required to print such fields. Add Dump16Chars routine to satisfy this requirement. Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com> Cc: James Morse <james.Morse@arm.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Thomas Abraham <thomas.abraham@arm.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg/AcpiView: Update print-formatter prototypeRohit Mathew2024-08-0112-36/+98
| | | | | | | | | | | | | | | | | As of now, the print-formatter implemented by the FNPTR_PRINT_FORMATTER function pointer takes two parameters, the format string and the pointer to the field. For cases where the print-formatter has to have access to the length of the field, there is no clean way to currently do it. In order to resolve this, update the print-formatter's prototype to take the length of the field as a third parameter. This change should improve the overall robustness and flexibility of AcpiView. Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com> Cc: James Morse <james.Morse@arm.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Thomas Abraham <thomas.abraham@arm.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg/AcpiView: Update field-validator prototypeRohit Mathew2024-08-0119-137/+266
| | | | | | | | | | | | | | | | | | | | | As of now, the field-validator implemented by FNPTR_FIELD_VALIDATOR function pointer takes two parameters, the pointer to the field and a context pointer. For cases where the validator has to have access to the length of the field, there is no clean way to currently do it. In order to resolve this, this commit updates the field-validator's prototype to take the length of the field as an additional parameter. This enhancement allows field validators to perform more comprehensive validation, especially when the length of the field is critical to the validation logic. This change should improve the overall robustness and flexibility of AcpiView. Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com> Cc: James Morse <james.Morse@arm.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Thomas Abraham <thomas.abraham@arm.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: Correct smbiosview strings for SMBIOS Type0HoraceX Lien2024-07-252-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>
* ShellPkg: Support parser of MADT for LoongArch64Dongyan Qian2024-07-241-0/+178
| | | | | | | | | | | | | | Parse CORE_PIC, LIO_PIC, HT_PIC, EIO_PIC, MSI_PIC, BIO_PIC and LPC_PIC tables in ACPI SPEC 6.5. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4306 Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Co-authored-by: Jinwei Wang <wangjinwei@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Chao Li <lichao@loongson.cn>
* ShellPkg/Acpiview: Add HEST Parserlevi.yun2024-07-234-1/+982
| | | | | | | | | | | | Add a new pareser for the Hardware Error Source Table (HEST). The HEST table is used to describe a system's hardware error sources to OSPM. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: levi.yun <yeoreum.yun@arm.com>
* ShellPkg: Changes to print Type17 in SmbiosviewShenbagadevi R2024-07-231-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>
* ShellPkg/Acpiview: Add EINJ Parserlevi.yun2024-07-174-0/+381
| | | | | | | | | | | | | | | | Add a new parser for the Error Injection Table (EINJ). The EINJ table provides machinism through which OSPM can inject hardware errors to the platform without requiring platform specific OSPM software. Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: levi.yun <yeoreum.yun@arm.com>
* ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.cSam Kaynor2024-07-103-0/+89
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the UEFI Conformance Profiles Table using Dmem.c Uses header file for GUIDs added in previous patches Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> Tested-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Stuart Yoder <stuart.yoder@arm.com>
* ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.cSam Kaynor2024-07-102-0/+139
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the Image Execution Table using Dmem.c Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> Tested-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.cSam Kaynor2024-07-102-4/+85
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented the dumping of the UEFI RT Properties Table using Dmem.c Added new entry to the help command for the -verbose option Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> Tested-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/Pci.c: Update supported link speed to PCIe Gen6HoraceX Lien2024-06-071-0/+6
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4779 Refer to PCI express base specification Reversion 6.2, table 7-23 Link Capabilities Register. Supported Link Speeds Vector bit 5: speed 64 GT/s. Add the support to shell command 'pci'. Signed-off-by: HoraceX Lien <horacex.lien@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/SmbiosView: Support New ProcessorUpgrade for SMBIOS Type4Jason Lou2024-04-161-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>
* ShellPkg: Update smbiosview type 4 with SMBIOS 3.6 fieldsHoraceX Lien2024-04-101-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>
* ShellPkg/Acpiview: Adds ACPI WSMT Table parseAbdul Lateef Attar2024-03-254-0/+166
| | | | | | | | | | Adds WSMT parse to the UefiShellAcpiViewCommandLib library. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/Acpiview: Adds HPET parserAbdul Lateef Attar2024-03-254-0/+241
| | | | | | | | | | Adds HPET parse to the UefiShellAcpiViewCommandLib library. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/SmbiosView: Support New ProcessorFamily for SMBIOS Type4Jason Lou2024-03-041-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>
* ShellPkg: Update smbiosview for LoongArchDongyan Qian2024-02-022-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>
* ShellPkg: Tidy for code readabilityDaniel Nguyen2023-12-181-19/+24
| | | | | | | | | | | Use error handling instead of success handling. Less indented logic is easier to read. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Daniel Nguyen <daniel.nguyen@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Fix typosPage Chen2023-12-0827-76/+76
| | | | | | | | | | | | | | | | | | | | begining->beginning dirve->drive duplicat->duplicate fuly->fully Funciton->Function Functino->Function optioanl->optional poitners->pointers rountine->routine sucessful->successful sucessfully->successfully Signed-off-by: Page Chen <paiching_chen@apple.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Andrew Fish <afish@apple.com> Message-Id: <829d2bed2a848229d719d7ae7b64ef1a47782720.1699557986.git.paiching_chen@apple.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Acpiview: Update MADT parser for TRBE interruptSami Mujawar2023-10-301-2/+46
| | | | | | | | | | | | | | | | | ACPI 6.5 introduces a new filed to the MADT GICC structure to specify the TRBE interrupt. The TRBE interrupt is a Processor Private interrupt (PPI) and is used to specify a platform-specific interrupt to signal TRBE events. Therefore, update the MADT GICC structure parser to parse the new TRBE interrupt field. Also, add validations to check that the TRBE interrupt is within the PPI interrupt range. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
* ShellPkg: Increase PcdShellPrintBufferSize from UINT16 to UINT32Giri Mudusuru2023-10-171-9/+10
| | | | | | | | | | Increase max buffer size to support more than 64K. Signed-off-by: Giri Mudusuru <girim@apple.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/UefiShellNetwork2CommandsLib: Check array index before accessMichael Kubacki2023-09-081-1/+1
| | | | | | | | | | | | Moves the range check for the index into the array before attempting any accesses using the array index. Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0Eduardo Cuevas Farfan2023-08-311-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>
* ShellPkg/SmbiosView: Update display of PCIe system slot IDNhi Pham2023-08-301-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>
* ShellPkg/SmbiosView: type 45 and type 46 support.Simon Wang2023-06-084-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>
* ShellPkgDisconnect: zero-initialize handlesGerd Hoffmann2023-06-021-6/+13
| | | | | | | | | | | | | | | | | In case ShellConvertStringToUint64() fails the Handles are left uninitialized. That can for example happen for Handle2 and Handle3 in case only one parameter was specified on the command line. Which can trigger the ASSERT() in line 185. Reproducer: boot ovmf to efi shell in qemu, using q35 machine type, then try disconnect the sata controller in efi shell. Fix that by explicitly setting them to NULL in that case. While being at it also simplify the logic and avoid pointlessly calling ShellConvertStringToUint64() in case ParamN is NULL. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Add a condition to print accurate type0 Bios Size in smbiosview.Thejaswani Putta2023-06-021-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>
* ShellPkg/UefiShellDebug1CommandsLib: Replace hardcoded SMBIOS strings.Giri Mudusuru2023-05-122-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>
* ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.cSam Kaynor2023-04-133-13/+123
| | | | | | | | | | | | Added entries for UEFI Config Tables not present in current Dmem output. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
* ShellPkg: Update smbiosview type 0/4/17/41 with SMBIOS 3.5 fieldsLin, MillerX2023-04-112-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>
* ShellPkg: Fix conditionally uninitialized variablesMichael Kubacki2023-04-036-60/+75
| | | | | | | | | | | | | | | Fixes CodeQL alerts for CWE-457: https://cwe.mitre.org/data/definitions/457.html Cc: Erich McMillan <emcmillan@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Co-authored-by: Erich McMillan <emcmillan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
* ShellPkg/Library: Fix 32-bit truncation of pointer valuesMichael D Kinney2023-03-135-44/+12
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4366 Update C and UNI files that are incorrectly using %x or %08x instead of %p for pointer values. On 64-bit systems, this is truncating pointer values above 4GB. In reviewing ShellPkg for this issue some unused UNI strings with incorrect format specifiers were removed instead of being fixed. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* ShellPkg: Improve "ping" output by adding equals sign after timeRebecca Cran2023-03-062-2/+2
| | | | | | | | | | | | | | | The output of the "ping" command shows the time without a space between the label and the value. e.g.: 20 bytes from 192.168.0.1 : icmp_seq=1 ttl=1 time1~2ms Improve the readability and consistency by adding an equals sign for the time value: 20 bytes from 192.168.0.1 : icmp_seq=1 ttl=1 time=1~2ms Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/AcpiView: ERST ParserJeshua Smith2023-02-024-0/+304
| | | | | | | | | Add a new parser for the Error Record Serialization Table. The ERST table describes how an OS can save and retrieve hardware error information to and from a persistent store. Signed-off-by: Jeshua Smith <jeshuas@nvidia.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Display SMBIOS Type38 fields in smbiosview in formatted viewPrakash.K2023-01-182-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>
* ShellPkg/AcpiView: APMT ParserJeff Brasen2022-12-135-0/+130
| | | | | | | | | | Add a new parser for the Arm Performance Monitoring Unit Table. The APMT table describes the properties of PMU support implemented by components in an Arm-based system. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg/SmbiosView: Update ProcessorUpgradeTableZhang, JuX2022-11-281-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>
* ShellPkg:Improved Smbios Type9 data under smbiosviewSainadh Nagolu2022-11-112-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>
* ShellPkg: Update shell command memmap to show unaccepted memoryMin M Xu2022-11-012-1/+15
| | | | | | | | | | | | | | | | | | RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937 ShellCommandRunMemMap() is updated to handle the case of unaccepted memory type. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* ShellPkg/AcpiView: Update PCCT fields for ACPI 6.5Pierre Gondois2022-10-311-3/+3
| | | | | | | | | | | | | The ACPI specification updated some terms in accordance with: s1.1.1 Principle of Inclusive Terminology Update the PCCT parser accordincly with these new terms. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: Adds Local APIC parser to AcpiViewAbdul Lateef Attar2022-08-311-7/+67
| | | | | | | | | | Parse Type 0 or Local APIC structure. Also parse the Local APIC Flags as bitfields. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Abdul Lateef Attar <abdattar@amd.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* Revert "ShellPkg: Adds Local APIC parser to AcpiView"Liming Gao2022-08-281-67/+7
| | | | | | | | This reverts commit d5fd86f256b9ab5b4e3aff70d3c177c18faea892 for tag202208. This feature will be merged after stable tag 202208 is created. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Ard Biesheuvel <ardb@kernel.org>