Subject: Re: Access to m68k SR from userland?
To: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mac68k
Date: 06/12/1996 13:59:46
On Wed, 12 Jun 1996 12:20:20 +0100
saw@sun0.urz.uni-heidelberg.de (Hauke Fath) wrote:
> is it possible to move the CPU to supervisor mode and/or access the
> interrupt mask in reg 'SR' from userland code? If so, how?
Well, you can't really do that. If I recall correctly, attempting to
modify the SR from non-supervisor mode will cause a priviledge violation
trap. I think even _reading_ the SR will cause a trap in user mode.
> I am trying polled data transfers on the SWIM and have to block all
> interrupts while reading.
If that's the case, you really need a kernel device driver which provides
the semantics you need.
----save the ancient forests - http://www.bayarea.net/~thorpej/forest/----
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939