Subject: Exporting USRSTACK, VM_MIN_ADDRESS and VM_MAXUSER_ADDRESS
To: None <tech-kern@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: tech-kern
Date: 12/26/2000 19:28:09
It seems that libkvm has cause to want to know the values of USRSTACK,
VM_MIN_ADDRESS and VM_MAXUSER_ADDRESS. On some MACHINE_ARCHs, these
aren't constant, so libkvm has to work them out at runtime. At the
moment, it gets uses (__ps_strings + 1) for USRSTACK and
VM_MAXUSER_ADDRESS, and 0 for VM_MIN_ADDRESS. This won't work, though,
for a libkvm to run on both NetBSD/arm26 and NetBSD/arm32, since they
define VM_MIN_ADDRESS as 0x8000 and 0x1000 respectively, since the bottom
logical page on each system is reserved for the CPU exception vectors.
Now, it would be possible for libkvm to detect the type of system it's
running on and to adjust its idea of min_uva to match, but it would seem
more sensible to make this information available by some common
mechanism. A sysctl is the obvious way, but should it be three new
sysctls or an addition to struct uvmexp_sysctl? Should I even be doing
this at all?
If no-one suggests anything better, I'll add three extra elements to the
end of struct uvmexp_sysctl.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>