]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC: r205409
authormarius <marius@FreeBSD.org>
Thu, 1 Apr 2010 15:17:50 +0000 (15:17 +0000)
committermarius <marius@FreeBSD.org>
Thu, 1 Apr 2010 15:17:50 +0000 (15:17 +0000)
commit01c6134995a617d9bd9d0e10d7babc12fd4903e1
treea19e3bb5c3bee3b49a2246e2c3ff7ac348ffc267
parentcdf6f8fb61a9208f79b86a4c99f3524b53b3137c
MFC: r205409

- The firmware of Sun Fire V1280 has a misfeature of setting %wstate to
  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.
sys/sparc64/include/wstate.h
sys/sparc64/sparc64/exception.S
sys/sparc64/sparc64/locore.S
sys/sparc64/sparc64/machdep.c
sys/sparc64/sparc64/support.S