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).
The test for the different escaping has been adjusted to actually show
the different parsing results in the test output. To do this, it had to
get its own file since it needs the -dv debug flag and specialized
post-processing.
Several of the tests use simple variable names that might be influenced
by environment variables of the same name. Especially the tests for the
?= variable assignment operator need an empty environment to start with,
to produce reliable results.
The PATH must be in the base environment since several tests depend on
the usual tools like echo(1), sleep(1), grep(1). Setting the PATH to a
fixed value would have made it impossible to run the tests in a custom
environment that don't have a /bin directory. It's the user's
responsibility to provide a sane PATH.
Without that flag, <sys.mk> is loaded before the tests. The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.
If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched. The system-default rules and definitions are still
available, they are just not active by default.
Suggested by sjg.
the lev1map associated with l2's pmap. Otherwise, the first time we
SWPCTX to l2, we'll be on l1's page tables until the first pmap_activate()
call for l2.
With the many newly added tests, having two messages ("testing xzy" and
"postprocessing xyz") made the output too noisy since the words were not
aligned nicely. Use the same formatting as for MAKEVERBOSE=0, and
remove the message for postprocessing. If there should ever be problems
during postprocessing, it's trivial to run "../make TESTS=bad-test -dl"
to find out where the problem is.
...which is how the kernel runs. Switch to using __SOFTFP__ for
consistency with how it gets exposed to C, although I'm not sure how
to get it defined automagically in the toolchain for .S files so
that's set manually in files.aesneon for now.
The variables CLEANFILES and CLEANDIRS are not supposed to be
user-settable, thus use a simple "=" instead of "+=".
Since CLEANDIRS is always set, there is no point in making the rm
conditional.
At the beginning of that test, the library archive obviously does not
exist yet.
This test failure is a bit hard to detect since the test is disabled in
usr.bin/make, but not in tests/usr.bin/make. This is because the latter
just runs all .mk files as tests, no matter whether they are commented
out or not.
The test names have been derived from the current manual page.
All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.
This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.
The recent change to cpu.h and struct cpu_info needs an early definition
for the ARM_INTR_IMPLs that want to inline the spl functions and get
{,set_}curcpl() from cpu.h
The old boot_ustar had many hard coding and was small(<1KB).
The new xxboot_ustarfs is a part of integrated larger(<8KB) xxboot.
We had to maintain three similar but not the same bootloaders, but
now we have two!
- Rewrite boot.S completely.
boot.S now supports boot from SCSI HD/CD and floppy.
- Use IOCS call to identify the floppy format, instead of chkfmt.s which
accesses hardware directly.
- Import print_hex() debug function from boot_ufs.
- Import a feature that displays initial registers (for debug) from boot_ufs,
and restore it (this in boot_ufs has been broken).
- Add size optimized alternatives for some libkern routines.
- Stop linking libsa to prevent to link unexpected objects.
- Bump version to 2.0.
1. Give the offset of the rbnode, not some other random members to
overwrite with garbage.
2. Don't try to unlock a mutex at NULL.
3. Make sure all paths out after ugenif_acquire go via
ugenif_release.
This way putting ugenif in kernel config actually works to wire it to
the /dev/ugenN.MM device nodes in userland.
Not a fully fleshed out solution to the ugen problem -- there's no
way for a userland driver to kick out a kernel driver and take over,
but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2
but ugen(4), with pcscd(8), for Yubikey CCID.
Fix various MP-safety issues while here (still not MPSAFE, but more
progress).
cv_signal already has this microoptimization.
While here, make the lock cover the relevant things we're issuing
cv_signal about -- progress toward real MP-safety.
it can be shared between ddb, other mips kernel components (see
locore), and an upcoming crash(8) port.
remove second copy of kdbpeek() (hidden by old DDB_TRACE
option, but they're functionally equivalent.)
tested on octeon.
ok simonb@