Bugzilla: 3773 (https://bugzilla.tianocore.org/show_bug.cgi?id=3773)

Add a new META_DATA_TYPE, "MetaDataInstalledTables" to store the
signatures from tables that have been successfully installed. This is
to allow validation of mandatory ACPI tables that are specified in the
Arm SBBR specification.

Signed-off-by: Chris Jones <christopher.jo...@arm.com>
---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c          | 21 
++++++++++++++++++++
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Validators/AcpiDataStore.h |  5 
+++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
index 
381651ca3af75ab777ccff596ea17fb39be629bc..d7717ae3a6c37513f082bf78c63337a1f517bca5
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
@@ -18,6 +18,7 @@
 #include "AcpiTableParser.h"
 #include "AcpiView.h"
 #include "AcpiViewConfig.h"
+#include "Validators/AcpiDataStore.h"
 
 #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
   #include "Arm/SbbrValidator.h"
@@ -243,4 +244,24 @@ ProcessAcpiTable (
     *AcpiTableLength,
     *AcpiTableRevision
     );
+
+  // Record that the table has been installed.
+  Status = StoreAcpiMetaData (
+             MetaDataInstalledTables,
+             MetaDataInstalledTables,
+             (UINT32 *)AcpiTableSignature,
+             sizeof (AcpiTableSignature)
+             );
+  if (EFI_ERROR (Status)) {
+    Print (
+      L"\nERROR: Unable to store %c%c%c%c signature." \
+      L" Status = 0x%x.",
+      SignaturePtr[0],
+      SignaturePtr[1],
+      SignaturePtr[2],
+      SignaturePtr[3],
+      Status
+      );
+    return;
+  }
 }
diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Validators/AcpiDataStore.h 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Validators/AcpiDataStore.h
index 
dfe45665372bae2516860d6c4e8d360ba88f906c..a2516acb0ca98dc473484f738d9bf2ae133c039f
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Validators/AcpiDataStore.h
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Validators/AcpiDataStore.h
@@ -12,8 +12,9 @@
   Types of data that can be stored and accessed in the ACPI data store.
 **/
 typedef enum MetaDataType {
-  MetaDataPpttProcs = 0,   ///< List of all PPTT processor structures.
-  MetaDataMadtGicC  = 1,   ///< List of all MADT GICC structures.
+  MetaDataPpttProcs       = 0,  ///< List of all PPTT processor structures.
+  MetaDataMadtGicC        = 1,  ///< List of all MADT GICC structures.
+  MetaDataInstalledTables = 2,  ///< Signatures of all installed ACPI tables.
   MetaDataMax
 } META_DATA_TYPE;
 
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84920): https://edk2.groups.io/g/devel/message/84920
Mute This Topic: https://groups.io/mt/87748595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to