Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/iommu/iommu.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
/* struct iommu_ctx flags */ | /* struct iommu_ctx flags */ | ||||
#define IOMMU_CTX_FAULTED 0x0001 /* Fault was reported, | #define IOMMU_CTX_FAULTED 0x0001 /* Fault was reported, | ||||
last_fault_rec is valid */ | last_fault_rec is valid */ | ||||
#define IOMMU_CTX_DISABLED 0x0002 /* Device is disabled, the | #define IOMMU_CTX_DISABLED 0x0002 /* Device is disabled, the | ||||
ephemeral reference is kept | ephemeral reference is kept | ||||
to prevent context destruction */ | to prevent context destruction */ | ||||
#define DMAR_DOMAIN_GAS_INITED 0x0001 | #define IOMMU_DOMAIN_GAS_INITED 0x0001 | ||||
#define DMAR_DOMAIN_PGTBL_INITED 0x0002 | #define IOMMU_DOMAIN_PGTBL_INITED 0x0002 | ||||
#define DMAR_DOMAIN_IDMAP 0x0010 /* Domain uses identity | #define IOMMU_DOMAIN_IDMAP 0x0010 /* Domain uses identity | ||||
page table */ | page table */ | ||||
#define DMAR_DOMAIN_RMRR 0x0020 /* Domain contains RMRR entry, | #define IOMMU_DOMAIN_RMRR 0x0020 /* Domain contains RMRR entry, | ||||
cannot be turned off */ | cannot be turned off */ | ||||
/* Map flags */ | /* Map flags */ | ||||
#define IOMMU_MF_CANWAIT 0x0001 | #define IOMMU_MF_CANWAIT 0x0001 | ||||
#define IOMMU_MF_CANSPLIT 0x0002 | #define IOMMU_MF_CANSPLIT 0x0002 | ||||
#define IOMMU_MF_RMRR 0x0004 | #define IOMMU_MF_RMRR 0x0004 | ||||
#define DMAR_PGF_WAITOK 0x0001 | #define IOMMU_PGF_WAITOK 0x0001 | ||||
#define DMAR_PGF_ZERO 0x0002 | #define IOMMU_PGF_ZERO 0x0002 | ||||
#define DMAR_PGF_ALLOC 0x0004 | #define IOMMU_PGF_ALLOC 0x0004 | ||||
#define DMAR_PGF_NOALLOC 0x0008 | #define IOMMU_PGF_NOALLOC 0x0008 | ||||
#define DMAR_PGF_OBJL 0x0010 | #define IOMMU_PGF_OBJL 0x0010 | ||||
#define IOMMU_LOCK(unit) mtx_lock(&(unit)->lock) | #define IOMMU_LOCK(unit) mtx_lock(&(unit)->lock) | ||||
#define IOMMU_UNLOCK(unit) mtx_unlock(&(unit)->lock) | #define IOMMU_UNLOCK(unit) mtx_unlock(&(unit)->lock) | ||||
#define IOMMU_ASSERT_LOCKED(unit) mtx_assert(&(unit)->lock, MA_OWNED) | #define IOMMU_ASSERT_LOCKED(unit) mtx_assert(&(unit)->lock, MA_OWNED) | ||||
#define IOMMU_DOMAIN_LOCK(dom) mtx_lock(&(dom)->lock) | #define IOMMU_DOMAIN_LOCK(dom) mtx_lock(&(dom)->lock) | ||||
#define IOMMU_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->lock) | #define IOMMU_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->lock) | ||||
#define IOMMU_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->lock, MA_OWNED) | #define IOMMU_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->lock, MA_OWNED) | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |