Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iommu/iommu.h
Show All 32 Lines | |||||
#ifndef _SYS_IOMMU_H_ | #ifndef _SYS_IOMMU_H_ | ||||
#define _SYS_IOMMU_H_ | #define _SYS_IOMMU_H_ | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/tree.h> | #include <sys/tree.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
kib: sys/types.h should go first. | |||||
#include <dev/pci/pcireg.h> | |||||
Not Done Inline ActionsI think that bringing all that headers into iommu.h was the wrong idea. All of that should be removed and provided by the header' consumers. kib: I think that bringing all that headers into iommu.h was the wrong idea. All of that should be… | |||||
/* Host or physical memory address, after translation. */ | /* Host or physical memory address, after translation. */ | ||||
typedef uint64_t iommu_haddr_t; | typedef uint64_t iommu_haddr_t; | ||||
/* Guest or bus address, before translation. */ | /* Guest or bus address, before translation. */ | ||||
typedef uint64_t iommu_gaddr_t; | typedef uint64_t iommu_gaddr_t; | ||||
struct bus_dma_tag_common; | struct bus_dma_tag_common; | ||||
struct iommu_map_entry; | struct iommu_map_entry; | ||||
TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); | TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); | ||||
Show All 40 Lines | struct iommu_unit { | ||||
int unit; | int unit; | ||||
int dma_enabled; | int dma_enabled; | ||||
/* Busdma delayed map load */ | /* Busdma delayed map load */ | ||||
struct task dmamap_load_task; | struct task dmamap_load_task; | ||||
TAILQ_HEAD(, bus_dmamap_iommu) delayed_maps; | TAILQ_HEAD(, bus_dmamap_iommu) delayed_maps; | ||||
struct taskqueue *delayed_taskqueue; | 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)]; | |||||
}; | }; | ||||
/* | /* | ||||
* Locking annotations: | * Locking annotations: | ||||
* (u) - Protected by iommu unit lock | * (u) - Protected by iommu unit lock | ||||
* (d) - Protected by domain lock | * (d) - Protected by domain lock | ||||
* (c) - Immutable after initialization | * (c) - Immutable after initialization | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
sys/types.h should go first.