PMAP_MAP(9)
π pmap_map(9) β Kernel Developer's Manual π
okay bestie, welcome to the pmap_map(9) page β manual name right there, Kernel Developer's Manual energy, and honestly? it's giving low-level kernel mapping and I'm obsessed. β¨
πΈ NAME πΈ
pmap_map β map a physical memory range into kernel virtual address (KVA) space
No cap, that's the whole name section. π
π¦ SYNOPSIS π¦
bestie, copy these includes exactly, fr fr:
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
vm_offset_t
pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot);
π DESCRIPTION π
The pmap_map() function maps a range of physical addresses into kernel virtual address (KVA) space, from start to end, with protection bits prot. Highkey the whole point. π
The value passed in *virt is treated as a hint for the virtual address of the beginning of the mapping. So it's like a suggestion, not a demand β iykyk. π«Ά
π IMPLEMENTATION NOTES π
Real talk: the prot argument is currently ignored by machine-dependent implementations. Not me pointing at prot and whispering βyou're doing amazing, sweetieβ while it's literally ignored π.
Architectures which can support a direct mapped physical to virtual region can return the appropriate address within that region, leaving *virt unchanged. Slay for direct-mapped architectures, honestly. π
β RETURN VALUES β
The pmap_map() function returns the virtual address of the beginning of the mapping, if the mapping was successfully made; *virt will also be updated with the first usable address after the mapped region. That's the main character return value right there. π
If the function is unsuccessful, NULL is returned. Sad girl hours, but at least it's documented. π
π§ SEE ALSO π§
pmap(9)β the one and only bestie referenced here.
π AUTHORS π
This manual page was written by Bruce M Simpson <bms@spc.org>. Shoutout to Bruce, periodt. π«Ά
mwah π β this page is from Debian, dated July 21, 2003, and yes, it's the PMAP_MAP(9) manual page signing off. byeeee π¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms