How to get physical address for any address in FreeBSD from userspace?

Viewed 186

For some investigation, I need to find out the physical address of a pointer on FreeBSD 12. On Linux, I would do that with /proc/self/pagemap but on FreeBSD, I have not found a way to do it.

So, is there a way to get the physical address of any virtual address from user-space in FreeBSD?

1 Answers

For FreeBSD, See macro vtop

find(1) and xargs(1) are your friends:

find /usr/include /usr/src/sys -type f -name '*.h' -print0 \
| xargs -0 egrep -i vtop | less

I think this is a good starting point ;)

Related