summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/Cxl.c
AgeCommit message (Collapse)AuthorFilesLines
2026-08-04ShellPkg/UefiShellDebug1: Lower indentation level in MainCmdXXX() (1/4)Pierre Gondois1-104/+104
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 (1/4)Pierre Gondois1-35/+56
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/ShellDebug1: Rationalize Package init/freePierre Gondois1-4/+1
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/UefiShellDebug1: Return if ShellCommandLineParse() failed (1/4)Pierre Gondois1-152/+154
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-05-01ShellPkg: Add 'cxl' commandOleksandr Tymoshenko1-0/+527
Add a 'cxl' command to list and query CXL devices. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>