* [PATCH v1 0/1] Add all UEFI Config Tables to Dmem output @ 2023-02-07 21:19 Sam Kaynor 2023-02-07 21:19 ` [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c Sam Kaynor 0 siblings, 1 reply; 5+ messages in thread From: Sam Kaynor @ 2023-02-07 21:19 UTC (permalink / raw) To: devel; +Cc: Sam Kaynor, Ray Ni, Zhichao Gao Currently, several important UEFI defined config tables are not present in the output of Dmem. This patch implements dumping the presence of all UEFI Config Tables defined in UEFI Specification 2.10 REF: https://github.com/skaynor/edk2/tree/uefi_config_tables_dmem_v1 Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Sam Kaynor (1): ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf | 9 ++ ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 89 ++++++++++++++++++-- ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 28 ++++-- 3 files changed, 112 insertions(+), 14 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c 2023-02-07 21:19 [PATCH v1 0/1] Add all UEFI Config Tables to Dmem output Sam Kaynor @ 2023-02-07 21:19 ` Sam Kaynor 2023-02-14 15:56 ` [edk2-devel] " Sunny Wang 0 siblings, 1 reply; 5+ messages in thread From: Sam Kaynor @ 2023-02-07 21:19 UTC (permalink / raw) To: devel; +Cc: Sam Kaynor, Ray Ni, Zhichao Gao Added entries for UEFI Config Tables not present in current Dmem output. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf | 9 ++ ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 89 ++++++++++++++++++-- ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 28 ++++-- 3 files changed, 112 insertions(+), 14 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf index 74ad5facf6b1..3741dac5d94c 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf @@ -121,6 +121,7 @@ [Protocols] gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES gEfiSimplePointerProtocolGuid ## SOMETIMES_CONSUMES gEfiCpuIo2ProtocolGuid ## SOMETIMES_CONSUMES + gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES [Guids] gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## GUID @@ -130,3 +131,11 @@ [Guids] gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable gShellDebug1HiiGuid ## SOMETIMES_CONSUMES ## HII + gEfiMemoryAttributesTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiRtPropertiesTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiSystemResourceTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiDebugImageInfoTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiImageSecurityDatabaseGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonCapsuleDataTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonCapsuleResultTableGuid ## SOMETIMES_CONSUMES ## SystemTable diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c index c52c212a56f8..e2aed306d466 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c @@ -10,9 +10,16 @@ #include "UefiShellDebug1CommandsLib.h" #include <Protocol/PciRootBridgeIo.h> +#include <Protocol/HiiDatabase.h> #include <Guid/Acpi.h> #include <Guid/Mps.h> #include <Guid/SmBios.h> +#include <Guid/MemoryAttributesTable.h> +#include <Guid/RtPropertiesTable.h> +#include <Guid/SystemResourceTable.h> +#include <Guid/DebugImageInfoTable.h> +#include <Guid/ImageAuthentication.h> +#include <Guid/JsonCapsule.h> /** Make a printable character. @@ -108,6 +115,18 @@ ShellCommandRunDmem ( UINT64 SalTableAddress; UINT64 SmbiosTableAddress; UINT64 MpsTableAddress; + UINT64 DtbTableAddress; + UINT64 MemoryAttributesTableAddress; + UINT64 RtPropertiesTableAddress; + UINT64 SystemResourceTableAddress; + UINT64 DebugImageInfoTableAddress; + UINT64 ImageExecutionTableAddress; + UINT64 JsonConfigDataTableAddress; + UINT64 JsonCapsuleDataTableAddress; + UINT64 JsonCapsuleResultTableAddress; + UINT64 MemoryRangeCapsuleAddress; + UINT64 HiiDatabaseExportBufferAddress; + UINT64 ConformanceProfileTableAddress; UINTN TableWalker; ShellStatus = SHELL_SUCCESS; @@ -168,11 +187,23 @@ ShellCommandRunDmem ( ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size); DumpHex (2, (UINTN)Address, (UINTN)Size, Address); if (Address == (VOID *)gST) { - Acpi20TableAddress = 0; - AcpiTableAddress = 0; - SalTableAddress = 0; - SmbiosTableAddress = 0; - MpsTableAddress = 0; + Acpi20TableAddress = 0; + AcpiTableAddress = 0; + SalTableAddress = 0; + SmbiosTableAddress = 0; + MpsTableAddress = 0; + DtbTableAddress = 0; + MemoryAttributesTableAddress = 0; + RtPropertiesTableAddress = 0; + SystemResourceTableAddress = 0; + DebugImageInfoTableAddress = 0; + ImageExecutionTableAddress = 0; + JsonConfigDataTableAddress = 0; + JsonCapsuleDataTableAddress = 0; + JsonCapsuleResultTableAddress = 0; + MemoryRangeCapsuleAddress = 0; + HiiDatabaseExportBufferAddress = 0; + ConformanceProfileTableAddress = 0; for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; TableWalker++) { if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) { Acpi20TableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; @@ -193,11 +224,43 @@ ShellCommandRunDmem ( SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; } - if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) { MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) { + MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiRtPropertiesTableGuid)) { + RtPropertiesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSystemResourceTableGuid)) { + SystemResourceTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiDebugImageInfoTableGuid)) { + DebugImageInfoTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiImageSecurityDatabaseGuid)) { + ImageExecutionTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonConfigDataTableGuid)) { + JsonConfigDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleDataTableGuid)) { + JsonCapsuleDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleResultTableGuid)) { + JsonCapsuleResultTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiHiiDatabaseProtocolGuid)) { + HiiDatabaseExportBufferAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } } ShellPrintHiiEx ( @@ -218,7 +281,19 @@ ShellCommandRunDmem ( AcpiTableAddress, Acpi20TableAddress, MpsTableAddress, - SmbiosTableAddress + SmbiosTableAddress, + DtbTableAddress, + MemoryAttributesTableAddress, + RtPropertiesTableAddress, + SystemResourceTableAddress, + DebugImageInfoTableAddress, + ImageExecutionTableAddress, + JsonConfigDataTableAddress, + JsonCapsuleDataTableAddress, + JsonCapsuleResultTableAddress, + MemoryRangeCapsuleAddress, + HiiDatabaseExportBufferAddress, + ConformanceProfileTableAddress ); } } else { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni index b1d239ed37ea..c1067a0474cd 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni @@ -108,13 +108,27 @@ "---------------------------------------------\r\n" "System: Table Structure size %08x revision %08x\r\n" "ConIn (%016LX) ConOut (%016LX) StdErr (%016LX)\r\n" - "Runtime Services %016LX\r\n" - "Boot Services %016LX\r\n" - "SAL System Table %016LX\r\n" - "ACPI Table %016LX\r\n" - "ACPI 2.0 Table %016LX\r\n" - "MPS Table %016LX\r\n" - "SMBIOS Table %016LX\r\n" + "Runtime Services %016LX\r\n" + "Boot Services %016LX\r\n" + "SAL System Table %016LX\r\n" + "ACPI Table %016LX\r\n" + "ACPI 2.0 Table %016LX\r\n" + "MPS Table %016LX\r\n" + "SMBIOS Table %016LX\r\n" + "DTB Table %016LX\r\n" + "Memory Attribute Table %016LX\r\n" + "RT Properties Table %016LX\r\n" + "System Resource Table %016LX\r\n" + "Debug Image Info Table %016LX\r\n" + "Image Execution Info Table %016LX\r\n" + "Json Config Data Table %016LX\r\n" + "Json Capsule Data Table %016LX\r\n" + "Json Capsule Results Table %016LX\r\n" + "Memory Range Capsule %016LX\r\n" + "Hii Database Export Buffer %016LX\r\n" + "Conformance Profile Table %016LX\r\n" + + #string STR_LOAD_PCI_ROM_RES #language en-US "Image '%B%s%N' load result: %r\r\n" #string STR_LOADPCIROM_CORRUPT #language en-US "%H%s%N: File '%B%s%N' Image %d is corrupt.\r\n" -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c 2023-02-07 21:19 ` [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c Sam Kaynor @ 2023-02-14 15:56 ` Sunny Wang 2023-02-16 9:17 ` Gao, Zhichao 0 siblings, 1 reply; 5+ messages in thread From: Sunny Wang @ 2023-02-14 15:56 UTC (permalink / raw) To: devel@edk2.groups.io, Sam Kaynor; +Cc: Ray Ni, Zhichao Gao, Sunny Wang Looks good to me. Thanks for working on this, Sam. Just for others' information, I also had an offline discussion with Sam. - This is change is based on UEFI 2.10 section 4.6. EFI Configuration Table & Properties Table https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html#efi-configuration-table-properties-table. - The link of pull request is https://github.com/tianocore/edk2/pull/4038 Reviewed-by: Sunny Wang <sunny.wang@arm.com> -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sam Kaynor via groups.io Sent: 07 February 2023 21:20 To: devel@edk2.groups.io Cc: Sam Kaynor <Sam.Kaynor@arm.com>; Ray Ni <ray.ni@intel.com>; Zhichao Gao <zhichao.gao@intel.com> Subject: [edk2-devel] [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c Added entries for UEFI Config Tables not present in current Dmem output. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf | 9 ++ ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 89 ++++++++++++++++++-- ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 28 ++++-- 3 files changed, 112 insertions(+), 14 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf index 74ad5facf6b1..3741dac5d94c 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf @@ -121,6 +121,7 @@ [Protocols] gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES gEfiSimplePointerProtocolGuid ## SOMETIMES_CONSUMES gEfiCpuIo2ProtocolGuid ## SOMETIMES_CONSUMES + gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES [Guids] gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## GUID @@ -130,3 +131,11 @@ [Guids] gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable gShellDebug1HiiGuid ## SOMETIMES_CONSUMES ## HII + gEfiMemoryAttributesTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiRtPropertiesTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiSystemResourceTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiDebugImageInfoTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiImageSecurityDatabaseGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonCapsuleDataTableGuid ## SOMETIMES_CONSUMES ## SystemTable + gEfiJsonCapsuleResultTableGuid ## SOMETIMES_CONSUMES ## SystemTable diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c index c52c212a56f8..e2aed306d466 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c @@ -10,9 +10,16 @@ #include "UefiShellDebug1CommandsLib.h" #include <Protocol/PciRootBridgeIo.h> +#include <Protocol/HiiDatabase.h> #include <Guid/Acpi.h> #include <Guid/Mps.h> #include <Guid/SmBios.h> +#include <Guid/MemoryAttributesTable.h> +#include <Guid/RtPropertiesTable.h> +#include <Guid/SystemResourceTable.h> +#include <Guid/DebugImageInfoTable.h> +#include <Guid/ImageAuthentication.h> +#include <Guid/JsonCapsule.h> /** Make a printable character. @@ -108,6 +115,18 @@ ShellCommandRunDmem ( UINT64 SalTableAddress; UINT64 SmbiosTableAddress; UINT64 MpsTableAddress; + UINT64 DtbTableAddress; + UINT64 MemoryAttributesTableAddress; + UINT64 RtPropertiesTableAddress; + UINT64 SystemResourceTableAddress; + UINT64 DebugImageInfoTableAddress; + UINT64 ImageExecutionTableAddress; + UINT64 JsonConfigDataTableAddress; + UINT64 JsonCapsuleDataTableAddress; + UINT64 JsonCapsuleResultTableAddress; + UINT64 MemoryRangeCapsuleAddress; + UINT64 HiiDatabaseExportBufferAddress; + UINT64 ConformanceProfileTableAddress; UINTN TableWalker; ShellStatus = SHELL_SUCCESS; @@ -168,11 +187,23 @@ ShellCommandRunDmem ( ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size); DumpHex (2, (UINTN)Address, (UINTN)Size, Address); if (Address == (VOID *)gST) { - Acpi20TableAddress = 0; - AcpiTableAddress = 0; - SalTableAddress = 0; - SmbiosTableAddress = 0; - MpsTableAddress = 0; + Acpi20TableAddress = 0; + AcpiTableAddress = 0; + SalTableAddress = 0; + SmbiosTableAddress = 0; + MpsTableAddress = 0; + DtbTableAddress = 0; + MemoryAttributesTableAddress = 0; + RtPropertiesTableAddress = 0; + SystemResourceTableAddress = 0; + DebugImageInfoTableAddress = 0; + ImageExecutionTableAddress = 0; + JsonConfigDataTableAddress = 0; + JsonCapsuleDataTableAddress = 0; + JsonCapsuleResultTableAddress = 0; + MemoryRangeCapsuleAddress = 0; + HiiDatabaseExportBufferAddress = 0; + ConformanceProfileTableAddress = 0; for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; TableWalker++) { if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) { Acpi20TableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; @@ -193,11 +224,43 @@ ShellCommandRunDmem ( SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; } - if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) { MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) { + MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiRtPropertiesTableGuid)) { + RtPropertiesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSystemResourceTableGuid)) { + SystemResourceTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiDebugImageInfoTableGuid)) { + DebugImageInfoTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiImageSecurityDatabaseGuid)) { + ImageExecutionTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonConfigDataTableGuid)) { + JsonConfigDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleDataTableGuid)) { + JsonCapsuleDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + continue; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleResultTableGuid)) { + JsonCapsuleResultTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } + if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiHiiDatabaseProtocolGuid)) { + HiiDatabaseExportBufferAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; + } } ShellPrintHiiEx ( @@ -218,7 +281,19 @@ ShellCommandRunDmem ( AcpiTableAddress, Acpi20TableAddress, MpsTableAddress, - SmbiosTableAddress + SmbiosTableAddress, + DtbTableAddress, + MemoryAttributesTableAddress, + RtPropertiesTableAddress, + SystemResourceTableAddress, + DebugImageInfoTableAddress, + ImageExecutionTableAddress, + JsonConfigDataTableAddress, + JsonCapsuleDataTableAddress, + JsonCapsuleResultTableAddress, + MemoryRangeCapsuleAddress, + HiiDatabaseExportBufferAddress, + ConformanceProfileTableAddress ); } } else { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni index b1d239ed37ea..c1067a0474cd 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni @@ -108,13 +108,27 @@ "---------------------------------------------\r\n" "System: Table Structure size %08x revision %08x\r\n" "ConIn (%016LX) ConOut (%016LX) StdErr (%016LX)\r\n" - "Runtime Services %016LX\r\n" - "Boot Services %016LX\r\n" - "SAL System Table %016LX\r\n" - "ACPI Table %016LX\r\n" - "ACPI 2.0 Table %016LX\r\n" - "MPS Table %016LX\r\n" - "SMBIOS Table %016LX\r\n" + "Runtime Services %016LX\r\n" + "Boot Services %016LX\r\n" + "SAL System Table %016LX\r\n" + "ACPI Table %016LX\r\n" + "ACPI 2.0 Table %016LX\r\n" + "MPS Table %016LX\r\n" + "SMBIOS Table %016LX\r\n" + "DTB Table %016LX\r\n" + "Memory Attribute Table %016LX\r\n" + "RT Properties Table %016LX\r\n" + "System Resource Table %016LX\r\n" + "Debug Image Info Table %016LX\r\n" + "Image Execution Info Table %016LX\r\n" + "Json Config Data Table %016LX\r\n" + "Json Capsule Data Table %016LX\r\n" + "Json Capsule Results Table %016LX\r\n" + "Memory Range Capsule %016LX\r\n" + "Hii Database Export Buffer %016LX\r\n" + "Conformance Profile Table %016LX\r\n" + + #string STR_LOAD_PCI_ROM_RES #language en-US "Image '%B%s%N' load result: %r\r\n" #string STR_LOADPCIROM_CORRUPT #language en-US "%H%s%N: File '%B%s%N' Image %d is corrupt.\r\n" -- 2.25.1 -=-=-=-=-=-= Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99774): https://edk2.groups.io/g/devel/message/99774 Mute This Topic: https://groups.io/mt/96817141/5985097 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com] -=-=-=-=-=-= IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c 2023-02-14 15:56 ` [edk2-devel] " Sunny Wang @ 2023-02-16 9:17 ` Gao, Zhichao 2023-02-28 15:16 ` Samer El-Haj-Mahmoud 0 siblings, 1 reply; 5+ messages in thread From: Gao, Zhichao @ 2023-02-16 9:17 UTC (permalink / raw) To: Sunny Wang, devel@edk2.groups.io, Sam Kaynor; +Cc: Ni, Ray Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Thanks, Zhichao > -----Original Message----- > From: Sunny Wang <Sunny.Wang@arm.com> > Sent: Tuesday, February 14, 2023 11:57 PM > To: devel@edk2.groups.io; Sam Kaynor <Sam.Kaynor@arm.com> > Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; > Sunny Wang <Sunny.Wang@arm.com> > Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg: > UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c > > Looks good to me. Thanks for working on this, Sam. > Just for others' information, I also had an offline discussion with Sam. > - This is change is based on UEFI 2.10 section 4.6. EFI Configuration Table & > Properties Table > https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html#efi- > configuration-table-properties-table. > - The link of pull request is https://github.com/tianocore/edk2/pull/4038 > > Reviewed-by: Sunny Wang <sunny.wang@arm.com> > > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sam > Kaynor via groups.io > Sent: 07 February 2023 21:20 > To: devel@edk2.groups.io > Cc: Sam Kaynor <Sam.Kaynor@arm.com>; Ray Ni <ray.ni@intel.com>; > Zhichao Gao <zhichao.gao@intel.com> > Subject: [edk2-devel] [PATCH v1 1/1] ShellPkg: > UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c > > Added entries for UEFI Config Tables not present in current Dmem output. > > Cc: Ray Ni <ray.ni@intel.com> > Cc: Zhichao Gao <zhichao.gao@intel.com> > Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> > --- > > ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands > Lib.inf | 9 ++ > ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 89 > ++++++++++++++++++-- > > ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands > Lib.uni | 28 ++++-- > 3 files changed, 112 insertions(+), 14 deletions(-) > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.inf > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.inf > index 74ad5facf6b1..3741dac5d94c 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.inf > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > d > +++ sLib.inf > @@ -121,6 +121,7 @@ [Protocols] > gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES > > gEfiSimplePointerProtocolGuid ## SOMETIMES_CONSUMES > > gEfiCpuIo2ProtocolGuid ## SOMETIMES_CONSUMES > > + gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES > > > > [Guids] > > gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## GUID > > @@ -130,3 +131,11 @@ [Guids] > gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable > > gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable > > gShellDebug1HiiGuid ## SOMETIMES_CONSUMES ## HII > > + gEfiMemoryAttributesTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiRtPropertiesTableGuid ## SOMETIMES_CONSUMES ## SystemTable > > + gEfiSystemResourceTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiDebugImageInfoTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiImageSecurityDatabaseGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiJsonCapsuleDataTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > + gEfiJsonCapsuleResultTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > index c52c212a56f8..e2aed306d466 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > @@ -10,9 +10,16 @@ > > > #include "UefiShellDebug1CommandsLib.h" > > #include <Protocol/PciRootBridgeIo.h> > > +#include <Protocol/HiiDatabase.h> > > #include <Guid/Acpi.h> > > #include <Guid/Mps.h> > > #include <Guid/SmBios.h> > > +#include <Guid/MemoryAttributesTable.h> > > +#include <Guid/RtPropertiesTable.h> > > +#include <Guid/SystemResourceTable.h> > > +#include <Guid/DebugImageInfoTable.h> > > +#include <Guid/ImageAuthentication.h> > > +#include <Guid/JsonCapsule.h> > > > > /** > > Make a printable character. > > @@ -108,6 +115,18 @@ ShellCommandRunDmem ( > UINT64 SalTableAddress; > > UINT64 SmbiosTableAddress; > > UINT64 MpsTableAddress; > > + UINT64 DtbTableAddress; > > + UINT64 MemoryAttributesTableAddress; > > + UINT64 RtPropertiesTableAddress; > > + UINT64 SystemResourceTableAddress; > > + UINT64 DebugImageInfoTableAddress; > > + UINT64 ImageExecutionTableAddress; > > + UINT64 JsonConfigDataTableAddress; > > + UINT64 JsonCapsuleDataTableAddress; > > + UINT64 JsonCapsuleResultTableAddress; > > + UINT64 MemoryRangeCapsuleAddress; > > + UINT64 HiiDatabaseExportBufferAddress; > > + UINT64 ConformanceProfileTableAddress; > > UINTN TableWalker; > > > > ShellStatus = SHELL_SUCCESS; > > @@ -168,11 +187,23 @@ ShellCommandRunDmem ( > ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, > (UINT64)(UINTN)Address, Size); > > DumpHex (2, (UINTN)Address, (UINTN)Size, Address); > > if (Address == (VOID *)gST) { > > - Acpi20TableAddress = 0; > > - AcpiTableAddress = 0; > > - SalTableAddress = 0; > > - SmbiosTableAddress = 0; > > - MpsTableAddress = 0; > > + Acpi20TableAddress = 0; > > + AcpiTableAddress = 0; > > + SalTableAddress = 0; > > + SmbiosTableAddress = 0; > > + MpsTableAddress = 0; > > + DtbTableAddress = 0; > > + MemoryAttributesTableAddress = 0; > > + RtPropertiesTableAddress = 0; > > + SystemResourceTableAddress = 0; > > + DebugImageInfoTableAddress = 0; > > + ImageExecutionTableAddress = 0; > > + JsonConfigDataTableAddress = 0; > > + JsonCapsuleDataTableAddress = 0; > > + JsonCapsuleResultTableAddress = 0; > > + MemoryRangeCapsuleAddress = 0; > > + HiiDatabaseExportBufferAddress = 0; > > + ConformanceProfileTableAddress = 0; > > for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; > TableWalker++) { > > if (CompareGuid (&gST- > >ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) { > > Acpi20TableAddress = (UINT64)(UINTN)gST- > >ConfigurationTable[TableWalker].VendorTable; > > @@ -193,11 +224,43 @@ ShellCommandRunDmem ( > SmbiosTableAddress = (UINT64)(UINTN)gST- > >ConfigurationTable[TableWalker].VendorTable; > > continue; > > } > > - > > if (CompareGuid (&gST- > >ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) { > > MpsTableAddress = (UINT64)(UINTN)gST- > >ConfigurationTable[TableWalker].VendorTable; > > continue; > > } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiMemoryAttributesTableGuid)) { > > + MemoryAttributesTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiRtPropertiesTableGuid)) { > > + RtPropertiesTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiSystemResourceTableGuid)) { > > + SystemResourceTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiDebugImageInfoTableGuid)) { > > + DebugImageInfoTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiImageSecurityDatabaseGuid)) { > > + ImageExecutionTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiJsonConfigDataTableGuid)) { > > + JsonConfigDataTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiJsonCapsuleDataTableGuid)) { > > + JsonCapsuleDataTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + continue; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiJsonCapsuleResultTableGuid)) { > > + JsonCapsuleResultTableAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + } > > + if > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > + &gEfiHiiDatabaseProtocolGuid)) { > > + HiiDatabaseExportBufferAddress = > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > + } > > } > > > > ShellPrintHiiEx ( > > @@ -218,7 +281,19 @@ ShellCommandRunDmem ( > AcpiTableAddress, > > Acpi20TableAddress, > > MpsTableAddress, > > - SmbiosTableAddress > > + SmbiosTableAddress, > > + DtbTableAddress, > > + MemoryAttributesTableAddress, > > + RtPropertiesTableAddress, > > + SystemResourceTableAddress, > > + DebugImageInfoTableAddress, > > + ImageExecutionTableAddress, > > + JsonConfigDataTableAddress, > > + JsonCapsuleDataTableAddress, > > + JsonCapsuleResultTableAddress, > > + MemoryRangeCapsuleAddress, > > + HiiDatabaseExportBufferAddress, > > + ConformanceProfileTableAddress > > ); > > } > > } else { > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > index b1d239ed37ea..c1067a0474cd 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > d > +++ sLib.uni > @@ -108,13 +108,27 @@ > "---------------------------------------------\r\n" > > "System: Table Structure size %08x > revision %08x\r\n" > > "ConIn (%016LX) ConOut (%016LX) StdErr > (%016LX)\r\n" > > - "Runtime Services %016LX\r\n" > > - "Boot Services %016LX\r\n" > > - "SAL System Table %016LX\r\n" > > - "ACPI Table %016LX\r\n" > > - "ACPI 2.0 Table %016LX\r\n" > > - "MPS Table %016LX\r\n" > > - "SMBIOS Table %016LX\r\n" > > + "Runtime Services %016LX\r\n" > > + "Boot Services %016LX\r\n" > > + "SAL System Table %016LX\r\n" > > + "ACPI Table %016LX\r\n" > > + "ACPI 2.0 Table %016LX\r\n" > > + "MPS Table %016LX\r\n" > > + "SMBIOS Table %016LX\r\n" > > + "DTB Table %016LX\r\n" > > + "Memory Attribute Table %016LX\r\n" > > + "RT Properties Table %016LX\r\n" > > + "System Resource Table %016LX\r\n" > > + "Debug Image Info Table %016LX\r\n" > > + "Image Execution Info Table %016LX\r\n" > > + "Json Config Data Table %016LX\r\n" > > + "Json Capsule Data Table %016LX\r\n" > > + "Json Capsule Results Table %016LX\r\n" > > + "Memory Range Capsule %016LX\r\n" > > + "Hii Database Export Buffer %016LX\r\n" > > + "Conformance Profile Table %016LX\r\n" > > + > > + > > > > #string STR_LOAD_PCI_ROM_RES #language en-US "Image '%B%s%N' > load result: %r\r\n" > > #string STR_LOADPCIROM_CORRUPT #language en-US "%H%s%N: File > '%B%s%N' Image %d is corrupt.\r\n" > > -- > 2.25.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#99774): https://edk2.groups.io/g/devel/message/99774 > Mute This Topic: https://groups.io/mt/96817141/5985097 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [Sunny.Wang@arm.com] -=-=-=-=-=-= > > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended recipient, > please notify the sender immediately and do not disclose the contents to any > other person, use it for any purpose, or store or copy the information in any > medium. Thank you. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c 2023-02-16 9:17 ` Gao, Zhichao @ 2023-02-28 15:16 ` Samer El-Haj-Mahmoud 0 siblings, 0 replies; 5+ messages in thread From: Samer El-Haj-Mahmoud @ 2023-02-28 15:16 UTC (permalink / raw) To: devel@edk2.groups.io, zhichao.gao@intel.com, Sunny Wang, Sam Kaynor Cc: Ni, Ray, Samer El-Haj-Mahmoud Looks good to me. Reviewed-by Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gao, > Zhichao via groups.io > Sent: Thursday, February 16, 2023 4:18 AM > To: Sunny Wang <Sunny.Wang@arm.com>; devel@edk2.groups.io; Sam > Kaynor <Sam.Kaynor@arm.com> > Cc: Ni, Ray <ray.ni@intel.com> > Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: > UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c > > Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> > > Thanks, > Zhichao > > > -----Original Message----- > > From: Sunny Wang <Sunny.Wang@arm.com> > > Sent: Tuesday, February 14, 2023 11:57 PM > > To: devel@edk2.groups.io; Sam Kaynor <Sam.Kaynor@arm.com> > > Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; > > Sunny Wang <Sunny.Wang@arm.com> > > Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg: > > UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c > > > > Looks good to me. Thanks for working on this, Sam. > > Just for others' information, I also had an offline discussion with Sam. > > - This is change is based on UEFI 2.10 section 4.6. EFI Configuration Table > & > > Properties Table > > https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html#efi- > > configuration-table-properties-table. > > - The link of pull request is https://github.com/tianocore/edk2/pull/4038 > > > > Reviewed-by: Sunny Wang <sunny.wang@arm.com> > > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sam > > Kaynor via groups.io > > Sent: 07 February 2023 21:20 > > To: devel@edk2.groups.io > > Cc: Sam Kaynor <Sam.Kaynor@arm.com>; Ray Ni <ray.ni@intel.com>; > > Zhichao Gao <zhichao.gao@intel.com> > > Subject: [edk2-devel] [PATCH v1 1/1] ShellPkg: > > UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c > > > > Added entries for UEFI Config Tables not present in current Dmem output. > > > > Cc: Ray Ni <ray.ni@intel.com> > > Cc: Zhichao Gao <zhichao.gao@intel.com> > > Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> > > --- > > > > > ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands > > Lib.inf | 9 ++ > > ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 89 > > ++++++++++++++++++-- > > > > > ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands > > Lib.uni | 28 ++++-- > > 3 files changed, 112 insertions(+), 14 deletions(-) > > > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.inf > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.inf > > index 74ad5facf6b1..3741dac5d94c 100644 > > --- > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.inf > > +++ > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > d > > +++ sLib.inf > > @@ -121,6 +121,7 @@ [Protocols] > > gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES > > > > gEfiSimplePointerProtocolGuid ## SOMETIMES_CONSUMES > > > > gEfiCpuIo2ProtocolGuid ## SOMETIMES_CONSUMES > > > > + gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES > > > > > > > > [Guids] > > > > gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## GUID > > > > @@ -130,3 +131,11 @@ [Guids] > > gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable > > > > gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable > > > > gShellDebug1HiiGuid ## SOMETIMES_CONSUMES ## HII > > > > + gEfiMemoryAttributesTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiRtPropertiesTableGuid ## SOMETIMES_CONSUMES ## > SystemTable > > > > + gEfiSystemResourceTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiDebugImageInfoTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiImageSecurityDatabaseGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiJsonCapsuleDataTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > + gEfiJsonCapsuleResultTableGuid ## SOMETIMES_CONSUMES ## > > SystemTable > > > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > > index c52c212a56f8..e2aed306d466 100644 > > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c > > @@ -10,9 +10,16 @@ > > > > > > #include "UefiShellDebug1CommandsLib.h" > > > > #include <Protocol/PciRootBridgeIo.h> > > > > +#include <Protocol/HiiDatabase.h> > > > > #include <Guid/Acpi.h> > > > > #include <Guid/Mps.h> > > > > #include <Guid/SmBios.h> > > > > +#include <Guid/MemoryAttributesTable.h> > > > > +#include <Guid/RtPropertiesTable.h> > > > > +#include <Guid/SystemResourceTable.h> > > > > +#include <Guid/DebugImageInfoTable.h> > > > > +#include <Guid/ImageAuthentication.h> > > > > +#include <Guid/JsonCapsule.h> > > > > > > > > /** > > > > Make a printable character. > > > > @@ -108,6 +115,18 @@ ShellCommandRunDmem ( > > UINT64 SalTableAddress; > > > > UINT64 SmbiosTableAddress; > > > > UINT64 MpsTableAddress; > > > > + UINT64 DtbTableAddress; > > > > + UINT64 MemoryAttributesTableAddress; > > > > + UINT64 RtPropertiesTableAddress; > > > > + UINT64 SystemResourceTableAddress; > > > > + UINT64 DebugImageInfoTableAddress; > > > > + UINT64 ImageExecutionTableAddress; > > > > + UINT64 JsonConfigDataTableAddress; > > > > + UINT64 JsonCapsuleDataTableAddress; > > > > + UINT64 JsonCapsuleResultTableAddress; > > > > + UINT64 MemoryRangeCapsuleAddress; > > > > + UINT64 HiiDatabaseExportBufferAddress; > > > > + UINT64 ConformanceProfileTableAddress; > > > > UINTN TableWalker; > > > > > > > > ShellStatus = SHELL_SUCCESS; > > > > @@ -168,11 +187,23 @@ ShellCommandRunDmem ( > > ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > > (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, > > (UINT64)(UINTN)Address, Size); > > > > DumpHex (2, (UINTN)Address, (UINTN)Size, Address); > > > > if (Address == (VOID *)gST) { > > > > - Acpi20TableAddress = 0; > > > > - AcpiTableAddress = 0; > > > > - SalTableAddress = 0; > > > > - SmbiosTableAddress = 0; > > > > - MpsTableAddress = 0; > > > > + Acpi20TableAddress = 0; > > > > + AcpiTableAddress = 0; > > > > + SalTableAddress = 0; > > > > + SmbiosTableAddress = 0; > > > > + MpsTableAddress = 0; > > > > + DtbTableAddress = 0; > > > > + MemoryAttributesTableAddress = 0; > > > > + RtPropertiesTableAddress = 0; > > > > + SystemResourceTableAddress = 0; > > > > + DebugImageInfoTableAddress = 0; > > > > + ImageExecutionTableAddress = 0; > > > > + JsonConfigDataTableAddress = 0; > > > > + JsonCapsuleDataTableAddress = 0; > > > > + JsonCapsuleResultTableAddress = 0; > > > > + MemoryRangeCapsuleAddress = 0; > > > > + HiiDatabaseExportBufferAddress = 0; > > > > + ConformanceProfileTableAddress = 0; > > > > for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; > > TableWalker++) { > > > > if (CompareGuid (&gST- > > >ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) { > > > > Acpi20TableAddress = (UINT64)(UINTN)gST- > > >ConfigurationTable[TableWalker].VendorTable; > > > > @@ -193,11 +224,43 @@ ShellCommandRunDmem ( > > SmbiosTableAddress = (UINT64)(UINTN)gST- > > >ConfigurationTable[TableWalker].VendorTable; > > > > continue; > > > > } > > > > - > > > > if (CompareGuid (&gST- > > >ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) { > > > > MpsTableAddress = (UINT64)(UINTN)gST- > > >ConfigurationTable[TableWalker].VendorTable; > > > > continue; > > > > } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiMemoryAttributesTableGuid)) { > > > > + MemoryAttributesTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiRtPropertiesTableGuid)) { > > > > + RtPropertiesTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiSystemResourceTableGuid)) { > > > > + SystemResourceTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiDebugImageInfoTableGuid)) { > > > > + DebugImageInfoTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiImageSecurityDatabaseGuid)) { > > > > + ImageExecutionTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiJsonConfigDataTableGuid)) { > > > > + JsonConfigDataTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiJsonCapsuleDataTableGuid)) { > > > > + JsonCapsuleDataTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + continue; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiJsonCapsuleResultTableGuid)) { > > > > + JsonCapsuleResultTableAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + } > > > > + if > > + (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, > > + &gEfiHiiDatabaseProtocolGuid)) { > > > > + HiiDatabaseExportBufferAddress = > > + (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; > > > > + } > > > > } > > > > > > > > ShellPrintHiiEx ( > > > > @@ -218,7 +281,19 @@ ShellCommandRunDmem ( > > AcpiTableAddress, > > > > Acpi20TableAddress, > > > > MpsTableAddress, > > > > - SmbiosTableAddress > > > > + SmbiosTableAddress, > > > > + DtbTableAddress, > > > > + MemoryAttributesTableAddress, > > > > + RtPropertiesTableAddress, > > > > + SystemResourceTableAddress, > > > > + DebugImageInfoTableAddress, > > > > + ImageExecutionTableAddress, > > > > + JsonConfigDataTableAddress, > > > > + JsonCapsuleDataTableAddress, > > > > + JsonCapsuleResultTableAddress, > > > > + MemoryRangeCapsuleAddress, > > > > + HiiDatabaseExportBufferAddress, > > > > + ConformanceProfileTableAddress > > > > ); > > > > } > > > > } else { > > > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > index b1d239ed37ea..c1067a0474cd 100644 > > --- > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > dsLib.uni > > +++ > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > > d > > +++ sLib.uni > > @@ -108,13 +108,27 @@ > > "---------------------------------------------\r\n" > > > > "System: Table Structure size %08x > > revision %08x\r\n" > > > > "ConIn (%016LX) ConOut (%016LX) StdErr > > (%016LX)\r\n" > > > > - "Runtime Services %016LX\r\n" > > > > - "Boot Services %016LX\r\n" > > > > - "SAL System Table %016LX\r\n" > > > > - "ACPI Table %016LX\r\n" > > > > - "ACPI 2.0 Table %016LX\r\n" > > > > - "MPS Table %016LX\r\n" > > > > - "SMBIOS Table %016LX\r\n" > > > > + "Runtime Services %016LX\r\n" > > > > + "Boot Services %016LX\r\n" > > > > + "SAL System Table %016LX\r\n" > > > > + "ACPI Table %016LX\r\n" > > > > + "ACPI 2.0 Table %016LX\r\n" > > > > + "MPS Table %016LX\r\n" > > > > + "SMBIOS Table %016LX\r\n" > > > > + "DTB Table %016LX\r\n" > > > > + "Memory Attribute Table %016LX\r\n" > > > > + "RT Properties Table %016LX\r\n" > > > > + "System Resource Table %016LX\r\n" > > > > + "Debug Image Info Table %016LX\r\n" > > > > + "Image Execution Info Table %016LX\r\n" > > > > + "Json Config Data Table %016LX\r\n" > > > > + "Json Capsule Data Table %016LX\r\n" > > > > + "Json Capsule Results Table %016LX\r\n" > > > > + "Memory Range Capsule %016LX\r\n" > > > > + "Hii Database Export Buffer %016LX\r\n" > > > > + "Conformance Profile Table %016LX\r\n" > > > > + > > > > + > > > > > > > > #string STR_LOAD_PCI_ROM_RES #language en-US "Image '%B%s%N' > > load result: %r\r\n" > > > > #string STR_LOADPCIROM_CORRUPT #language en-US "%H%s%N: File > > '%B%s%N' Image %d is corrupt.\r\n" > > > > -- > > 2.25.1 > > > > > > > > -=-=-=-=-=-= > > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#99774): > https://edk2.groups.io/g/devel/message/99774 > > Mute This Topic: https://groups.io/mt/96817141/5985097 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > > [Sunny.Wang@arm.com] -=-=-=-=-=-= > > > > > > IMPORTANT NOTICE: The contents of this email and any attachments are > > confidential and may also be privileged. If you are not the intended > recipient, > > please notify the sender immediately and do not disclose the contents to > any > > other person, use it for any purpose, or store or copy the information in > any > > medium. Thank you. > > > > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-28 15:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-02-07 21:19 [PATCH v1 0/1] Add all UEFI Config Tables to Dmem output Sam Kaynor 2023-02-07 21:19 ` [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c Sam Kaynor 2023-02-14 15:56 ` [edk2-devel] " Sunny Wang 2023-02-16 9:17 ` Gao, Zhichao 2023-02-28 15:16 ` Samer El-Haj-Mahmoud
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox