summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpireg.h
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-01-15 20:52:50 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-01-15 20:52:50 +0000
commit5c9274a6f59f68de2ba271f3bcc8e61956e615bc (patch)
tree2f3abe066ed6265b40b61bccca086e40c722ab32 /sys/dev/acpi/acpireg.h
parent7a9f182aaefdad1e0aab4295b6317324728e8516 (diff)
Add IORT structs for ARM SMMU versions 1 and 2.
ok kettenis@
Diffstat (limited to 'sys/dev/acpi/acpireg.h')
-rw-r--r--sys/dev/acpi/acpireg.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index 4c4604044dc..20d13869eff 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.49 2021/01/15 20:49:38 patrick Exp $ */
+/* $OpenBSD: acpireg.h,v 1.50 2021/01/15 20:52:49 patrick Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -715,6 +715,40 @@ struct acpi_iort_rc_node {
uint8_t reserved2[3];
} __packed;
+struct acpi_iort_smmu_node {
+ uint64_t base_address;
+ uint64_t span;
+ uint32_t mode;
+ uint32_t flags;
+#define ACPI_IORT_SMMU_DVM 0x00000001
+#define ACPI_IORT_SMMU_COHERENT 0x00000002
+ uint32_t global_interrupt_offset;
+ uint32_t number_of_context_interrupts;
+ uint32_t context_interrupt_offset;
+ uint32_t number_of_pmu_interrupts;
+ uint32_t pmu_interrupt_offset;
+} __packed;
+
+struct acpi_iort_smmu_global_interrupt {
+ uint32_t nsgirpt_gsiv;
+ uint32_t nsgirpt_flags;
+#define ACPI_IORT_SMMU_INTR_EDGE (1 << 0)
+ uint32_t nscfgirpt_gsiv;
+ uint32_t nscfgirpt_flags;
+} __packed;
+
+struct acpi_iort_smmu_context_interrupt {
+ uint8_t gsiv_flags;
+#define ACPI_IORT_SMMU_CONTEXT_INTERRUPT_GSIV(x) ((x) >> 0 & 0xf)
+#define ACPI_IORT_SMMU_CONTEXT_INTERRUPT_FLAGS(x) ((x) >> 4 & 0xf)
+} __packed;
+
+struct acpi_iort_smmu_pmu_interrupt {
+ uint8_t gsiv_flags;
+#define ACPI_IORT_SMMU_PMU_INTERRUPT_GSIV(x) ((x) >> 0 & 0xf)
+#define ACPI_IORT_SMMU_PMU_INTERRUPT_FLAGS(x) ((x) >> 4 & 0xf)
+} __packed;
+
struct acpi_iort_mapping {
uint32_t input_base;
uint32_t number_of_ids;