diff options
author | 2021-01-15 20:49:38 +0000 | |
---|---|---|
committer | 2021-01-15 20:49:38 +0000 | |
commit | 6642123e77ce995e23207a089ec9dabba79fa257 (patch) | |
tree | 4946b029a6a27a55c3bed3bd76827ac219324ef1 | |
parent | Add IORT id for ARM SMMUv3. (diff) | |
download | wireguard-openbsd-6642123e77ce995e23207a089ec9dabba79fa257.tar.xz wireguard-openbsd-6642123e77ce995e23207a089ec9dabba79fa257.zip |
Split the IORT struct into two, as the current version not only contained
the generic IORT node information but also the Root Complex's attributes.
ok kettenis@
-rw-r--r-- | sys/arch/arm64/dev/acpipci.c | 6 | ||||
-rw-r--r-- | sys/dev/acpi/acpireg.h | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index 979a990c0f9..f10987392e2 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.23 2021/01/15 20:43:02 patrick Exp $ */ +/* $OpenBSD: acpipci.c,v 1.24 2021/01/15 20:49:38 patrick Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -650,6 +650,7 @@ acpipci_iort_map_msi(pci_chipset_tag_t pc, pcitag_t tag) struct acpi_table_header *hdr; struct acpi_iort *iort = NULL; struct acpi_iort_node *node; + struct acpi_iort_rc_node *rc; struct acpi_q *entry; uint32_t rid, offset; int i; @@ -674,7 +675,8 @@ acpipci_iort_map_msi(pci_chipset_tag_t pc, pcitag_t tag) node = (struct acpi_iort_node *)((char *)iort + offset); switch (node->type) { case ACPI_IORT_ROOT_COMPLEX: - if (node->segment == sc->sc_seg) + rc = (struct acpi_iort_rc_node *)&node[1]; + if (rc->segment == sc->sc_seg) return acpipci_iort_map_node(iort, node, rid); break; } diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h index 126f76ad34d..4c4604044dc 100644 --- a/sys/dev/acpi/acpireg.h +++ b/sys/dev/acpi/acpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpireg.h,v 1.48 2021/01/15 20:44:26 patrick Exp $ */ +/* $OpenBSD: acpireg.h,v 1.49 2021/01/15 20:49:38 patrick Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> @@ -705,6 +705,9 @@ struct acpi_iort_node { uint32_t reserved1; uint32_t number_of_mappings; uint32_t mapping_offset; +} __packed; + +struct acpi_iort_rc_node { uint64_t memory_access_properties; uint32_t atf_attributes; uint32_t segment; |