From: kettenis Date: Wed, 31 Aug 2022 20:16:02 +0000 (+0000) Subject: MSIs on the x13s are routed through both a "normal" SMMU and a "v3" SMMU. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7449538fa3bde8db73a4b957ca6d12693974dca9;p=openbsd MSIs on the x13s are routed through both a "normal" SMMU and a "v3" SMMU. So handle this case in acpipci(4) and kill the hack to disable MSIs. ok patrick@, mlarkin@, deraadt@ --- diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index f357d2583c5..769087ad8da 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.36 2022/08/29 15:42:25 kettenis Exp $ */ +/* $OpenBSD: acpipci.c,v 1.37 2022/08/31 20:16:02 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -145,8 +145,6 @@ acpipci_attach(struct device *parent, struct device *self, void *aux) struct aml_value res; uint64_t bbn = 0; uint64_t seg = 0; - pcitag_t tag; - pcireg_t id; sc->sc_acpi = (struct acpi_softc *)parent; sc->sc_node = aaa->aaa_node; @@ -227,15 +225,6 @@ acpipci_attach(struct device *parent, struct device *self, void *aux) if (sc->sc_msi_ic) pba.pba_flags |= PCI_FLAGS_MSI_ENABLED; - /* - * Qualcomm SC8280XP uses a non-standard MSI implementation. - */ - tag = pci_make_tag(sc->sc_pc, sc->sc_bus, 0, 0); - id = pci_conf_read(sc->sc_pc, tag, PCI_ID_REG); - if (PCI_VENDOR(id) == PCI_VENDOR_QUALCOMM && - PCI_PRODUCT(id) == PCI_PRODUCT_QUALCOMM_SC8280XP_PCIE) - pba.pba_flags &= ~PCI_FLAGS_MSI_ENABLED; - config_found(self, &pba, NULL); } @@ -841,6 +830,7 @@ acpipci_iort_map(struct acpi_iort *iort, uint32_t offset, uint32_t id) case ACPI_IORT_ITS: return id; case ACPI_IORT_SMMU: + case ACPI_IORT_SMMU_V3: return acpipci_iort_map_node(iort, node, id); }