]> xenbits.xensource.com Git - ovmf.git/commitdiff
ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c
authorSam Kaynor <sam.kaynor@arm.com>
Tue, 4 Apr 2023 20:11:16 +0000 (04:11 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 13 Apr 2023 05:52:32 +0000 (05:52 +0000)
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>
Reviewed-by: Sunny Wang <sunny.wang@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni

index c52c212a56f8e44b18b6bac1f26f7dc78192f15d..a609971f345e5f35d2ebd7505f2d8d9679c1beae 100644 (file)
 \r
 #include "UefiShellDebug1CommandsLib.h"\r
 #include <Protocol/PciRootBridgeIo.h>\r
+#include <Protocol/HiiDatabase.h>\r
 #include <Guid/Acpi.h>\r
 #include <Guid/Mps.h>\r
 #include <Guid/SmBios.h>\r
+#include <Guid/MemoryAttributesTable.h>\r
+#include <Guid/RtPropertiesTable.h>\r
+#include <Guid/SystemResourceTable.h>\r
+#include <Guid/DebugImageInfoTable.h>\r
+#include <Guid/ImageAuthentication.h>\r
 \r
 /**\r
   Make a printable character.\r
@@ -108,6 +114,18 @@ ShellCommandRunDmem (
   UINT64        SalTableAddress;\r
   UINT64        SmbiosTableAddress;\r
   UINT64        MpsTableAddress;\r
+  UINT64        DtbTableAddress;\r
+  UINT64        MemoryAttributesTableAddress;\r
+  UINT64        RtPropertiesTableAddress;\r
+  UINT64        SystemResourceTableAddress;\r
+  UINT64        DebugImageInfoTableAddress;\r
+  UINT64        ImageExecutionTableAddress;\r
+  UINT64        JsonConfigDataTableAddress;\r
+  UINT64        JsonCapsuleDataTableAddress;\r
+  UINT64        JsonCapsuleResultTableAddress;\r
+  UINT64        MemoryRangeCapsuleAddress;\r
+  UINT64        HiiDatabaseExportBufferAddress;\r
+  UINT64        ConformanceProfileTableAddress;\r
   UINTN         TableWalker;\r
 \r
   ShellStatus = SHELL_SUCCESS;\r
@@ -168,11 +186,23 @@ ShellCommandRunDmem (
         ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size);\r
         DumpHex (2, (UINTN)Address, (UINTN)Size, Address);\r
         if (Address == (VOID *)gST) {\r
-          Acpi20TableAddress = 0;\r
-          AcpiTableAddress   = 0;\r
-          SalTableAddress    = 0;\r
-          SmbiosTableAddress = 0;\r
-          MpsTableAddress    = 0;\r
+          Acpi20TableAddress             = 0;\r
+          AcpiTableAddress               = 0;\r
+          SalTableAddress                = 0;\r
+          SmbiosTableAddress             = 0;\r
+          MpsTableAddress                = 0;\r
+          DtbTableAddress                = 0;\r
+          MemoryAttributesTableAddress   = 0;\r
+          RtPropertiesTableAddress       = 0;\r
+          SystemResourceTableAddress     = 0;\r
+          DebugImageInfoTableAddress     = 0;\r
+          ImageExecutionTableAddress     = 0;\r
+          JsonConfigDataTableAddress     = 0;\r
+          JsonCapsuleDataTableAddress    = 0;\r
+          JsonCapsuleResultTableAddress  = 0;\r
+          MemoryRangeCapsuleAddress      = 0;\r
+          HiiDatabaseExportBufferAddress = 0;\r
+          ConformanceProfileTableAddress = 0;\r
           for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; TableWalker++) {\r
             if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) {\r
               Acpi20TableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
@@ -198,6 +228,51 @@ ShellCommandRunDmem (
               MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
               continue;\r
             }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) {\r
+              MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiRtPropertiesTableGuid)) {\r
+              RtPropertiesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSystemResourceTableGuid)) {\r
+              SystemResourceTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiDebugImageInfoTableGuid)) {\r
+              DebugImageInfoTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiImageSecurityDatabaseGuid)) {\r
+              ImageExecutionTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonConfigDataTableGuid)) {\r
+              JsonConfigDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleDataTableGuid)) {\r
+              JsonCapsuleDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleResultTableGuid)) {\r
+              JsonCapsuleResultTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
+\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiHiiDatabaseProtocolGuid)) {\r
+              HiiDatabaseExportBufferAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
           }\r
 \r
           ShellPrintHiiEx (\r
@@ -218,7 +293,19 @@ ShellCommandRunDmem (
             AcpiTableAddress,\r
             Acpi20TableAddress,\r
             MpsTableAddress,\r
-            SmbiosTableAddress\r
+            SmbiosTableAddress,\r
+            DtbTableAddress,\r
+            MemoryAttributesTableAddress,\r
+            RtPropertiesTableAddress,\r
+            SystemResourceTableAddress,\r
+            DebugImageInfoTableAddress,\r
+            ImageExecutionTableAddress,\r
+            JsonConfigDataTableAddress,\r
+            JsonCapsuleDataTableAddress,\r
+            JsonCapsuleResultTableAddress,\r
+            MemoryRangeCapsuleAddress,\r
+            HiiDatabaseExportBufferAddress,\r
+            ConformanceProfileTableAddress\r
             );\r
         }\r
       } else {\r
index 74ad5facf6b197343ed2307515fa8977020e86ac..3741dac5d94cc47bcd8cb139b5c10b98bf6120f0 100644 (file)
   gEfiBlockIoProtocolGuid                     ## SOMETIMES_CONSUMES\r
   gEfiSimplePointerProtocolGuid               ## SOMETIMES_CONSUMES\r
   gEfiCpuIo2ProtocolGuid                      ## SOMETIMES_CONSUMES\r
+  gEfiHiiDatabaseProtocolGuid                 ## SOMETIMES_CONSUMES\r
 \r
 [Guids]\r
   gEfiGlobalVariableGuid          ## SOMETIMES_CONSUMES ## GUID\r
   gEfiAcpi10TableGuid             ## SOMETIMES_CONSUMES ## SystemTable\r
   gEfiAcpi20TableGuid             ## SOMETIMES_CONSUMES ## SystemTable\r
   gShellDebug1HiiGuid             ## SOMETIMES_CONSUMES ## HII\r
+  gEfiMemoryAttributesTableGuid   ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiRtPropertiesTableGuid       ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiSystemResourceTableGuid     ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiDebugImageInfoTableGuid     ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiImageSecurityDatabaseGuid   ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiJsonConfigDataTableGuid     ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiJsonCapsuleDataTableGuid    ## SOMETIMES_CONSUMES ## SystemTable\r
+  gEfiJsonCapsuleResultTableGuid  ## SOMETIMES_CONSUMES ## SystemTable\r
index 4fedc0d1493c9bc6c7a12f8cde9a1ae3d1057be8..4041f0cd483e8ec7536b307432cf00f8c62e5134 100644 (file)
                                                   "---------------------------------------------\r\n"\r
                                                   "System: Table Structure size %08x revision %08x\r\n"\r
                                                   "ConIn (%016LX) ConOut (%016LX) StdErr (%016LX)\r\n"\r
-                                                  "Runtime Services %016LX\r\n"\r
-                                                  "Boot Services    %016LX\r\n"\r
-                                                  "SAL System Table %016LX\r\n"\r
-                                                  "ACPI Table       %016LX\r\n"\r
-                                                  "ACPI 2.0 Table   %016LX\r\n"\r
-                                                  "MPS Table        %016LX\r\n"\r
-                                                  "SMBIOS Table     %016LX\r\n"\r
+                                                  "Runtime Services              %016LX\r\n"\r
+                                                  "Boot Services                 %016LX\r\n"\r
+                                                  "SAL System Table              %016LX\r\n"\r
+                                                  "ACPI Table                    %016LX\r\n"\r
+                                                  "ACPI 2.0 Table                %016LX\r\n"\r
+                                                  "MPS Table                     %016LX\r\n"\r
+                                                  "SMBIOS Table                  %016LX\r\n"\r
+                                                  "DTB Table                     %016LX\r\n"\r
+                                                  "Memory Attribute Table        %016LX\r\n"\r
+                                                  "RT Properties Table           %016LX\r\n"\r
+                                                  "System Resource Table         %016LX\r\n"\r
+                                                  "Debug Image Info Table        %016LX\r\n"\r
+                                                  "Image Execution Info Table    %016LX\r\n"\r
+                                                  "Json Config Data Table        %016LX\r\n"\r
+                                                  "Json Capsule Data Table       %016LX\r\n"\r
+                                                  "Json Capsule Results Table    %016LX\r\n"\r
+                                                  "Memory Range Capsule          %016LX\r\n"\r
+                                                  "Hii Database Export Buffer    %016LX\r\n"\r
+                                                  "Conformance Profile Table     %016LX\r\n"\r
+\r
+\r
 \r
 #string STR_LOAD_PCI_ROM_RES      #language en-US "Image '%B%s%N' load result: %r\r\n"\r
 #string STR_LOADPCIROM_CORRUPT    #language en-US "%H%s%N: File '%B%s%N' Image %d is corrupt.\r\n"\r