Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/iommu/iommu.h
Show All 29 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#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/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/tree.h> | #include <sys/tree.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
/* 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; | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | int iommu_gas_map(struct iommu_domain *domain, | ||||
const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset, | const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset, | ||||
u_int eflags, u_int flags, vm_page_t *ma, struct iommu_map_entry **res); | u_int eflags, u_int flags, vm_page_t *ma, struct iommu_map_entry **res); | ||||
void iommu_gas_free_region(struct iommu_domain *domain, | void iommu_gas_free_region(struct iommu_domain *domain, | ||||
struct iommu_map_entry *entry); | struct iommu_map_entry *entry); | ||||
int iommu_gas_map_region(struct iommu_domain *domain, | int iommu_gas_map_region(struct iommu_domain *domain, | ||||
struct iommu_map_entry *entry, u_int eflags, u_int flags, vm_page_t *ma); | struct iommu_map_entry *entry, u_int eflags, u_int flags, vm_page_t *ma); | ||||
int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start, | int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start, | ||||
iommu_gaddr_t end); | iommu_gaddr_t end); | ||||
SYSCTL_DECL(_hw_iommu); | |||||
#endif /* !_SYS_IOMMU_H_ */ | #endif /* !_SYS_IOMMU_H_ */ |