summaryrefslogtreecommitdiffstats
path: root/ShellPkg
Commit message (Collapse)AuthorAgeFilesLines
* ShellPkg: acpiview: Make '-h' option not require a parameterKrzysztof Koch2019-07-022-31/+5
| | | | | | | | | | | | | | | Make the -h command line option a binary flag. Now, colour highlighting is enabled whenever this flag is set (stateless), instead of being dependent on previous acpiview command invocations. By removing the parameter required with the -h flag the command line parsing logic becomes simpler. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Remove duplicate indentation in IORT parserKrzysztof Koch2019-07-021-9/+9
| | | | | | | | | | | | | | | | Remove redundant whitespace characters at the beginning of the strings describing IORT table field names. When dumping ACPI table contents, the indentation level for printing field names is controled using the 'Indent' argument to the 'ParseAcpi' function. In the IORT acpiview parser, both 'Indent' and extra whitespace characters are used for indentation, which results in excess indentation. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Remove '-v' flag from allowed command line argsKrzysztof Koch2019-07-022-5/+1
| | | | | | | | | | | | | | | | According to the acpiview documentation, the -v flag enables verbose output and it is set on default. Moreover, the acpiview UEFI shell tool dumps the same output with and without this flag set. Therefore this patch removes the superfluous -v flag from allowed command line parameters. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Remove redundant IORT node types enumKrzysztof Koch2019-07-021-22/+8
| | | | | | | | | | Replace the enum defining valid node types in the IORT table with macros from IoRemappingTable.h. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Allow disabling consistency checks (-q flag)Krzysztof Koch2019-07-025-9/+65
| | | | | | | | | | | | | | | | | | | | | | The current documentation for the acpiview UEFI shell tool states that the '-c' flag enables consistency checks on ACPI table data. However, these checks are enabled anyway by default. This patch keeps ACPI table validation as a default option, but it makes it possible to turn ACPI table validation off by setting the newly-introduced '-q' flag. Consequently, the '-c' flag is removed. The remaining code changes in this patch make a number of consistency checks optional (but enabled by default): 1. ACPI table field offset mismatch. 2. ACPI table field validation functions provided in the ACPI_PARSER arrays. 3. Table checksum computation. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Make DBG2 output consistent with other tablesKrzysztof Koch2019-07-021-1/+2
| | | | | | | | | | | | | Print an extra newline character at the end DBG2 table parsing in order to make the output resemble the one for other ACPI table parsers. With this change, there is now a blank line between the DBG2 table dump and the 'Table Statistics' section. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reportingKrzysztof Koch2019-07-021-4/+4
| | | | | | | | | | | | | | Move printing double newline character ('\n\n') from the beginning of ACPI table checksum validation message to the end of the raw binary data dump. This way acpiview table dump looks similar regardless of whether Table Checksum is validated or not. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Remove '/?' from valid command line flagsKrzysztof Koch2019-07-021-2/+1
| | | | | | | | | | | | Acpiview currently allows displaying help info by specifying both -? and /? flags. This patch removes /? from valid command line flags that can be passed to the acpiview tool, as this flag is not used for such purpose in other UEFI shell commands. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg: acpiview: Improve PPTT table field validationKrzysztof Koch2019-07-022-10/+130
| | | | | | | | | | | | | | Add Cache Structure (Type 1) 'Number of sets' and 'Associativity' field validation in the acpiview Processor Properties Topology Table (PPTT) parser. Replace literal values with precompiler macros for existing Cache Structure validation functions. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ShellPkg/UefiShellLib: Set input pointer parameter to null if failureBret Barkelew2019-07-011-0/+5
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1906 While failed to allocate memory to save the response, set the input/output parameter 'Response'(VOID **) to NULL to indicate the failure not only depend on the returned status. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* ShellPkg: acpiview: ACPI 6.3 update for MADT parserKrzysztof Koch2019-06-172-8/+118
| | | | | | | | | | | | | | | | | | | The ACPI 6.3 specification introduces a 'SPE overflow Interrupt' field as part of the GICC structure. Update the MADT parser to decode this field and validate the interrupt ID used. References: - ACPI 6.3 Specification - January 2019 - Arm Generic Interrupt Controller Architecture Specification, GIC architecture version 3 and version 4, issue E - Arm Server Base System Architecture 5.0 Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogDataDandan Bi2019-06-121-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>
* ShellPkg/acpiview: GTDT updates for ACPI 6.3Pierre Gondois2019-06-101-2/+4
| | | | | | | | | | | The ACPI 6.3 specification introduces support to describe the ARMv8.1 virtual EL2 timers. This patch updates the GTDT parser of acpiview to decode the EL2 virtual timer fields. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Add NetworkPkg/NetworkPkg.dec as the package dependencyLiming Gao2019-05-214-4/+8
| | | | | | | | | | | NetLib will be moved from MdeModulePkg and NetworkPkg. So, the module that consumes NetLib need to depend on NetworkPkg.dec. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: Display VENDOR_ID in ASCII when parsing PPTTKrzysztof Koch2019-05-201-1/+1
| | | | | | | | | | | | | | The ID Type Structure (Type 2) inside the Processor Properties Topology Table (PPTT) has a VENDOR_ID field which identifies the node vendor. The approved values are listed in the ACPI ID Registry and they are meant to be interpreted as arrays of ASCII characters. This change to the acpiview parser for PPTT aims to reflect that. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Update DSC to use NetworkPkg's include fragment fileLiming Gao2019-05-191-1/+1
| | | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache attributes validationKrzysztof Koch2019-05-171-3/+0
| | | | | | | | | | | | Removed conditional pre-compiling for ARM CPUs because function ValidateCacheAttributes(..) is based on ACPI PPTT specification. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reported-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Bi Dandan <dandan.bi@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: Add GT Frame Number validation to GTDT parserKrzysztof Koch2019-05-171-2/+45
| | | | | | | | | | The ACPI 6.2 specification mandates that the Generic Timer (GT) Block Timer Structures must have a frame number in the range 0-7. Update the GTDT parser to warn if this condition is violated. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/UefiHandleParsingLib: Remove some unused GuidsShenglei Zhang2019-04-283-51/+0
| | | | | | | | | | | | | | | ExtendedSalBootService.h, ExtendedSalServiceClasses.h and McaInitPmi.h will be deleted. So remove the Guids defined in these Protocols. And also remove strings in uni file. https://bugzilla.tianocore.org/show_bug.cgi?id=1560 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellPkg/UefiShellDebug1CommandsLibShenglei Zhang2019-04-282-6/+0
| | | | | | | | | | | | | | | | With Itanium architecture unsupported, gEfiSalSystemTableGuid and gEfiMpsTableGuid will be no longer used. https://bugzilla.tianocore.org/show_bug.cgi?id=1560 v2:Withdraw the removal of #include <Guid/Mps.h> and gEfiMpsTableGuid. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellPkg: Clarify the description of acpiview option '-s'Zhichao Gao2019-04-111-11/+13
| | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1153 The '-s' option of 'acpiview' do not support multiply invcation options. So clarify it for users. Modify the help decription for UefiShellAcpiViewCommandLib which the description is equal or over 80 column. If the line include equal or over 80 characters. The display engine would display a blank line for those equal 80 characters or a extra line with few words for those over 80 character. So it is better to keep each line less than 80 characters. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-09239-1650/+239
| | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg: Correct a parameter's nameShenglei Zhang2019-03-191-2/+2
| | | | | | | | | | | | The parameter FilePath of ShellOpenFileByName defined in ShellLib.h is incorrect. It should be FileName. https://bugzilla.tianocore.org/show_bug.cgi?id=1221 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Change the note in uniZhichao Gao2019-03-121-1/+7
| | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1146 Add DSDT and SSDT description in the help information. Depend on the implement of UefiShellAcpiViewCommandLib, the "acpiview" command support to show all present type in the system not only support the listed type in the help information. So change the help information of this command. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: add array index check for shell delay optionZhichao Gao2019-02-221-2/+6
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1528 Shell delay option without parameters do not check the index of shell parameter argv. Add index check to avoid invalid pointer references. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellPkg/UefiShellLib: Use BaseLib api CharToUpperShenglei Zhang2019-01-311-30/+3
| | | | | | | | | | | | | | | | Substitute InternalShellCharToUpper with CharToUpper which is a public function with the same effect. Remove the implement of InternalShellCharToUpper. https://bugzilla.tianocore.org/show_bug.cgi?id=1369 Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/Shell: Use BaseLib api CharToUpperShenglei Zhang2019-01-311-23/+2
| | | | | | | | | | | | | | | Substitute InternalShellCharToUpper with a public function CharToUpper which has the same function. Remove the implement of InternalShellCharToUpper. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix VS tool chain build failureDandan Bi2019-01-291-1/+1
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1491 This patch is to update the data type of variable "Offset" from UINT8 to UINT32 to fix following build issue. ...\Parsers\Pptt\PpttParser.c(193): error C2220: warning treated as error - no 'object' file generated ...\Parsers\Pptt\PpttParser.c(193): warning C4244: '=': conversion from 'UINT32' to 'UINT8', possible loss of data Cc: Krzysztof Koch <krzysztof.koch@arm.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/TftpDynamicCommand: Return proper statusVladimir Olovyannikov via edk2-devel2019-01-251-0/+6
| | | | | | | | | | | | | | Tftp command always returned "SHELL_NOT_FOUND" which is treated as an error by callers. Add missing line to clean the ShellStatus on successful operation. If operation has failed, return the error status if available. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1487 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Songpeng Li <songpeng.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Add support for PPTTKrzysztof Koch2019-01-245-4/+391
| | | | | | | | | Added the acpiview parser for the PPTT table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/TftpDynamicCommand: Change file writing method in tftpSongpeng Li2019-01-111-90/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1433 v2: Remove an unused variable. Current logic of shell tftp download was writing file after tftp download finished, when the file is large, it looks like the shell tftp command hanged after download was finished. To improve end-user experience, the solution is using split file writing instead. This patch update the code to open and close file inside DownloadFile(), and save each packet to file within callback function CheckPacket(). Since AllocatePage() is no-longer needed, This patch can also remove the memory limitation. The download file can be larger than system free memory now. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Songpeng Li <songpeng.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* ShellPkg/UefiShellDebug1CommandsLib: Remove the unused function CharToUpperShenglei Zhang2018-12-181-28/+0
| | | | | | | | | | | | | | | CharToUpper is an unused function, so it will be removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1399 v2:Update the title. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ShellPkg: Remove ShellPkg wrapper header filesShenglei Zhang2018-11-224-82/+0
| | | | | | | | | | | | | | These wrapper header files are not referenced by all open source, so they are removed. https://bugzilla.tianocore.org/show_bug.cgi?id=158 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/ShellLib: Fix potential NULL deference issueRuiyu Ni2018-11-081-1/+5
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1310 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/TftpDynamicCommand: Clarify the retry count option in command.Jiaxin Wu2018-11-062-2/+7
| | | | | | | | | | | | | | | [-c <retry count>] is to define the number of times to transmit request packets and wait for a response. The default value is 6. But it doesn't specify the behavior of zero value. Here, The patch is to clear that: Set to zero also means to use the default value. Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg-ShellApp: Provide fully-qualified path to shell scriptsJim.Dailey@dell.com2018-11-051-3/+23
| | | | | | | | | | | | | | | Provide fully-qualified path to shell scripts Section 3.6.2 of version 2.2 of the shell specification requires that the first positional argument (i.e. arg 0) of a shell script resolves to "the full path name of the script itself." Ensure that the startup script and any scripts launched by the shell meet this requirement. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg-UefiShellLib: Add a function to fully-qualify pathsJim.Dailey@dell.com2018-11-052-1/+151
| | | | | | | | | | | | | | | | | | | | | | Add a function to return a clean, fully-qualified version of some path. This function handles a (possibly "dirty") input path that may or may not include a file system reference. If it does not include a file system reference, then if the input path does not begin with a forward or backward slash, then the input path is relative to the current working directory of the current file system. Otherwise, it is an absolute path within the current file system. If it does include a file system reference, it may be a reference to the current or some other file system. If the file system reference is not immediately followed by a forward or backward slash, then the input path is relative to the current working directory of the given file system. Otherwise, it is an absolute path within the given file system. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/dmem: Only dump sizeof (EFI_SYSTEM_TABLE) bytes for gSTRuiyu Ni2018-10-241-1/+1
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1236 When "dmem" runs without additional arguments, it dumps the memory content of EFI_SYSTEM_TABLE. But today's implementation dumps 512 bytes. It's not correct because sizeof (EFI_SYSTEM_TABLE) is less than 512, the 512-read causes page fault exception in a heap-guard enabled environment. The patch changes the implementation to only dump sizeof (EFI_SYSTEM_TABLE) bytes for gST. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jim Dailey <jim_dailey@.com>
* ShellPkg-Cd: Ensure all valid cd targets are handled properlyJim.Dailey@dell.com2018-10-121-4/+4
| | | | | | | | | | | | ShellPkg-Cd: Ensure all valid cd targets are handled properly Make sure that PathCleanUpDirectories() is called on all valid targets of the cd command. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/TftpDynamicCommand: Correct comments to align with the input parameter.Jiaxin Wu2018-10-091-0/+2
| | | | | | | | | | | | | | Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1230 Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Bi Dandan <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Create a homefilesystem environment variableJim.Dailey@dell.com2018-10-031-0/+2
| | | | | | | | | | | | | | | | | | Create a homefilesystem environment variable whose value is the file system on which the executing shell is located. For example: "FS14:". This eliminates the need for people to have to try and find the "boot" file system in their startup script. After this change they can simply execute %homefilesystem% to set the cwd to the root of the file system where the shell is located. A future enhancement could be to add "homefilesystem" to the list of predefined, read-only variables listed in the EfiShellSetEnv function of file ShellProtocol.c Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellDebug1CommandsLib: Remove unused PCDsshenglei2018-09-301-2/+0
| | | | | | | | | | | | | | The PCDs below are unused, so they have been removed from inf. gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib: Remove an unused PCDshenglei2018-09-301-1/+0
| | | | | | | | | | | | | The PCD below is unused, so it has been removed from inf. gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/DpDynamicCommand: Remove unused PCDsshenglei2018-09-302-5/+0
| | | | | | | | | | | | | | | The PCDs below are unused, so they have been removed from inf. gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize in DpApp.inf gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize in DpDynamicCommand.inf Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/Shell: Remove unused PCDsshenglei2018-09-301-2/+0
| | | | | | | | | | | | | | The PCDs below are unused, so they have been removed from inf. gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize gEfiShellPkgTokenSpaceGuid.PcdShellMapNameLength Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/TftpDynamicCommand: Fix the potentially uninitialized local ↵Jiaxin Wu2018-09-281-1/+2
| | | | | | | | | | | | | | | | | variable used. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1217 Local variable 'Mtftp4Token' might be uninitialized when error happen. This patch is to resolve the issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Zeng Star <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* ShellPkg DpDynamicCommand: Use new EfiLocateFirstAcpiTable()Star Zeng2018-09-275-139/+3
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates DpDynamicCommand to use new EfiLocateFirstAcpiTable() and remove the duplicated code. Cc: Younas khan <pmdyounaskhan786@gmail.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/TftpDynamicCommand: Add one option for tftp command to specify ↵Jiaxin Wu2018-09-272-12/+59
| | | | | | | | | | | | | | | | | | | | | | | windowsize. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=886 This patch is to define one new option for TFTP shell command to specify the windowsize option as defined in RFC 7440. Valid range is between 1 and 64, default value is 1. Note that: RFC 7440 does not mention max window size value, but for the stability reason, the value is limited to 64. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Shao Ming <ming.shao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* ShellPkg: Remove trailing white spaceFu Siyuan2018-09-101-1/+1
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1158 Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg Shell: Remove an unused global variableshenglei2018-09-071-3/+0
| | | | | | | | | | | | | The unused global variable InvalidChars is removed. It is only used in the function IsValidCommandName which was removed previously. https://bugzilla.tianocore.org/show_bug.cgi?id=1066 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>