From dcde1480bf9f42441925fa4196f6879ec9044d81 Mon Sep 17 00:00:00 2001 From: Prachotan Reddy Bathi Date: Wed, 12 Feb 2025 12:36:45 -0600 Subject: [PATCH] ShellPkg: DtbTableAddress via config in dmem 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 --- ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 5 +++++ .../UefiShellDebug1CommandsLib.inf | 2 ++ ShellPkg/ShellPkg.ci.yaml | 1 + 3 files changed, 8 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c index dd3d7a7a0a..37bccea704 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c @@ -491,6 +491,11 @@ ShellCommandRunDmem ( continue; } + if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gFdtTableGuid)) { + DtbTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) { MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf index 91b48e81f9..0f4068df0f 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf @@ -96,6 +96,7 @@ MdePkg/MdePkg.dec ShellPkg/ShellPkg.dec MdeModulePkg/MdeModulePkg.dec + EmbeddedPkg/EmbeddedPkg.dec [LibraryClasses] MemoryAllocationLib @@ -144,3 +145,4 @@ gEfiConfProfilesUefiSpecGuid ## SOMETIMES_CONSUMES ## GUID gEfiConfProfilesEbbrSpec21Guid ## SOMETIMES_CONSUMES ## GUID gEfiConfProfilesEbbrSpec22Guid ## SOMETIMES_CONSUMES ## GUID + gFdtTableGuid ## SOMETIMES_CONSUMES ## SystemTable diff --git a/ShellPkg/ShellPkg.ci.yaml b/ShellPkg/ShellPkg.ci.yaml index 2c3a70d84b..4f5c69dc8c 100644 --- a/ShellPkg/ShellPkg.ci.yaml +++ b/ShellPkg/ShellPkg.ci.yaml @@ -35,6 +35,7 @@ "MdePkg/MdePkg.dec", "MdeModulePkg/MdeModulePkg.dec", "ShellPkg/ShellPkg.dec", + "EmbeddedPkg/EmbeddedPkg.dec", "NetworkPkg/NetworkPkg.dec" ], # For host based unit tests