PMAP_MAP(9)
π PMAP_MAP(9) π
okay bestie, welcome to the Kernel Developer's Manual page for pmap_map β yes it's a section 9 page, yes it's kernel-level, yes you're built different for being here π«Ά
β¨ NAME β¨
pmap_map β map a physical memory range into kernel virtual address (KVA) space π
πΈ SYNOPSIS πΈ
#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 π
so the pmap_map() function takes a range of physical addresses and maps them into kernel virtual address (KVA) space, going from start to end, with the protection bits you pass in as prot. literally doing the map thing. iconic behaviour only π
and the value you put in *virt? that gets treated as a hint for the virtual address where the mapping should begin. it's giving "here's a suggestion, no pressure" energy β¨
π§ IMPLEMENTATION NOTES π§
- ngl, the
protargument is currently ignored by machine-dependent implementations. so yeah, it's there, it's in the signature, it's just... not being read rn π - architectures that can support a direct mapped physical to virtual region are allowed to just return the appropriate address inside that region, leaving
*virtunchanged. no cap, they can just do that π¦
π RETURN VALUES π
if the mapping went through successfully, pmap_map() returns the virtual address of the beginning of the mapping β and *virt gets updated too, with the first usable address after the mapped region. two-for-one, we love to see it π
if it doesn't work out? NULL is returned. that's it. that's the whole vibe. π
π₯ SEE ALSO π₯
π AUTHORS π
this manual page was written by Bruce M Simpson <bms@spc.org>. absolute legend behaviour, ty for your service π«Ά
and that's a wrap bestie!! this little beauty comes to you from Debian, dated July 21, 2003 β old but gold, fr fr. go map something responsibly πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms