[PATCH 2/2] acpi: iort: Add PMCG support
Jeffrey Hugo
jhugo at codeaurora.org
Mon Jun 19 16:50:11 UTC 2017
The IORT spec rev C defines type 5 nodes for Performance Monitoring
Counter Group (PMCG). Add support for these nodes.
Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
---
src/acpi/iort/iort.c | 28 ++++++++++++++++++++++++++++
src/lib/include/fwts_acpi.h | 11 +++++++++++
2 files changed, 39 insertions(+)
diff --git a/src/acpi/iort/iort.c b/src/acpi/iort/iort.c
index 930eb5f..1cab6cb 100644
--- a/src/acpi/iort/iort.c
+++ b/src/acpi/iort/iort.c
@@ -653,6 +653,31 @@ static void iort_check_smmuv3(
}
/*
+ * Check IORT Performance Monitoring Counter Group (PMCG)
+ */
+static void iort_check_pmcg(
+ fwts_framework *fw,
+ uint8_t *data,
+ uint8_t *node_end,
+ bool *passed)
+{
+ fwts_acpi_table_iort_pmcg_node *node =
+ (fwts_acpi_table_iort_pmcg_node *)data;
+
+ iort_node_dump(fw, "IORT PMCG node", (fwts_acpi_table_iort_node *)data);
+ fwts_log_info_verbatim(fw, " Base Address: 0x%16.16" PRIx64, node->base_address);
+ fwts_log_info_verbatim(fw, " Overflow interrupt GSIV: 0x%8.8" PRIx32, node->gsiv);
+ fwts_log_info_verbatim(fw, " Node reference: 0x%8.8" PRIx32, node->node_ref);
+
+ iort_id_mappings_dump(fw, data, node_end);
+
+ iort_node_check(fw, data, false, false, passed);
+ iort_id_mappings_check(fw, data, node_end, passed);
+
+ fwts_log_nl(fw);
+}
+
+/*
* IORT Remapping Table
* http://infocenter.arm.com/help/topic/com.arm.doc.den0049a/DEN0049A_IO_Remapping_Table.pdf
*/
@@ -725,6 +750,9 @@ static int iort_test1(fwts_framework *fw)
case 0x04:
iort_check_smmuv3(fw, data, node_end, &passed);
break;
+ case 0x05:
+ iort_check_pmcg(fw, data, node_end, &passed);
+ break;
default:
/* reserved */
passed = false;
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index 8bc1164..b34a1aa 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -1770,6 +1770,17 @@ typedef struct {
*/
} __attribute__ ((packed)) fwts_acpi_table_iort_smmuv3_node;
+typedef struct {
+ fwts_acpi_table_iort_node iort_node;
+ uint64_t base_address;
+ uint32_t gsiv;
+ uint32_t node_ref;
+ /*
+ followed by array of ids_mappings at some offset
+ fwts_acpi_table_iort_id_mapping identifier_array[0];
+ */
+} __attribute__ ((packed)) fwts_acpi_table_iort_pmcg_node;
+
/*
* ACPI STAO (Status Override Table)
* http://wiki.xenproject.org/mediawiki/images/0/02/Status-override-table.pdf
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
More information about the fwts-devel
mailing list