memmap in FreeBSD
mangesh chitnis
mngesh1 at yahoo.com
Sun Jul 7 11:45:33 UTC 2013
Hi,
What is the memmap equivalent of Linux in FreeBSD?
In Linux memmap is used to reserve a portion of physical memory. This is used as a kernel boot argument. E.g.: memmap=2G$1G will reserve 1GB memory above 2GB, incase I have 3GB RAM. This 1GB reserved memory is not visible to the OS, however this 1GB can be used using ioremap.
How can I reserve memory in FreeBSD and later use it i.e memmap and ioremap equivalent?
I have tried using hw.physmem loader parameter.
I have 3 GB system memory and I have set hw.physmem=2G.
sysctl -a shows:
hw.physmem: 2.12G
hw.usermem: 1.9G
hw.realmem: 2.15G
devinfo -rv shows:
ram0:
0x00-0x9f3ff
0x10000000-0xbfedffff
0xbff00000-0xbfffffff
Here, looks like it is showing the full 3 GB mapping.
Now, how do I know which is that 1 GB available memory (In Linux, this memory is shown as reserved in /proc/iomem under System RAM) ? Also, which function(similar to ioremap) should I call to map the physical address to virtual address?
Thanks.
More information about the freebsd-hackers
mailing list