Commit Graph

1071 Commits

Author SHA1 Message Date
Pierre Gondois e53cf2412a ShellPkg/UefiShellLevel2CommandsLib: Add helper for reset -fwui option
Following the UEFI Shell Specification revision 2.2,
add helper for the '-fwui' option of the reset command.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2024-12-09 17:16:58 +00:00
Oliver Smith-Denny 334f574886 ShellPkg: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
 - cpp/comparison-with-wider-type
 - cpp/overflow-buffer
 - cpp/redundant-null-check-param
 - cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Oliver Smith-Denny c80c222198 ShellPkg: UefiShellCommandLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
 - cpp/comparison-with-wider-type
 - cpp/overflow-buffer
 - cpp/redundant-null-check-param
 - cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Oliver Smith-Denny c69e5e647d ShellPkg: UefiShellDriver1CommandsLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
 - cpp/comparison-with-wider-type
 - cpp/overflow-buffer
 - cpp/redundant-null-check-param
 - cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Oliver Smith-Denny 86d91f4454 ShellPkg: UefiShellLevel1CommandsLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
 - cpp/comparison-with-wider-type
 - cpp/overflow-buffer
 - cpp/redundant-null-check-param
 - cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Oliver Smith-Denny 17ad30ae23 ShellPkg: UefiShellLevel2CommandsLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
- cpp/comparison-with-wider-type
- cpp/overflow-buffer
- cpp/redundant-null-check-param
- cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Oliver Smith-Denny 040afc1e3b ShellPkg: UefiShellDebug1CommandsLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
- cpp/comparison-with-wider-type
- cpp/overflow-buffer
- cpp/redundant-null-check-param
- cpp/uselesstest

Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29 02:09:18 +00:00
Revathy V 4ab8c3cf99 ShellPkg: Updated Type 4 Info as per Smbios 3.8.0
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4861

Added PROCESSOR_FAMILY_NAME support in ShellPkg.

Signed-off-by: Revathy <revathyv@ami.com>
2024-10-22 18:25:54 +00:00
Jason Zhao e2ab098e65 ShellPkg/SmbiosView: Correct wrong length offset usage in SMBIOS Type4
The patch will correct wrong length offset usage in SMBIOS Type4.
For SMBIOS Ver3.6, length should be larger than 0x30.
For SMBIOS Ver3.8, length should be larger than 0x32.

Signed-off-by: Jason Zhao <jason.zhao@intel.com>
2024-10-22 03:57:20 +00:00
Tormod Volden 54469a6918 ShellPkg: Fix Optional Data rewriting with bcfg
When modifying the Optional Data of a boot option with bcfg boot -opt
the result was corrupted data, for instance a concatenation of old data,
heap contents, and new data. This was due to a erronous calculation of
the original optional data length.

