phys_to_virt(9)
π NAME π
okay so bestie, we're looking at phys_to_virt(9) from the Kernel API Manual, and it's literally the function that maps a physical address to a virtual one. iconic behavior, no cap β¨
π SYNOPSIS π
void * phys_to_virt (phys_addr_t address );
like that's the whole vibe check π«Ά
πΈ ARGUMENTS πΈ
addressβ address to remap π that's the one and only argument, bestie.
π¦ DESCRIPTION π¦
The returned virtual address is a current CPU mapping for the memory address given. it's only valid to use this function on addresses that have a kernel mapping, periodt.
β οΈ so likeβ¦ only valid on addresses that have a kernel mapping. don't come for me if you ignore that, i warned you π
This function does not handle bus mappings for DMA transfers. nope, not its job, not its lane π«
In almost all conceivable cases a device driver should not be using this function. likeβ¦ fr fr, almost all conceivable cases, bestie. it's giving "not for your driver, actually" π
π SEE ALSO π
- Kernel file
./arch/x86/include/asm/io.h virt_to_phys(9)ioremap(9)iosubmit_cmds512(9)
go read those too, iykyk π
mwah π source/version: ./arch/x86/include/asm, dated October 2026. slay and read your manpages, bestie ππ¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms