07e6e81e2f
7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into it which totally screws us even when restoring %wstate afterwards as spill/fill traps can happen while in OFW. The rather hackish OpenBSD approach of just setting the equivalent of WSTATE_KERNEL to 7 also is no option as we treat %wstate as a bit field. So in order to deal with this problem actually implement spill/fill handlers for %wstate 7 which just act as the WSTATE_KERNEL ones except of theoretically also handling 32-bit, turn off interrupts completely so we don't even take IPIs while in OFW which should ensure we only take spill/fill traps at most and restore %wstate after calling into OFW once we have taken over the trap table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into OFW just like OpenSolaris does, which should at least help testing this change on non-V1280. - Remove comments referring to the %wstate usage in BSD/OS. - Remove the no longer used RSF_ALIGN_RETRY macro. - Correct some trap table addresses in comments. - Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table. - Ensure PSTATE_AM is off when entering or exiting to OFW as well as that interrupts are also completely off when exiting to OFW as the firmware trap table shouldn't be used to handle our interrupts. |
||
---|---|---|
.. | ||
_align.h | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
asi.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bus_common.h | ||
bus_dma.h | ||
bus_private.h | ||
bus.h | ||
cache.h | ||
ccr.h | ||
clock.h | ||
cmt.h | ||
cpu.h | ||
cpufunc.h | ||
db_machdep.h | ||
dcr.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
fireplane.h | ||
float.h | ||
floatingpoint.h | ||
fp.h | ||
frame.h | ||
fsr.h | ||
gdb_machdep.h | ||
idprom.h | ||
ieee.h | ||
ieeefp.h | ||
in_cksum.h | ||
instr.h | ||
intr_machdep.h | ||
iommureg.h | ||
iommuvar.h | ||
jbus.h | ||
kdb.h | ||
kerneldump.h | ||
ktr.h | ||
limits.h | ||
lsu.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
mutex.h | ||
nexusvar.h | ||
ofw_machdep.h | ||
ofw_mem.h | ||
ofw_nexus.h | ||
param.h | ||
pcb.h | ||
pcpu.h | ||
pmap.h | ||
pmc_mdep.h | ||
proc.h | ||
profile.h | ||
pstate.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
sc_machdep.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
stack.h | ||
stdarg.h | ||
sysarch.h | ||
tick.h | ||
tlb.h | ||
trap.h | ||
tsb.h | ||
tstate.h | ||
tte.h | ||
ucontext.h | ||
upa.h | ||
utrap.h | ||
varargs.h | ||
ver.h | ||
vm.h | ||
vmparam.h | ||
watch.h | ||
wstate.h |