diff options
author | 2021-01-15 20:43:02 +0000 | |
---|---|---|
committer | 2021-01-15 20:43:02 +0000 | |
commit | 8a4c6a2e57dbed4289c315ee387a9811f1402807 (patch) | |
tree | 0c19c909924123acb7be11d3f917fa7e2dac1205 | |
parent | zap trailing period (diff) | |
download | wireguard-openbsd-8a4c6a2e57dbed4289c315ee387a9811f1402807.tar.xz wireguard-openbsd-8a4c6a2e57dbed4289c315ee387a9811f1402807.zip |
Move IO Remapping Table (IORT) struct defines to the common ACPI header
so that it can be used by more drivers.
ok kettenis@
-rw-r--r-- | sys/arch/arm64/dev/acpipci.c | 36 | ||||
-rw-r--r-- | sys/dev/acpi/acpireg.h | 35 |
2 files changed, 35 insertions, 36 deletions
diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index 6fef5f16e05..979a990c0f9 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.22 2020/12/06 21:20:41 kettenis Exp $ */ +/* $OpenBSD: acpipci.c,v 1.23 2021/01/15 20:43:02 patrick Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -598,40 +598,6 @@ pci_lookup_segment(int segment) * IORT support. */ -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; - uint32_t acpipci_iort_map(struct acpi_iort *, uint32_t, uint32_t); uint32_t 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 */ |