summaryrefslogtreecommitdiff
path: root/ShellPkg
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 M3-10/+1
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 Bathi2-2/+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 V4-33/+59
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 Bathi3-0/+8
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-23ShellPkg: Shell Validate parameter before use.Aaron Pop1-3/+5
When FvSimpleFileSystem is included in a firmware image, the FV is accessible as a simple file system. Shell contained a bad assumption that the FileDevicepath, the path where the efi shell was loaded from, was always a Media device path/media vendor device path. It would make a blind cast of the device path node. Add a check to verify device path type/subtype before casting the node to a FILEPATH_DEVICE_PATH. Signed-off-by: Aaron Pop <aaronpop@microsoft.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: Remove PcdShellSupportOldProtocolsPierre Gondois4-17/+1
PcdShellSupportOldProtocols aimed to force using the following protocols: - gEfiShellEnvironment2Guid - gEfiShellInterfaceGuid over the UEFI Shell 2.0 protocols: - gEfiShellProtocolGuid These 2 protocols seem to originate from the original EDK(1) implementation and are now deprecated. The protocols are not implemented in EDK2. Remove the PcdShellSupportOldProtocols which does not switch to using the original shell protocols. Setting the PCD to TRUE prevents from loading the UEFI Shell. Signed-off-by: Pierre Gondois <pierre.gondois@arm.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-05-28ShellPkg: Removed Pei, Dxe, Smm and mm header filesBhavani Subramanian1-4/+0
Signed-off-by: Bhavani Subramanian <v-bhavanisu@microsoft.com>
2025-05-28ShellPkg: Removed comments on ShellPkgHostTest.dsc as per PR reviewBhavani Subramanian1-3/+0
Signed-off-by: Bhavani Subramanian <v-bhavanisu@microsoft.com>
2025-05-28ShellPkg: Added MockShellCommandLibBhavani Subramanian4-0/+352
Signed-off-by: Bhavani Subramanian <v-bhavanisu@microsoft.com>
2025-05-28ShellPkg: Added MockShellLibBhavani Subramanian6-1/+537
Signed-off-by: Bhavani Subramanian <v-bhavanisu@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-24ShellPkg Http.c: Remove extra `\n` when using `-m` paramYang Gang1-1/+1
There is already `PRINT_HII (STRING_TOKEN (STR_GEN_CRLF), NULL);` after `DownloadFile()`, remove this extra `\n` to avoid printing extra blank lines. Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
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-11-24ShellPkg: Fix check on OldArgv in UpdateArgcArgv()Tormod Volden1-1/+1
The UpdateArgcArgv() function documentation says "If OldArgv or OldArgc is NULL then that value is not returned." However, only OldArgc was checked for NULL, probably because of copy-pasto. In case OldArgc was non-NULL, but OldArgv was null, it could cause a segmentation fault. Check OldArgv is not NULL before dereferencing the value. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-11-13MdePkg: MdeLibs.dsc.inc: Apply StackCheckLibNull to All Module TypesOliver Smith-Denny1-4/+0
Now that the ResetVectors are USER_DEFINED modules, they will not be linked against StackCheckLibNull, which were the only modules causing issues. So, we can now remove the kludge we had before and the requirement for every DSC to include StackCheckLibNull for SEC modules and just apply StackCheckLibNull globally. This also changes every DSC to drop the SEC definition of StackCheckLibNull. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-10-29ShellPkg: CodeQL FixesOliver Smith-Denny21-60/+225
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: DynamicCommand: CodeQL FixesOliver Smith-Denny2-1/+9
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: Shell: CodeQL FixesOliver Smith-Denny5-39/+151
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-Denny24-30/+161
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>