summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-01-15 20:43:03 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-01-15 20:43:03 +0000
commitb19a397055bb9a9c48dbeb22f2c4f47f3c8924ca (patch)
tree24182a6e3b809defee87a6013393884a6bc87c61 /sys/dev/acpi
parent235286ee04c96e7ee9171a23803f2465eaf5adac (diff)
Move IO Remapping Table (IORT) struct defines to the common ACPI header
so that it can be used by more drivers. ok kettenis@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpireg.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index d8d2074e413..0007b50367b 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.46 2020/09/15 13:43:40 jordan Exp $ */
+/* $OpenBSD: acpireg.h,v 1.47 2021/01/15 20:43:02 patrick Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -686,6 +686,39 @@ struct acpi_ivrs {
uint8_t reserved[8];
} __packed;
+struct acpi_iort {
+ struct acpi_table_header hdr;
+#define IORT_SIG "IORT"
+ uint32_t number_of_nodes;
+ uint32_t offset;
+ uint32_t reserved;
+} __packed;
+
+struct acpi_iort_node {
+ uint8_t type;
+#define ACPI_IORT_ITS 0
+#define ACPI_IORT_ROOT_COMPLEX 2
+#define ACPI_IORT_SMMU 3
+ uint16_t length;
+ uint8_t revision;
+ uint32_t reserved1;
+ uint32_t number_of_mappings;
+ uint32_t mapping_offset;
+ uint64_t memory_access_properties;
+ uint32_t atf_attributes;
+ uint32_t segment;
+ uint8_t memory_address_size_limit;
+ uint8_t reserved2[3];
+} __packed;
+
+struct acpi_iort_mapping {
+ uint32_t input_base;
+ uint32_t number_of_ids;
+ uint32_t output_base;
+ uint32_t output_reference;
+ uint32_t flags;
+#define ACPI_IORT_MAPPING_SINGLE 0x00000001
+} __packed;
#define ACPI_FREQUENCY 3579545 /* Per ACPI spec */