summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlkka Koskinen <ilkka@os.amperecomputing.com>2021-10-12 13:28:06 -0700
committerIlkka Koskinen <ilkka@os.amperecomputing.com>2021-12-14 13:48:27 -0800
commitcf36a6d658ca5aa8c329c2edfc3322c095ffd844 (patch)
treee8c2987841038b100ad2fe948f6079292328f454
parent403f9965aba7ff9d2ed5b41bbffdd2a1ed0f596f (diff)
downloadacpica-cf36a6d658ca5aa8c329c2edfc3322c095ffd844.tar.gz
iASL: Add suppport for AGDI table
Add support for Arm Generic Diagnostic Dump and Reset Interface, which is described by "ACPI for Arm Components 1.1 Platform Design Document" ARM DEN0093. Add the necessary types in the ACPICA header files and support for compiling and decompiling the table. Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
-rw-r--r--source/common/ahtable.c1
-rw-r--r--source/common/dmtable.c1
-rw-r--r--source/common/dmtbinfo2.c19
-rw-r--r--source/compiler/dtcompiler.h1
-rw-r--r--source/compiler/dttemplate.h10
-rw-r--r--source/include/acdisasm.h2
-rw-r--r--source/include/actbinfo.h2
-rw-r--r--source/include/actbl2.h23
8 files changed, 59 insertions, 0 deletions
diff --git a/source/common/ahtable.c b/source/common/ahtable.c
index 2ebbee379..def425205 100644
--- a/source/common/ahtable.c
+++ b/source/common/ahtable.c
@@ -200,6 +200,7 @@ AcpiAhGetTableInfo (
const AH_TABLE AcpiGbl_SupportedTables[] =
{
{ACPI_SIG_AEST, "Arm Error Source Table"},
+ {ACPI_SIG_AGDI, "Arm Generic Diagnostic Dump and Reset Device Interface Table"},
{ACPI_SIG_ASF, "Alert Standard Format Table"},
{ACPI_SIG_BDAT, "BIOS Data ACPI Table"},
{ACPI_SIG_BERT, "Boot Error Record Table"},
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
index 7c0eef898..3137132ab 100644
--- a/source/common/dmtable.c
+++ b/source/common/dmtable.c
@@ -649,6 +649,7 @@ static const char *AcpiDmGasAccessWidth[] =
const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{
{ACPI_SIG_AEST, NULL, AcpiDmDumpAest, DtCompileAest, TemplateAest},
+ {ACPI_SIG_AGDI, AcpiDmTableInfoAgdi, NULL, NULL, TemplateAgdi},
{ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
{ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
{ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c
index 30ab4519c..552882dd1 100644
--- a/source/common/dmtbinfo2.c
+++ b/source/common/dmtbinfo2.c
@@ -188,6 +188,25 @@
* Remaining tables are not consumed directly by the ACPICA subsystem
*/
+/*******************************************************************************
+ *
+ * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
+ *
+ * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
+ * ARM DEN0093 v1.1
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAgdi[] =
+{
+ {ACPI_DMT_UINT8, ACPI_AGDI_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AGDI_FLAG_OFFSET (Flags, 0), "Signalling mode", 0},
+ {ACPI_DMT_UINT24, ACPI_AGDI_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AGDI_OFFSET (SdeiEvent), "SdeiEvent", 0},
+ {ACPI_DMT_UINT32, ACPI_AGDI_OFFSET (Gsiv), "Gsiv", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index cfaa187f7..d9c92ce23 100644
--- a/source/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
@@ -762,6 +762,7 @@ DtGetGenericTableInfo (
/* ACPI Table templates */
extern const unsigned char TemplateAest[];
+extern const unsigned char TemplateAgdi[];
extern const unsigned char TemplateAsf[];
extern const unsigned char TemplateBoot[];
extern const unsigned char TemplateBdat[];
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
index c3971a498..e9272f3ae 100644
--- a/source/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
@@ -249,6 +249,16 @@ const unsigned char TemplateAest[] =
0x56,0x00,0x00,0x00 /* 000002C8 "V..." */
};
+const unsigned char TemplateAgdi[] =
+{
+ 0x41,0x47,0x44,0x49,0x30,0x00,0x00,0x00, /* 00000000 "AGDI0..." */
+ 0x01,0xE4,0x41,0x4D,0x50,0x45,0x52,0x45, /* 00000008 "..AMPERE" */
+ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x05,0x01,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "..! ...." */
+ 0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00 /* 00000028 "...@...." */
+};
+
const unsigned char TemplateAsf[] =
{
0x41,0x53,0x46,0x21,0x72,0x00,0x00,0x00, /* 00000000 "ASF!r..." */
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index 8abaf3b67..ee354f36e 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -257,6 +257,7 @@ typedef enum
ACPI_DMT_AEST_RES,
ACPI_DMT_AEST_XFACE,
ACPI_DMT_AEST_XRUPT,
+ ACPI_DMT_AGDI,
ACPI_DMT_ASF,
ACPI_DMT_CEDT,
ACPI_DMT_DMAR,
@@ -386,6 +387,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAgdi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h
index 9721c1a11..b99da79d4 100644
--- a/source/include/actbinfo.h
+++ b/source/include/actbinfo.h
@@ -152,6 +152,7 @@
/*
* Macros used to generate offsets to specific table fields
*/
+#define ACPI_AGDI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_AGDI,f)
#define ACPI_FACS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f)
#define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
#define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
@@ -412,6 +413,7 @@
#define ACPI_AEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_PROCESSOR,f,o)
#define ACPI_AEST0D_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERFACE,f,o)
#define ACPI_AEST0E_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERRUPT,f,o)
+#define ACPI_AGDI_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_AGDI,f,o)
#define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o)
#define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o)
#define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o)
diff --git a/source/include/actbl2.h b/source/include/actbl2.h
index 80cd5ace7..4c6d64d4f 100644
--- a/source/include/actbl2.h
+++ b/source/include/actbl2.h
@@ -168,6 +168,7 @@
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
+#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
@@ -402,6 +403,28 @@ typedef struct acpi_aest_node_interrupt
/*******************************************************************************
+ * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
+ *
+ * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
+ * ARM DEN0093 v1.1
+ *
+ ******************************************************************************/
+typedef struct acpi_table_agdi
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Flags;
+ UINT8 Reserved[3];
+ UINT32 SdeiEvent;
+ UINT32 Gsiv;
+
+} ACPI_TABLE_AGDI;
+
+/* Mask for Flags field above */
+
+#define ACPI_AGDI_SIGNALING_MODE (1)
+
+
+/*******************************************************************************
*
* BDAT - BIOS Data ACPI Table
*