函数逻辑报告 |
Source Code:arch\x86\kernel\amd_gart_64.c |
Create Date:2022-07-27 09:51:36 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Map a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush.
函数原型:static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem, size_t size, int dir, unsigned long align_mask)
返回类型:dma_addr_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct device * | dev | |
dma_addr_t | phys_mem | |
size_t | size | |
int | dir | |
unsigned long | align_mask |
203 | npages等于iommu_num_pages(phys_mem, size, PAGE_SIZE) |
207 | 如果此条件成立可能性小(为编译器优化)(phys_mem + size > GART can only remap to physical addresses < 1TB )则返回:DMA_MAPPING_ERROR |
210 | iommu_page等于alloc_iommu(dev, npages, align_mask) |
211 | 如果iommu_page恒等于负1则 |
212 | 如果非nonforced_iommu(dev, phys_mem, size)则返回:phys_mem |
214 | 如果panic_on_overflow则panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns. |
216 | iommu_full(dev, size, dir) |
217 | 返回:DMA_MAPPING_ERROR |
221 | Remapping table [iommu_page + i]等于GPTE_ENCODE(phys_mem) |
224 | 返回:GART remapping area (physical) 加iommu_page乘PAGE_SIZE加phys_mem按位与PAGE_MASK的反的值 |
名称 | 描述 |
---|---|
gart_map_page | Map a single area into the IOMMU |
dma_map_sg_nonforce | Fallback for dma_map_sg in case of overflow |
gart_alloc_coherent | allocate and map a coherent mapping |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |