summaryrefslogtreecommitdiffstats
path: root/ShellPkg
Commit message (Collapse)AuthorAgeFilesLines
...
* ShellPkg: acpiview: IORT: Refactor PMCG node mapping count validationKrzysztof Koch2019-07-311-9/+23
| | | | | | | | | | | | | | | | Move Performance Monitoring Counter Group (PMCG) node ID mapping count validation from the core IORT acpiview parser logic to a dedicated function. Now, the pointer to the validation function is passed to the IortNodePmcgParser[] ACPI_PARSER array. This check does not affect the flow of IORT parsing and is limited to a single table field in scope, therefore, it is better to keep it away from the code responsible for traversing the table. 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> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: MADT: Split structure length validationKrzysztof Koch2019-07-311-8/+22
| | | | | | | | | | | | | | | | | | | Split the Interrupt Controller Structure length validation in the acpiview UEFI shell tool into two logical parts: 1. Ensuring MADT table parser forward progress. 2. Preventing MADT table buffer overruns. Also, make the condition for infinite loop detection applicable to all types of Interrupt Controller Structures (for all interrupt models which can be represented in MADT). Check if the controller length specified is shorter than the byte size of the first two fields ('Type' and 'Length') present in every valid Interrupt Controller Structure. 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> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: SRAT: Minor code style enhancementsKrzysztof Koch2019-07-311-1/+2
| | | | | | | | | | Minor changes to the SRAT parser code to conform with the EDKII coding style and to make it consistent with other ACPI table parsers. 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> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: RSDP: Make code consistent with other parsersKrzysztof Koch2019-07-311-2/+9
| | | | | | | | | | | | | | | | | List ParseAcpi() function arguments one per line in order to make this function call consistent with ParseAcpi() calls in other ACPI table parsers. Also, notify the user that XsdtAddress value of 0 results in RSDP parsing being terminated and that the XSDT table will not be processed. This effectively means that no more ACPI tables will be parsed because of this RSDP table content error. 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> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() callKrzysztof Koch2019-07-311-14/+4
| | | | | | | | | | | | | | Remove a call to ParseAcpi() responsible for getting the XSDT table length. This call is not needed because the ACPI table buffer length is provided as an input argument to the ParseAcpiXsdt() function. Modify remaining code to use the AcpiTableLength argument of the ParseAcpiXsdt() function instead of a global static variable. 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> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct()Krzysztof Koch2019-07-313-14/+22
| | | | | | | | | | | | | | | | | Modify the signature of the DumpGasStruct() function to include the buffer length parameter and to return the number of bytes parsed by the function. This way it becomes possible to prevent buffer overruns when dumping Generic Address Structure's (GAS) fields in the acpiview table parsers. Update all existing DumpGasStruct() calls in acpiview to add the length argument. 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>
* ShellPkg: acpiview: DBG2: Remove redundant forward declarationsKrzysztof Koch2019-07-191-46/+16
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: GTDT: Remove redundant forward declarationsKrzysztof Koch2019-07-191-58/+33
| | | | | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Replace multple use of literal values for GT Block Timer Frame count/number validation with a macro definition. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: IORT: Remove redundant forward declarationsKrzysztof Koch2019-07-191-44/+14
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: MADT: Remove redundant forward declarationsKrzysztof Koch2019-07-191-74/+44
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: SRAT: Remove redundant forward declarationsKrzysztof Koch2019-07-191-46/+18
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: SPCR: Remove redundant forward declarationKrzysztof Koch2019-07-191-59/+29
| | | | | | | | | | | Reposition blocks of code to remove redundant forward function declarations in order to reduce the code size. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: FADT: Remove redundant forward declarationsKrzysztof Koch2019-07-191-79/+34
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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: acpiview: RSDP: Remove redundant forward declarationsKrzysztof Koch2019-07-191-47/+17
| | | | | | | | | | | | Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.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/Type.c: Add value check before (LoopVar - 1)Zhichao Gao2019-07-191-11/+13
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1964 If the file begin with single line Feed ('\n'), then "AsciiChar == '\n' && ((CHAR8*)Buffer)[LoopVar-1] != '\r'" would cause a underflow. Add this condition "(AsciiChar == '\n' && LoopVar == 0)" before it to make sure (LoopVar - 1) would never encounter a underflow. Same change in Unicode section. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Andrew Fish <afish@apple.com>
* 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>