From 227a6d5473b668ffba85d67430ca626de27591b1 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 31 Aug 2022 20:49:12 +0000 Subject: [PATCH] Support SMMUv3 IORT nodes as well in the midlayers. This allows IOMMU mappings to reach a future SMMUv3 implementation. ok kettenis@, mlarkin@ --- sys/arch/arm64/dev/acpiiort.c | 4 ++-- sys/arch/arm64/dev/acpipci.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arch/arm64/dev/acpiiort.c b/sys/arch/arm64/dev/acpiiort.c index f00f6e11262..0d408fa0788 100644 --- a/sys/arch/arm64/dev/acpiiort.c +++ b/sys/arch/arm64/dev/acpiiort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiiort.c,v 1.6 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: acpiiort.c,v 1.7 2022/08/31 20:49:12 patrick Exp $ */ /* * Copyright (c) 2021 Patrick Wildt * @@ -176,7 +176,7 @@ acpiiort_device_map(struct aml_node *root, bus_dma_tag_t dmat) return dmat; node = (struct acpi_iort_node *)((char *)iort + offset); - if (node->type == ACPI_IORT_SMMU) + if (node->type == ACPI_IORT_SMMU || node->type == ACPI_IORT_SMMU_V3) return acpiiort_smmu_map(node, rid, dmat); return dmat; diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index 769087ad8da..76334eea527 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.37 2022/08/31 20:16:02 kettenis Exp $ */ +/* $OpenBSD: acpipci.c,v 1.38 2022/08/31 20:49:12 patrick Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -436,7 +436,7 @@ acpipci_probe_device_hook(void *v, struct pci_attach_args *pa) return 0; node = (struct acpi_iort_node *)((char *)iort + offset); - if (node->type == ACPI_IORT_SMMU) { + if (node->type == ACPI_IORT_SMMU || node->type == ACPI_IORT_SMMU_V3) { pa->pa_dmat = acpiiort_smmu_map(node, rid, pa->pa_dmat); for (at = pa->pa_iot->bus_private; at; at = at->at_next) { acpiiort_smmu_reserve_region(node, rid, -- 2.20.1