kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).
The cnattach functions for sti(4) and service switch check method
for 425e in com_frodo.c are taken from OpenBSD.
The strategy how to choose the console device in hp300_cninit() is
quite diverged from 4.4BSD and OpenBSD so it's tweaked by me.
Also put several changes in sti_sgc.c to reduce diffs from OpenBSD/hp300.
Tested on 425e and 362 (which still uses gendiofb(4), not sti(4)).
XXX: sti(4) requires uvm_km_alloc(9) and uvm_map_protect(9)
to copy and call ROM functions on the executable memory region, so
it can be called before UVM and related initializations are complete.
Probably it's time to consider about MI "deferred consinit()" API
in init_main.c (or elsewhere) for modern complicated VM system...
compat_defs.h:
* Explain why _NETBSD_SOURCE should not be defined on NetBSD.
* Move NetBSD-specific block to the top of the file.
* Improve comment about Linux <feature.h>.
* Move #undef _POSIX_SOURCE and #undef _POSIX_C_SOURCE to the
Linux-specific block instead of a place that would affect all
non-NetBSD platforms. This makes the code match the comment.
This will need to be re-visited if other platforms also need
#undef _POSIX_SOURCE or #undef _POSIX_C_SOURCE. At present, I suspect
that they are needed only for Linux.
instead of ac_install_sh="$ac_aux_dir/$ac_t -c"
in all configure scripts in the gcc.old/dist tree.
This ensures that the install-sh script is always run
under the correct shell.
instead of ac_install_sh="$ac_aux_dir/$ac_t -c"
in all configure scripts in the gcc/dist tree.
This ensures that the install-sh script is always run
under the correct shell.
Also put several cleanup:
- make local functions and variables static
- use proper variable types
- some KNF
Note it turns out that extreme slowness of netboot on hp300 is
caused by the too slow access of the traditional RTC chip at intio
(i.e. netboot on 425e is so much faster than others). Oh well.
As the OpenBSD/hp300 page says 425e doesn't have the traditional
RTC at intio (as it also lacks DCA 16550 serial at intio?),
but after a few hour investigation it turns out that
425e uses mc146818 compatible calendar clock in
the Apollo "frodo" utility chip and the frodo chip on
425e actually has the 32kHz OSC and is actually backed up
by the onboard lithium battery.
Tested on HP425e (with mcclock) and HP362 (with old rtc).
Calling bus_dmamap_create/destroy is no longer possible in interrupt context.
Move the dmamaps to the end of struct ubsec_q so the rest of the struct
can be cleared with one call to memset().
As a bonus we get a 25% increase in throughput encrypting 8K blocks.