Subject: Re: Access to m68k SR from userland?
To: None <port-mac68k@NetBSD.ORG>
From: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
List: port-mac68k
Date: 06/13/1996 01:36:46
At 13:59 Uhr 12.06.1996, Jason Thorpe wrote:
>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.

Given all that, I think I better stay with MacOS for a while...



	hauke

---
"It's never straight up and down"     (DEVO)