On 09/26/07 18:01, Haris wrote:
Let me clarify something about nucleus context and traps that are short and 
don't need C code.
> Such traps are limited on what they use. They just use the alternate globals 
in SPARC and cannot
> use register windows (otherwise implies C code/stack). Therefore there is no 
switch of OTHERWIN for such traps.

The architecture defines your context when you trap - eg switch to 
alternate/interrupt/mmu globals
etc.  You're running outside of the usual ABI with no stack available as you 
say, so you've
got to work very carefully.  Technically you can do most anything you like, as 
long
as you take responsibility for the side-effects.  So you can use registers from 
the
window you trapped in, provided you find a place to save them for restore once
you're done, you could get a new register window with a SAVE for 0 stack
provided you arrange where to spill any windows etc.  But in most/all
cases the nucleus handling aims to be short and sweet with as little
complexity as possible so I don't think any register windows are
obtained by current handlers, with the exception being sys_trap/user_trap
which is the nucleus code that takes us back to TL0 from TL > 0 - it
buys a place to stash outputs etc for example by creeping down the
exising kernel stack etc.

Gavin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to