Function axhal::mem::virt_to_phys
source · pub const fn virt_to_phys(vaddr: VirtAddr) -> PhysAddrExpand description
Converts a virtual address to a physical address.
It assumes that there is a linear mapping with the offset
PHYS_VIRT_OFFSET, that maps all the physical memory to the virtual
space at the address plus the offset. So we have
paddr = vaddr - PHYS_VIRT_OFFSET.