标签: linux block linux-device-driver device-driver virtual-address-space
如何在内核空间中将虚拟地址转换为物理地址? 使用:
#include <asm/io.h> phys_addr = virt_to_phys(virt_addr); virt_addr = phys_to_virt(phys_addr); bus_addr = virt_to_bus(virt_addr); virt_addr = bus_to_virt(bus_addr);