When IOMMU is enabled, how to get the Kernel Virtual Address from a Physical address
Hi,
I use dam_alloc_coherent to allocate a DMA memory, I observe that the dma_addr_t (0xFC000000) and the virtual address (0xFFFF8800FC000000) are all under 1G address when the IOMMU is DISABLED. Then I can get the virtual address back in other code by phys_to_virt() with the physical address.
When the IOMMU is ENABLED, I found that the physical address (0xFC000000) is still under 1G address but the virtual address is bigger than 1G (0xFFFF8801FA000000), and the phys_to_virt() can not return the correct virtual address by physical address??????
How can I get the correct virtual address by physical address when IOMMU is on???
Thanks for any comment!
|