- Use lwz/stw instead of 4-byte lswi/stswi for 405 and later, which
support unaligned word load/store by hardware. In many cases, both
source and destination are aligned on word boundaries.
- Use dcbst instead of dcbf to flush cache. The former does not
invalidate the cache line. Copied data should be used soon after.
They are not used nor exposed externally in any header file; these
functions may have never been tested so far.
Enable them again when necessary.
Note that badaddr() for oea is used by macppc port, where it is
declared as an external function.
TLBF_USED. This should be originally intended behavior of this code
segment, because
- TLBF_USED is already checked just before, so marking this page
TLBF_USED is no-op.
- TLBF_REF flag exempts that page from being flushed from TLB in next
scan, when kernel stack may be still there with high probability.
to 2 in rev 1.29:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/powerpc/include/param.h#rev1.29
Since page size is 16KB on ibm4xx, USPACE is still 16KB, which is the
same size as on other powerpc processors.
This avoids kernel crash described in PR kern/54994. Also, even if the
PR is resolved, fork(2) easily fails with ENOMEM if UPAGES is 2, which
requires physically contiguous pages for u-area. No bad side effect is
observed as far as I can see.
XXX
Even with this commit, kern/54994 still critically affects other archs
with __HAVE_CPU_UAREA_ROUTINES, i.e., alpha, mips, powerpc/{oea,booke},
and riscv.
dereference tf_pc directly to retrieve an instruction.
Even if tf_pc is valid when processor decodes the instruction, someone
can unmap its page before tf_pc is read in the exception handler.
Now, SIGSEGV is delivered correctly to the process in this case, rather
than kernel panic.
Pointed out by maxv.
Discussed with ryo and skrll.
bus_dma_segment_t's before attempting to allocate.
this hopefully avoids hangs i've had in X since updating
from netbsd-8 to netbsd-9 that i've tracked down to this
function failing with ENOMEM.
XXX: maybe can avoid the alloc entirely by batching these
calls in 32 segments each.
XXX pullup-9
cprng_fast32 sometimes returns indentical bytes, which look
"20:0e:11:33" in a MAC address, on different rump_server instances.
That leads MAC address duplications resulting in a test failure.
Fix it by using cprng_strong32 instead of cprng_fast32. However
we should rather fix cprng_fast32 (or rump itself) somehow.
The fix mitigates PR kern/54897 but test failures due to other
causes still remain.
value differs b/w oea/booke/ibm4xx, and there's no way to obtain it
from userland. Therefore, this initial value should be corrected by
cpu_setmcontext().
- Comment this in libpthread
- Add KASSERT in cpu_mcontext_validate()
This is required by subr_pcu.c rev 1.21 and later:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_pcu.c#rev1.21
Otherwise, panic occurs when FP instruction is emulated on machines
without FPU.
Note that PowerPC UISA as well as SVR4 ABI require FP instructions,
and emulation is enabled unconditionally on machines without FPU.