cache). This helps to avoid cache alias problems, and can improve performance
in the case where physical pages have multiple mappings (since the pages will
not have to be marked cache-inhibited).
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
mappings for CADDR1 and CADDR2, unless we're built w/ -DDEBUG. Since
these addresses are only used in these routines, we can "lazily invalidate"
them by just using them again. This makes these routines a teeny bit faster,
as it saves 1 or 2 TBIS's per call.
Suggested by Leo Weppelman <leo@netbsd.org>.
pmap, forget all of the mappings for the user address space for that pmap.
This causes the PT pages to be freed so that they can be reclaimed by the
VM system. [*]
[*] Actually, in the current implementation, it merely causes the wiring
count on the PT pages to drop to 0, which allows them to be reclaimed by
the pagedaemon. Handling of PT pages needs to be completely rewritten.
pmap_remove() for the temporary addresses. This is completely unnecessary
as the temps are used ONLY for these routines, and we have better control
over the mapping by manipulating the PTE ourself. On VAC systems, cache-
inhibit the mapping to prevent wasting a cache load.
These routines are now significantly faster.
Add a DIAGNOSTIC check in pmap_enter() for kernel pmap and (CADDR1 or CADDR2);
nothing should be adding mappings there via that interface.
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.
XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));
by someone!
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
-sys/lib/libkern builds as library per default (as it was documented all
the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
(for now; should depend on actual "option LKM" or -better- functions
included for LKM use should be pulled in by a stub)
-always link libcompat before libkern - libkern stuff can be referred to
by libcompat, but not the other way