<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/sparc64/include/wstate.h, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2010-04-01T15:17:52Z</updated>
<entry>
<title>MFC: r205409</title>
<updated>2010-04-01T15:17:52Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-04-01T15:17:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d986b9eba5f3650a11fc43615a79ce0422b043fb'/>
<id>urn:sha1:d986b9eba5f3650a11fc43615a79ce0422b043fb</id>
<content type='text'>
- 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.
</content>
</entry>
<entry>
<title>Implement a nested window state.  This avoids attempting to spill a user</title>
<updated>2002-02-25T18:37:17Z</updated>
<author>
<name>Jake Burkholder</name>
<email>jake@FreeBSD.org</email>
</author>
<published>2002-02-25T18:37:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4c4a1a19e83205b59589fd23ff083292eda2e065'/>
<id>urn:sha1:4c4a1a19e83205b59589fd23ff083292eda2e065</id>
<content type='text'>
window to the user stack while in a nested kernel trap.  We do this for
entry to the kernel from user mode, but if we get an interrupt in kernel
mode while there are still user windows in the cpu, and we attempt to spill
to the user stack, we may take too many nested traps and overflow the trap
stack, causing a red state exception.  This is needed by upcoming changes
to allow the user tsb to not be locked in the tlb.

Reviewed by:	tmm
</content>
</entry>
<entry>
<title>Rename definitions to better match the hardware wstate fields.</title>
<updated>2001-12-29T07:12:30Z</updated>
<author>
<name>Jake Burkholder</name>
<email>jake@FreeBSD.org</email>
</author>
<published>2001-12-29T07:12:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=eddb1f8617eb31dbef5b461dbc989a27453834d0'/>
<id>urn:sha1:eddb1f8617eb31dbef5b461dbc989a27453834d0</id>
<content type='text'>
Don't include WSTATE_TRANSITION in WSTATE_NORMAL_MASK.
</content>
</entry>
<entry>
<title>Add a definition for normal kernel window state.</title>
<updated>2001-10-20T17:08:33Z</updated>
<author>
<name>Jake Burkholder</name>
<email>jake@FreeBSD.org</email>
</author>
<published>2001-10-20T17:08:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e47e7481dbf8bad8518f9f6be59efebabdff7815'/>
<id>urn:sha1:e47e7481dbf8bad8518f9f6be59efebabdff7815</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement a slightly different window spill/fill algorithm for dealing</title>
<updated>2001-09-03T23:10:45Z</updated>
<author>
<name>Jake Burkholder</name>
<email>jake@FreeBSD.org</email>
</author>
<published>2001-09-03T23:10:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=880a354a4ad66e264413c7f2fe9f276cfa2acdba'/>
<id>urn:sha1:880a354a4ad66e264413c7f2fe9f276cfa2acdba</id>
<content type='text'>
with user windows in kernel mode.  We split the windows using %otherwin,
but instead of spilling user window directly to the pcb, we attempt to
spill to user space.  If this fails because a stack page is not resident
(or the stack is smashed), the fault handler at tl 2 will detect the
situation and resume at tl 1 again where recovery code can spill to the
pcb.  Any windows that have been saved to the pcb will be copied out to
the user stack on return from kernel mode.

Add a first stab at 32 bit window handling.  This uses much of the same
recovery code as above because the alignment of the stack pointer is used
to detect 32 bit code.  Attempting to spill a 32 bit window to a 64 bit
stack, or vice versa, will cause an alignment fault.  The recovery code
then changes the window state to vector to a 32 bit spill/fill handler
and retries the faulting instruction.

Add ktr traces in useful places during trap processing.

Adjust comments to reflect new code and add many more.
</content>
</entry>
</feed>
