Function report | 
Source Code:arch\x86\kernel\amd_gart_64.c | 
Create Date:2022-07-28 08:52:16 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Map a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush.
Proto:static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem, size_t size, int dir, unsigned long align_mask)
Type:dma_addr_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| 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 | If Value for the false possibility is greater at compile time(phys_mem + size > GART can only remap to physical addresses < 1TB ) Then Return DMA_MAPPING_ERROR | 
| 210 | iommu_page = alloc_iommu(dev, npages, align_mask) | 
| 211 | If iommu_page == -1 Then | 
| 212 | If Not nonforced_iommu(dev, phys_mem, size) Then Return phys_mem | 
| 214 | If panic_on_overflow Then 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 | Return DMA_MAPPING_ERROR | 
| 221 | Remapping table [iommu_page + i] = GPTE_ENCODE(phys_mem) | 
| 224 | Return GART remapping area (physical) + iommu_page * PAGE_SIZE + (phys_mem & ~PAGE_MASK) | 
| Name | Describe | 
|---|---|
| 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 | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |