Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iommu/iommu.h
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | #define IOMMU_CTX_DISABLED 0x0002 /* Device is disabled, the | ||||
to prevent context destruction */ | to prevent context destruction */ | ||||
#define IOMMU_DOMAIN_GAS_INITED 0x0001 | #define IOMMU_DOMAIN_GAS_INITED 0x0001 | ||||
#define IOMMU_DOMAIN_PGTBL_INITED 0x0002 | #define IOMMU_DOMAIN_PGTBL_INITED 0x0002 | ||||
#define IOMMU_DOMAIN_IDMAP 0x0010 /* Domain uses identity | #define IOMMU_DOMAIN_IDMAP 0x0010 /* Domain uses identity | ||||
page table */ | page table */ | ||||
#define IOMMU_DOMAIN_RMRR 0x0020 /* Domain contains RMRR entry, | #define IOMMU_DOMAIN_RMRR 0x0020 /* Domain contains RMRR entry, | ||||
cannot be turned off */ | cannot be turned off */ | ||||
#define DMAR_DOMAIN_VMM 0x0040 /* Used by VMM */ | |||||
jhb: Can we perhaps not make these names DMAR-specific? Presumably we will need a similar notion of… | |||||
Done Inline ActionsAlready done, thank you for noting. kib: Already done, thank you for noting. | |||||
#define DMAR_DOMAIN_BUSDMA 0x0100 /* Used for busdma */ | |||||
#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 53 Lines • Show Last 20 Lines |
Can we perhaps not make these names DMAR-specific? Presumably we will need a similar notion of separate domains for pass through on arm64, and also when we have an AMD IOMMU driver.