13ce49a3d0
pmap_activate(). As of rev 1.211, the pmap::pm_lev1map field is stable across the life of the pmap, and so the conditino that the change in 1.264 was intended to avoid would not have happened anyway. - Explicitly use __cacheline_aligned / COHERENCY_UNIT rather than 64 in a couple of places. - Update comments around the lev1map lifecycle, and add some assertions to enforce the assumptions being described. - Remove some dubious DEBUG tests that are not MP-safe. - Chage some long-form #ifdef DIAGNOSTIC checks / panics to KASSERTs. - Remove the PMAP_ACTIVATE() macro because it's no longer used anywhere except for pmap_activate(). Just open-code the equivalent there. - In pmap_activate(), only perform the SWPCTX if either the PTBR or the ASN are different than what the PCB already has. Also assert that preemption is disabled and that the specified lwp is curlwp. - In pmap_deactivate(), add similar assertions, and add a comment explaining why a SWPCTX to get off of the deactivated lev1map is not necessaray. - Refactor some duplicated code in pmap_growkernel() into a new pmap_kptpage_alloc() function. - In pmap_growkernel(), assert that any user pmap published on the all-pmaps list does not reference the kernel_lev1map. - In pmap_asn_alloc(), get out early if we're called with the kernel pmap, since all kernel mappings are ASM. Remove bogus assertions around the value of pmap::pm_lev1map and the current ASN, and simply assert that pmap::pm_lev1map is never kernel_lev1map. Also assert that preemption is disabled, since we're manipulating per-cpu data structures. - Convert the "too much uptime" panic to a simple KASSERT, and update the comment to reflect that we're only subject to the longer 75 billion year ASN generation overflow (because CPUs that don't implement ASNs never go through this code path). |
||
---|---|---|
bin | ||
common | ||
compat | ||
crypto | ||
dist/pf | ||
distrib | ||
doc | ||
etc | ||
external | ||
extsrc | ||
games | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tests | ||
tools | ||
usr.bin | ||
usr.sbin | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
README.md | ||
UPDATING |
NetBSD
NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.
Building
You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:
./build.sh -U -u -j4 -m amd64 -O ~/obj release
Additional build information available in the BUILDING file.
Binaries
Testing
On a running NetBSD system:
cd /usr/tests; atf-run | atf-report
Troubleshooting
- Send bugs and patches via web form.
- Subscribe to the mailing lists. The netbsd-users list is a good choice for many problems; watch current-users if you follow the bleeding edge of NetBSD-current.
- Join the community IRC channel #netbsd @ freenode.
Latest sources
To fetch the main CVS repository:
cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src
To work in the Git mirror, which is updated every few hours from CVS:
git clone https://github.com/NetBSD/src.git