summaryrefslogtreecommitdiff
path: root/ShellPkg/Library
AgeCommit message (Collapse)AuthorFilesLines
8 daysShellPkg/SmbiosView: Add decode for DSP0134 SMBIOS Spec v3.9.0Giri Mudusuru1-0/+9
Add decode for Type17 Memory based on SMBIOS Spec v3.9.0 Signed-off-by: Giri Mudusuru <girimudusuru@microsoft.com>
12 daysShellPkg: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUIDGowtham M2-2/+0
As EFI_UNICODE_COLLATION_PROTOCOL_GUID is being deprecated. Remove the instances used in ShellPkg. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
12 daysShellPkg/Library: Deprecate EFI_DEVICE_IO_PROTOCOLGowtham M5-5/+0
gEfiDeviceIoProtocolGuid identifies EFI_DEVICE_IO_PROTOCOL, which provided low-level I/O and MMIO access for UEFI drivers. It was removed in UEFI 2.10A and 2.11 due to overlapping functionality with modern protocols like EFI_PCI_IO_PROTOCOL and EFI_CPU_IO2_PROTOCOL. These newer protocols offer improved modularity, abstraction, and safety, making EFI_DEVICE_IO_PROTOCOL obsolete. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
12 daysShellPkg/Library: Deprecate EFI_IP4_CONFIG_PROTOCOLGowtham M3-3/+0
EFI_IP4_CONFIG_PROTOCOL is superseded by EFI_IP4_CONFIG2_PROTOCOL, which provides better support for modern network stack requirements. It was officially removed from UEFI specifications 2.10A and 2.11 and should no longer be used in current implementations. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
12 daysShellPkg: Add support for PCIe Extended IDsNanjinmoorthyj2-2/+41
Add a support to print PTM (001F) structure. Signed-off-by: Nanjinmoorthy <nanjinmoorthyj@ami.com>
2025-09-02ShellPkg/UefiShellDebug1CommandsLib: Add MRDIMM entry to QueryTableNing Feng1-0/+12
Added the MRDIMM (0x08) entry to the MemoryDeviceMemoryTechnologyTable in QueryTable.c. This enables proper display and decoding of MRDIMM memory technology in SMBIOS Type 17 structures. Signed-off-by: Ning Feng <ning.feng@intel.com>
2025-08-12ShellPkg: Remove EmbeddedPkg dependencyedk2-stable202508Prachotan Bathi1-1/+0
Commit dcde148 introduced EmbeddedPkg as a dependency since gFdtTableGuid was in the EmbeddedPkg, but has now been moved to MdePkg. Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-25ShellPkg/Library: Remove unecessary error checkNanjinmoorthyj1-4/+0
Remove the error handling from the connect.c file as it is redundant. Signed-off-by: Nanjinmoorthy <nanjinmoorthyj@ami.com>
2025-07-24ShellPkg: Fixed Deadcode and Null field Coverity warnings.Revathy V2-19/+37
Updated fixes for all Deadcode and Null field Coverity fixes in ShellPkg Signed-off-by: Revathy <revathyv@ami.com>
2025-07-24ShellPkg: DtbTableAddress via config in dmemPrachotan Reddy Bathi2-0/+7
DTB address can be modified through the config table. Use this address in dmem output. EmbeddedPkg dependency added to ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf and ShellPkg/ShellPkg.ci.yaml Adds to: 42b0443599a6 ("ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c") Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-08ShellPkg: Remove UGA supportGuoMinJ4-8/+0
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-04ShellPkg: Correct spelling errors and typosAbdul Lateef Attar3-5/+8
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-06-13ShellPkg/UefiShellLib: Fix Buffer underflowPierre Gondois1-2/+4
Having StrLen(Buffer) == 0 results in a Buffer underflow. Also, StrLen iterates over the Buffer elements until finding a NULL character. This results in a quadratic search for '\r' characters in the while loop. Fix these issues. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-13ShellPkg/UefiShellLevel2CommandLib: Free Buffer after usePierre Gondois1-0/+2
Free the allocated Buffer after use. Reported-by: Ramesh R <rameshr@ami.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-08ShellPkg: Prevent memcpy intrinsics in VS22 (17.14.2)Michael Kubacki2-30/+15
The latest VS2022 update replaces some code patterns with struct assignments with `memcpy`. This change convert the code to explicitly use `CopyMem`. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-30ShellPkg: Add PCIe extended capabilityCian Costello2-0/+1157
Updates PCIe shell command to display previously undefined PCIe extended capabilities. Signed-off-by: Cian Costello <ccostello@nvidia.com>
2025-04-22ShellPkg: Updated Memory Form Factor definition per SMBIOS 3.8.0Shveta Gupta1-1/+5
This patch adds additional support for the new CAMM form factor defined in SMBIOS specification 3.8.0 Signed-off-by: Shveta Gupta <shvetag@nvidia.com>
2025-04-17ShellPkg: AcpiView: Add parser support for SPCR Revision 4Sarah Walker1-21/+86
Revision 4 adds fields for UART clock frequency, precise baud rate and ACPI object namespace string. The revision 4 specification is at https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-04-08ShellPkg: Added ArmV9 processors support for SmbiosView commandpraveensankarn1-0/+4
Added switch case for ArmV9 processor family inside function DisplayProcessorFamily2 in PrintInfo.c to avoid inappropriate data shown while accessing Type 4 Smbios table. ArmV9 processor family is added in Smbios Spec 3.8 which should be noted. Signed-off-by: Praveen Sankar N <praveensankarn@ami.com>
2025-04-02ShellPkg/SmbiosView: Decode for InterfaceTypeSpecificData of SMBIOS type42edhay1-1/+36
ShellPkg/SmbiosView tool changes for InterfaceTypeSpecificData decode and print Previously, the InterfaceTypeSpecificData of SMBIOS type42 table was dumped as hex in the SmbiosView tool output This commit adds decode, interpretation and print as per SMBIOS spec version 3.8.0 Signed-off-by: G Edhaya Chandran <edhaya.chandran@arm.com>
2025-03-06ShellPkg: drop support for obsolete EFI_USB_HC_PROTOCOLLeif Lindholm4-4/+0
EFI_USB_HC_PROTOCOL was never defined in a released UEFI specification, so drop use of it in ShellPkg in preparation of deleting the definitions based on something allegedly supported in confidential EFI 1.10. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-01-29ShellPkg: fix warnings about uninitialized variableMike Maslenkin1-10/+13
Dmem.c: In function 'GetImageExecutionInfo': Dmem.c:241:10: error: 'Status' may be used uninitialized in this function [-Werror=maybe-uninitialized] return Status; ^~~~~~ Dmem.c:284:35: note: 'Status' was declared here EFI_STATUS Status; ^~~~~~ Dmem.c: In function 'ShellCommandRunDmem': Dmem.c:586:27: error: 'ConformanceProfileTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayConformanceProfiles (ConformanceProfileTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dmem.c:582:27: error: 'ImageExecutionTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayImageExecutionEntries (ImageExecutionTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dmem.c:578:27: error: 'RtPropertiesTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayRtProperties (RtPropertiesTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2025-01-24command drvcfg ASSERTzhu rui1-6/+0
REF: https://github.com/tianocore/edk2/issues/10626 Issue command drvcfg directly, system halt Signed-off-by: "Zhu, Cliff" <Cliff.zhu@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2025-01-09ShellPkg: AcpiView: TPM2 parser for Arm FF-ASarah Walker1-0/+21
Add support for the ARM FF-A Start Method Specific Parameters to the TPM2 parser Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-01-09ShellPkg: AcpiView: TPM2 ParserSarah Walker4-0/+153
Add a new parser for the TPM2 Table as specified in the TCG ACPI Specification v1.4 Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2024-12-17ShellPkg/AcpiView: RAS2 Parser - check validity of PCC CountCarsten Haitzler1-1/+16
This checks the number of PCC descriptor entries provided match the count set in the table, and if they don't indicate a warning. Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-12-16ShellPkg/UefiShellLib: Accept "0 " as valid numeric stringTormod Volden1-7/+11
InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or "00 " as valid numeric strings. After skipping the "0" digits as leading zeroes, it would check if the next character is a valid hex or decimal digit, which would then fail on the terminating character. Therefore return success if "leading" zeroes have been consumed and there are no more characters. InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 " as valid numeric strings. After skipping the "0" digits as leading zeroes, it would find itself surprised by the following space. Restrict the "bad space" check to the case where it had just consumed the "x" or "X" marker. Otherwise the space is fine (depending on StopAtSpace either end of number or interspersed space) since there were only zeroes so far. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3080 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16ShellPkg/UefiShellLib: Only write value if successful conversionTormod Volden1-5/+7
The ShellConvertStringToUint64() function documentation says: "Upon a successful return the value of the conversion." So do not write any value if the conversion failed. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16ShellPkg/UefiShellLib: Simplify check for empty stringTormod Volden1-2/+2
StrSize() uses StrLen() which counts until the terminating NULL character. For checking for an empty string it is more efficient to directly check for the NULL terminator instead of calling StrSize(). Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16ShellPkg/UefiShellLib: Correct check for empty stringTormod Volden1-2/+2
StrSize() will never return zero since it counts the terminating NULL character. An empty string will have the storage size of the terminator. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16ShellPkg/UefiShellLib: Prevent out-of-bounds accessTormod Volden1-2/+5
If InternalShellStrHexToUint64() is passed a string that starts with 'X' or 'x' it would try to read the byte before the start of the string buffer. Instead check if leading zeroes have been consumed. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-09ShellPkg/UefiShellLevel2CommandsLib: Add helper for reset -fwui optionPierre Gondois1-0/+2
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-10-29ShellPkg: CodeQL FixesOliver Smith-Denny20-59/+224
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-29ShellPkg: UefiShellCommandLib: CodeQL FixesOliver Smith-Denny3-21/+52
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-29ShellPkg: UefiShellDriver1CommandsLib: CodeQL FixesOliver Smith-Denny10-87/+259
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-29ShellPkg: UefiShellLevel1CommandsLib: CodeQL FixesOliver Smith-Denny4-3/+33
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-29ShellPkg: UefiShellLevel2CommandsLib: CodeQL FixesOliver Smith-Denny7-37/+85
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-29ShellPkg: UefiShellDebug1CommandsLib: CodeQL FixesOliver Smith-Denny23-30/+159
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-22ShellPkg: Updated Type 4 Info as per Smbios 3.8.0Revathy V1-0/+4
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-22ShellPkg/SmbiosView: Correct wrong length offset usage in SMBIOS Type4Jason Zhao1-2/+2
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-04ShellPkg: Fix Optional Data rewriting with bcfgTormod Volden1-5/+9
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-04ShellPkg: ShellLevel2StripQuotes: Strip consecutive quotesTormod Volden1-1/+3
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-04ShellPkg/AcpiView: RASF ParserCarsten Haitzler4-0/+86
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-04ShellPkg/AcpiView: RAS2 Parser - Remove unused defineCarsten Haitzler1-3/+0
Remove unused define from RAS2 parser Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-09-24ShellPkg: add missing linefeed in reset messageHeinrich Schuchardt1-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>
2024-09-12ShellPkg/AcpiView: RAS2 ParserCarsten Haitzler4-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>
2024-09-05ShellPkg: Acpiview: Add GICC field parsingCarsten Haitzler1-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>
2024-09-03ShellPkg/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>
2024-08-28ShellPkg: 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-08-01ShellPkg/AcpiView: Add MPAM ParserRohit Mathew5-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>