diff options
| author | Ruslan Bukin <br@FreeBSD.org> | 2020-07-28 16:08:14 +0000 |
|---|---|---|
| committer | Ruslan Bukin <br@FreeBSD.org> | 2020-07-28 16:08:14 +0000 |
| commit | ea4c01156a9244a084a4044bc77147adfd9167ce (patch) | |
| tree | 89d027a3e0c8faf873b2d61d7ed46e7553a18f1b /sys/dev/iommu | |
| parent | c7f893a42b9572f1152d163290202b855953a768 (diff) | |
Notes
Diffstat (limited to 'sys/dev/iommu')
| -rw-r--r-- | sys/dev/iommu/busdma_iommu.c | 8 | ||||
| -rw-r--r-- | sys/dev/iommu/iommu.h | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index a4fe8ee9d0631..0fd54e8b641a8 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -299,7 +299,7 @@ acpi_iommu_get_dma_tag(device_t dev, device_t child) } bool -bus_dma_dmar_set_buswide(device_t dev) +bus_dma_iommu_set_buswide(device_t dev) { struct iommu_unit *unit; device_t parent; @@ -317,12 +317,12 @@ bus_dma_dmar_set_buswide(device_t dev) if (slot != 0 || func != 0) { if (bootverbose) { device_printf(dev, - "dmar%d pci%d:%d:%d requested buswide busdma\n", + "iommu%d pci%d:%d:%d requested buswide busdma\n", unit->unit, busno, slot, func); } return (false); } - dmar_set_buswide_ctx(unit, busno); + iommu_set_buswide_ctx(unit, busno); return (true); } @@ -987,7 +987,7 @@ iommu_fini_busdma(struct iommu_unit *unit) } int -bus_dma_dmar_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map1, +bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map1, vm_paddr_t start, vm_size_t length, int flags) { struct bus_dma_tag_common *tc; diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index c3bc3d26b7657..380f4cdfe5f6b 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -34,11 +34,13 @@ #ifndef _SYS_IOMMU_H_ #define _SYS_IOMMU_H_ +#include <sys/types.h> #include <sys/queue.h> #include <sys/sysctl.h> #include <sys/taskqueue.h> #include <sys/tree.h> -#include <sys/types.h> + +#include <dev/pci/pcireg.h> /* Host or physical memory address, after translation. */ typedef uint64_t iommu_haddr_t; @@ -96,6 +98,14 @@ struct iommu_unit { struct task dmamap_load_task; TAILQ_HEAD(, bus_dmamap_iommu) delayed_maps; struct taskqueue *delayed_taskqueue; + + /* + * Bitmap of buses for which context must ignore slot:func, + * duplicating the page table pointer into all context table + * entries. This is a client-controlled quirk to support some + * NTBs. + */ + uint32_t buswide_ctxs[(PCI_BUSMAX + 1) / NBBY / sizeof(uint32_t)]; }; /* |
