summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib
AgeCommit message (Collapse)AuthorFilesLines
2026-08-04ShellPkg/EfiDecompress: Fix Codeql issuesPierre Gondois1-36/+42
Fix codeql reported issues by flattening MainCmdEfiDecompress(), making it easier for the tool to evaluate potential risks. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Comp: Extract helper functionsPierre Gondois1-174/+247
Refactor the Comp command and extract 2 functions: - OpenFileOperand() - CompareFiles() This allows to simplify the logic of MainCmdComp() and fix some codeql reported potential errors. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/EfiDecompress: Check presence of decompression protocolPierre Gondois1-1/+5
Check the return value of LocateProtocol() before using the decompression protocol. This avoids a potential NULL pointer derefence spotted by codeql. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Dmem: Refactor MainCmdDmem()Pierre Gondois1-26/+51
Refactor MainCmdDmem() to make it easier to understand. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/EfiCompress: Extract OpenFileHelper() and CompressFile()Pierre Gondois1-68/+131
Extract file opening and compression code into helpers. Upon calling: - gEfiShellProtocol->GetFileSize() - gEfiShellProtocol->ReadFile() the returned Status is now checked. Upon calling AllocateZeroPool, the failed status is now set to EFI_OUT_OF_RESOURCES. Other than that, no functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Pci: Extract ParsePciBdf()Pierre Gondois1-65/+90
Extract BDF argument parsing into a helper. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Pci: Extract PciEnumerateAll()Pierre Gondois1-167/+196
Extract the default PCI enumeration path into a helper. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Lower indentation level in MainCmdXXX() (4/4)Pierre Gondois4-273/+262
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Lower the indentation level in the newly created MainCmdXXX() functions. To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - SerMode.c - SetSize.c - SetVar.c - SmbiosView/SmbiosView.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Lower indentation level in MainCmdXXX() (3/4)Pierre Gondois4-152/+140
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Lower the indentation level in the newly created MainCmdXXX() functions. To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - MemMap.c - Mm.c - Mode.c - Pci.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Lower indentation level in MainCmdXXX() (2/4)Pierre Gondois4-309/+312
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Lower the indentation level in the newly created MainCmdXXX() functions. To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Edit/Edit.c - EfiCompress.c - EfiDecompress.c - LoadPciRom.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Lower indentation level in MainCmdXXX() (1/4)Pierre Gondois5-475/+482
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Lower the indentation level in the newly created MainCmdXXX() functions. To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Comp.c - Cxl.c - Dblk.c - Dmem.c - DmpStore.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Extract MainCmdXXX() function (4/4)Pierre Gondois4-130/+211
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Extract a MainCmdXXX() function for each shell command. This command contains the possible operations the command aims to operate. The ShellCommandRunXXX() function from which it is extracted is only responsible of: - initializing the shell/command environment - parsing the command parameter and creating a Package - freeing the Package For the MemMap and SetVar commands, ShellCommandLineFreeVarList() calls are removed as the Package is now freed in the caller function: ShellCommandRunXXX(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - SerMode.c - SetSize.c - SetVar.c - SmbiosView/SmbiosView.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Extract MainCmdXXX() function (3/4)Pierre Gondois4-135/+217
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Extract a MainCmdXXX() function for each shell command. This command contains the possible operations the command aims to operate. The ShellCommandRunXXX() function from which it is extracted is only responsible of: - initializing the shell/command environment - parsing the command parameter and creating a Package - freeing the Package For the MemMap and SetVar commands, ShellCommandLineFreeVarList() calls are removed as the Package is now freed in the caller function: ShellCommandRunXXX(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - MemMap.c - Mm.c - Mode.c - Pci.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Extract MainCmdXXX() function (2/4)Pierre Gondois5-177/+286
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Extract a MainCmdXXX() function for each shell command. This command contains the possible operations the command aims to operate. The ShellCommandRunXXX() function from which it is extracted is only responsible of: - initializing the shell/command environment - parsing the command parameter and creating a Package - freeing the Package For the MemMap and SetVar commands, ShellCommandLineFreeVarList() calls are removed as the Package is now freed in the caller function: ShellCommandRunXXX(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Edit/Edit.c - EfiCompress.c - EfiDecompress.c - HexEdit/HexEdit.c - LoadPciRom.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Extract MainCmdXXX() function (1/4)Pierre Gondois5-186/+284
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Extract a MainCmdXXX() function for each shell command. This command contains the possible operations the command aims to operate. The ShellCommandRunXXX() function from which it is extracted is only responsible of: - initializing the shell/command environment - parsing the command parameter and creating a Package - freeing the Package For the MemMap and SetVar commands, ShellCommandLineFreeVarList() calls are removed as the Package is now freed in the caller function: ShellCommandRunXXX(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Comp.c - Cxl.c - Dblk.c - Dmem.c - DmpStore.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Mm: Remove unnecessary gotoPierre Gondois1-1/+0
If ShellCommandLineParse() fails, there is no need to free: - InputStr - Package Remove the goto statement. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/ShellDebug1: Rationalize Package init/freePierre Gondois7-29/+7
Package is sometimes initialized to NULL and only freed if not NULL. Remove these as: - Package is initialized in ShellCommandLineParse(). - If ShellCommandLineFreeVarList() is reached, Package cannot be NULL. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/LoadPciRom: Fix memory leakPierre Gondois1-0/+2
Package is never freed. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Return if ShellCommandLineParse() failed (4/4)Pierre Gondois4-320/+329
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Return directly if ShellCommandLineParse() returned an error Status. In such case, the "Package" that should be allocated by ShellCommandLineParse() is already freed in: ShellCommandLineParse() \-ShellCommandLineParseEx() \-InternalCommandLineParse() so there is no need to free it with ShellCommandLineFreeVarList(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - SerMode.c - SetSize.c - SetVar.c - SmbiosView/SmbiosView.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Return if ShellCommandLineParse() failed (3/4)Pierre Gondois4-598/+606
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Return directly if ShellCommandLineParse() returned an error Status. In such case, the "Package" that should be allocated by ShellCommandLineParse() is already freed in: ShellCommandLineParse() \-ShellCommandLineParseEx() \-InternalCommandLineParse() so there is no need to free it with ShellCommandLineFreeVarList(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - MemMap.c - Mm.c - Mode.c - Pci.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Return if ShellCommandLineParse() failed (2/4)Pierre Gondois5-452/+461
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Return directly if ShellCommandLineParse() returned an error Status. In such case, the "Package" that should be allocated by ShellCommandLineParse() is already freed in: ShellCommandLineParse() \-ShellCommandLineParseEx() \-InternalCommandLineParse() so there is no need to free it with ShellCommandLineFreeVarList(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Edit/Edit.c - EfiCompress.c - EfiDecompress.c - HexEdit/HexEdit.c - LoadPciRom.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/UefiShellDebug1: Return if ShellCommandLineParse() failed (1/4)Pierre Gondois5-531/+543
This patch aims to help breaking down the long functions present in the ShellPkg and reduce complexity/nested code and conditions. Return directly if ShellCommandLineParse() returned an error Status. In such case, the "Package" that should be allocated by ShellCommandLineParse() is already freed in: ShellCommandLineParse() \-ShellCommandLineParseEx() \-InternalCommandLineParse() so there is no need to free it with ShellCommandLineFreeVarList(). To avoid having one large commit updating all the UefiShellDebug1 commands, only update these files: - Comp.c - Cxl.c - Dblk.c - Dmem.c - DmpStore.c No functional change should be induced by this patch. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-08-04ShellPkg/Edit: Remove unused code snippetPierre Gondois1-9/+0
The commented out code snippet seems to try to create a new file with the user input filename. FileBufferRead() seems to have replaced this code snippet in a better wrapper: - if the file exists, open it - otherwise, create the file Remove the commented-out code snippet. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-07-18ShellPkg/Pci: Restore BAR informationsVincent Gatine1-0/+16
Restore informations lost in the pci shell command. sbsa-ref Host Bridge: ``` Cache Line Size(C): 00 Latency Timer(D): 00 Header Type(0E): 00, Single function, PCI device Class: Bridge Device - Host/PCI bridge - +Base Address Registers(10): + (None) +Expansion ROM Disabled(30) + +Cardbus CIS ptr(28): 00000000 +Sub VendorID(2C): 1AF4 Subsystem ID(2E): 1100 +Capabilities Ptr(34): 00 +Interrupt Line(3C): FF Interrupt Pin(3D): 00 +Min_Gnt(3E): 00 Max_Lat(3F): 00 ``` sbsa-ref Ethernet Controller: ``` Cache Line Size(C): 00 Latency Timer(D): 00 Header Type(0E): 00, Single function, PCI device Class: Network Controller - Ethernet controller - +Base Address Registers(10): + Start_Address Type Space Prefetchable? Size Limit + -------------------------------------------------------------------------- + 81060000 Mem 32 bits No 00020000 8107FFFF + 81040000 Mem 32 bits No 00020000 8105FFFF + 0000 I/O 0020 001F + 81080000 Mem 32 bits No 00004000 81083FFF + -------------------------------------------------------------------------- +Expansion ROM Disabled(30) + +Cardbus CIS ptr(28): 00000000 +Sub VendorID(2C): 8086 Subsystem ID(2E): 0000 +Capabilities Ptr(34): C8 +Interrupt Line(3C): FF Interrupt Pin(3D): 01 +Min_Gnt(3E): 00 Max_Lat(3F): 00 Pci Express device capability structure: CapID( 0): 10 NextCap Ptr( 1): A0 ``` Signed-off-by: Vincent Gatine <vincent.gatine@sipearl.com>
2026-07-02ShellPkg: Add missing smbiosview Type 28 locationsVarshitPandya1-0/+16
Add the missing SMBIOS Type 28 Temperature Probe location decode values to smbiosview. The Type 28 Location field defines values 0x0C through 0x0F for Front Panel Board, Back Panel Board, Power System Board, and Drive Back Plane, but smbiosview only decoded values up to 0x0B. Signed-off-by: VarshitPandya <varshit.pandya@arm.com>
2026-07-02ShellPkg: Fix smbiosview Type 26 location/status decodeVarshitPandya1-27/+27
The smbiosview Type 26 Voltage Probe decoder uses the low 5 bits of LocationAndStatus as the probe location and the high 3 bits as the probe status. However, the Type 26 lookup tables were swapped: VPLocationTable contained status strings and VPStatusTable contained location strings. This caused valid records to be displayed as, for example: Voltage Probe - Location: OK Voltage Probe - Status: Processor Swap the table contents so Type 26 output matches the SMBIOS LocationAndStatus bit layout. Signed-off-by: VarshitPandya <varshit.pandya@arm.com>
2026-07-01ShellPkg: Add null pointer checks before dereferenceQihang Gao1-6/+33
In AllocateMemory(), several pointers are used without prior null checks. This may lead to unexpected behavior or system crashes if any of these pointers are NULL. Add explicit null checks for these pointers to ensure safe access and prevent potential null pointer dereferences. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-06-29ShellPkg: ShellPkg: Fix SMBIOS Type 28 probe labelsVarshitPandya2-3/+5
Use a Temperature Probe specific HII string when displaying the Type 28 Location field in smbiosview. The Type 28 decoder was using the Voltage Probe location label, causing temperature probe records to be displayed with the wrong field name. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-06-29ShellPkg: Fix SMBIOS Type 26 probe decodingVarshitPandya1-3/+3
Decode the Type 26 Voltage Probe Location and Status fields according to the SMBIOS 3.9.0 specification, section 7.27, "Voltage Probe (Type 26)". Table 95, "Voltage Probe: Location and Status fields", defines bits 4:0 as the Location field and bits 7:5 as the Status field. smbiosview was decoding these fields in the opposite order, causing the displayed voltage probe location and status to be swapped. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-05-08Global: Fix Spelling Errors in PCI/PCIe DefinitionsOliver Smith-Denny1-2/+2
Fix spelling errors in definitions in Pci22.h. Update consumers in MdeModulePkg, OvmfPkg, ShellPkg, and SourceLevelDebugPkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-05-01ShellPkg: Add 'cxl' commandOleksandr Tymoshenko5-0/+613
Add a 'cxl' command to list and query CXL devices. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
2026-04-24ShellPkg/SerMode: Add ValidDataBits() functionPierre Gondois1-9/+20
Add a ValidDataBits() utility function to check the Data Bits are valid. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-04-24ShellPkg/SerMode: Add GetStopBits() functionPierre Gondois1-24/+51
Add a GetStopBits() utility function to convert the StopBits to the EFI_STOP_BITS_TYPE type. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-04-24ShellPkg/SerMode: Lower indentation level in DisplaySettings()Pierre Gondois1-28/+24
Invert error handling to lower the indentation level in DisplaySettings(). No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-04-24ShellPkg/SerMode: Add GetParityType() functionPierre Gondois1-29/+62
Add a GetParityType() utility function to convert the Parity to the EFI_PARITY_TYPE type. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-04-24ShellPkg/SerMode: Add name conversion arrays for parity/stop bitsPierre Gondois1-61/+36
Add name conversion arrays: - ParityBitName - StopBitsName to seamlessly convert parity/stop bits to a matching name. No functional change. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-03-07ShellPkg/SmbiosView: Fix clang compatibility issueMichael D Kinney1-0/+2
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-03-06ShellPkg/SmbiosView: Support print Protocol Records of SMBIOS type42Yang Gang1-0/+39
SmbiosView tool changes for Protocol Records info decode and print. This commit adds the following decoding functionality: First, it prints the `MCHostInterfaceProtocol Number`, then print the `ProtocolType` with the prefix #x(0 based index), and finally dump `ProtocolTypeData` as hex. Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2026-03-02ShellPkg: fix UNI string formatting and line endings to match UNI SpecAlexander Gryanko1-1/+1
Changes include: * Added missing \r\n line endings inside string literals * Fixed inconsistent indentation in multi-line string entries * Removed duplicated #language en-US directive * Aligned string formatting to match the UNI specification Updated files: ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni The issues were identified during testing of the parser https://github.com/xpahos/edk2-idea. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2026-02-25ShellPkg/SmbiosView: Add Type45 entry to query tableWerner Lewis1-0/+5
The type field for Smbios tables in smbiosview is set from values in this query table. An entry is added to correctly display the Type 45 table name rather than "Undefined Value" in smbiosview output. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-02-24ShellPkg: Replace include guards with #pragma onceMichael Kubacki26-104/+26
Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-02-04ShellPkg: SMBIOS type 20 Extended Starting/Ending Address print type errorRen Yang (楊壹任)1-2/+2
Wrong structure is used to print the SMBIOS type 20 Extended Starting/Ending Address in SmbiosView Signed-off-by: Ren Yang <RenYang@ami.com>
2025-10-16ShellPkg/SmbiosView: Display Type 44 "Referenced Handle" fieldCassandra Lam1-0/+5
Signed-off-by: Cassandra Lam <Cassandra.Lam@amd.com>
2025-10-16ShellPkg/SmbiosView: Display Type 2 Contained Objects infoCassandra Lam2-0/+14
Add prints for SMBIOS Type 2 "Number of Contained Object Handles" and "Contained Object Handles" fields. Signed-off-by: Cassandra Lam <Cassandra.Lam@amd.com>
2025-10-16ShellPkg: Review SMBIOS 3.9 specification“anupriyak“1-0/+10
Add new structure members RackType and RackHeight in Smbios Type3. Signed-off-by: Anupriya <anupriyak@ami.com>
2025-10-03ShellPkg/pci.c: Fix typo in source code.Chasel Chiu1-5/+5
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
2025-10-03ShellPkg: Add PCIe boundary check and enhance DVSEC size calculationPranav V V1-48/+71
1. Safe wrapper function for DumpHex that validates PCI configuration space boundaries. This function ensures that hex dumps do not exceed the standard 4KB PCIe configuration space boundary. If the requested dump would exceed this boundary, it prints an error message and truncates the dump size to remain within valid bounds. 2. Enhance DVSEC capability structure size calculation method. Size is now obtained from the DesignatedVendorSpecificHeader1.Bits.DvsecLength register. Issue: https://github.com/tianocore/edk2/issues/11554 Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-10-01ShellPkg: Use the newly introduced ShellPrintDefaultEx() aliasPierre Gondois9-437/+253
Make use the newly introduced ShellPrintDefaultEx() alias and replace wherever it is possible: - "ShellPrintEx (-1, -1," with: - "ShellPrintDefaultEx (" No functional change is introduced. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-10-01ShellPkg: Use the newly introduced ShellPrintHiiDefaultEx() aliasPierre Gondois24-1521/+1017
Make use the newly introduced ShellPrintHiiDefaultEx() alias and replace wherever it is possible: - "ShellPrintHiiEx (-1, -1, NULL," with: - "ShellPrintHiiDefaultEx (" No functional change is introduced. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-10-01ShellPkg/MemMap: Extract a ParseMemoryDescriptors() functionPierre Gondois1-185/+209
In an effort to simplify the code in the ShellPkg, extract a ParseMemoryDescriptors() function. No functional change is introduced. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>