In addition to fixing the calculation, add explaining comments and
introduce a helper variable, to not abuse other variables and confuse
readers (including the author).

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-10-04 21:11:41 +00:00
Tormod Volden b21cf3bd5b ShellPkg: ShellLevel2StripQuotes: Strip consecutive quotes
When a quotation mark was found, the remaining line would be shifted
in-place to get rid of it. However, the "walker" index would still be
increased and therefore the first character of the shifted part would be
skipped. This means a second quotation mark would not be deleted.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-10-04 19:34:05 +00:00
Carsten Haitzler df884297fd ShellPkg/AcpiView: RASF Parser
Add a new parser for the RASF Table as specified in ACPI6.5

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-10-04 17:48:11 +00:00
Carsten Haitzler c82bf392c5 ShellPkg/AcpiView: RAS2 Parser - Remove unused define
Remove unused define from RAS2 parser

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-10-04 16:23:55 +00:00
Heinrich Schuchardt b8122cc9d8 ShellPkg: add missing linefeed in reset message
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>
2024-09-24 16:46:26 +00:00
Carsten Haitzler 1197fb3383 ShellPkg/AcpiView: RAS2 Parser
Add a new parser for the RAS2 Table as specified in ACPI6.5

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-09-12 08:51:25 +00:00
Carsten Haitzler 3151798123 ShellPkg: Acpiview: Add GICC field parsing
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>
2024-09-05 07:43:01 +00:00
Jason Zhao e48acc0fa9 ShellPkg/SmbiosView: Add new Socket Type for SMBIOS Type4
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>
2024-09-03 14:19:55 +00:00
HoraceX Lien 7cde720e51 ShellPkg: Correct smbiosview strings and conditions for SMBIOS Type9
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-08-28 19:58:00 +00:00
Rohit Mathew b0e7a75a49 ShellPkg/AcpiView: Add MPAM Parser
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>
2024-08-01 17:20:10 +00:00
Rohit Mathew 3c8133ba87 ShellPkg: acpiview: Add routines to print reserved fields
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>
2024-08-01 17:20:10 +00:00
Rohit Mathew 8a036c8913 ShellPkg: acpiview: Add routine to print 16 chars
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>
2024-08-01 17:20:10 +00:00
Rohit Mathew 9e865f9579 ShellPkg/AcpiView: Update print-formatter prototype
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>
2024-08-01 17:20:10 +00:00
Rohit Mathew 107d0c3800 ShellPkg/AcpiView: Update field-validator prototype
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>
2024-08-01 17:20:10 +00:00
HoraceX Lien 8665187b01 ShellPkg: Correct smbiosview strings for SMBIOS Type0
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-25 09:21:39 +00:00
Dongyan Qian d4ae23b1e6 ShellPkg: Support parser of MADT for LoongArch64
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>
2024-07-24 08:00:05 +00:00
levi.yun f96298d75c ShellPkg/Acpiview: Add HEST Parser
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>
2024-07-23 11:07:42 +00:00
Shenbagadevi R 46eb0ca29b ShellPkg: Changes to print Type17 in Smbiosview
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-07-23 08:31:44 +00:00
levi.yun 23d3fc056d ShellPkg/Acpiview: Add EINJ Parser
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>
2024-07-17 16:01:23 +00:00
Sam Kaynor 497766f709 ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c
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>
2024-07-10 06:13:07 +00:00
Sam Kaynor f46b5b06c6 ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c
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>
2024-07-10 06:13:07 +00:00
Sam Kaynor 749065300a ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c
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>
2024-07-10 06:13:07 +00:00
HoraceX Lien 665b223d57 ShellPkg/Pci.c: Update supported link speed to PCIe Gen6
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>
2024-06-07 09:06:49 +00:00
Jason Lou 7ea05d8fe9 ShellPkg/SmbiosView: Support New ProcessorUpgrade for SMBIOS Type4
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-16 08:25:44 +00:00
HoraceX Lien 963671d380 ShellPkg: Update smbiosview type 4 with SMBIOS 3.6 fields
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-04-10 02:01:37 +00:00
Abdul Lateef Attar cf58f47623 ShellPkg/Acpiview: Adds ACPI WSMT Table parse
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>
2024-03-25 07:52:04 +00:00
Abdul Lateef Attar 4b9312de05 ShellPkg/Acpiview: Adds HPET parser
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>
2024-03-25 07:52:04 +00:00
Jason Lou 3775122ede ShellPkg/SmbiosView: Support New ProcessorFamily for SMBIOS Type4
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-03-04 07:38:26 +00:00
Dongyan Qian 927ea1364d ShellPkg: Update smbiosview for LoongArch
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>
2024-02-02 01:52:58 +00:00
Daniel Nguyen 74daeded0c ShellPkg: Tidy for code readability
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>
2023-12-18 06:11:49 +00:00
Page Chen fe2abc9b74 ShellPkg: Fix typos
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>
2023-12-08 13:25:11 +00:00
Sami Mujawar 2b0d117b4b ShellPkg: Acpiview: Update MADT parser for TRBE interrupt
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>
2023-10-30 12:16:56 +00:00
Giri Mudusuru a445e1a42c ShellPkg: Increase PcdShellPrintBufferSize from UINT16 to UINT32
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>
2023-10-17 03:04:05 +00:00
Michael Kubacki 493a375eef ShellPkg/UefiShellNetwork2CommandsLib: Check array index before access
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>
2023-09-08 15:02:35 +00:00
Eduardo Cuevas Farfan 4c8144dd66 ShellPkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0
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-31 13:20:19 +00:00
Nhi Pham a481c11144 ShellPkg/SmbiosView: Update display of PCIe system slot ID
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-08-30 08:16:24 +00:00
Simon Wang 8314a85893 ShellPkg/SmbiosView: type 45 and type 46 support.
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-08 07:11:06 +00:00
Gerd Hoffmann a8acc12dfd ShellPkgDisconnect: zero-initialize handles
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>
2023-06-02 08:34:00 +00:00
Thejaswani Putta 78262899d2 ShellPkg: Add a condition to print accurate type0 Bios Size in smbiosview.
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-06-02 07:36:02 +00:00
Giri Mudusuru 0b37723186 ShellPkg/UefiShellDebug1CommandsLib: Replace hardcoded SMBIOS strings.
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-05-12 05:09:14 +00:00
Sam Kaynor 42b0443599 ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c
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>
2023-04-13 05:52:32 +00:00