Re: [iPAQ] SA questions

From: Dirk van Hennekeler <hennekel.a.t.ozy.dec.com>
Date: Thu Aug 31 2000 - 20:18:02 EDT

Hi Mark,

> MARK A CRICHTON wrote:
> I was looking through the osloader code on the handhelds.org site, and
> noticed
> that we're shutting off the MMU from what I would guess to be
> userspace code.
> Looking at the Coprocessor 15 section of the SA-1110, it implies that
> this
> is only doable in a privledged mode.
>
> So, this is probably more for my curiosity, but does WinCE always run
> in a mode
> where I can poke things like this, or is there some bit of code I'm
> missing.
No code is missing, CVS contains the code osloader is built from.

The architecture of Windows CE is such that the drivers aren't run in
kernel mode. That is, there is a concept of a Exception Handler,
Interrupt Support Routine (ISR), Interrupt Support Handler (ISH), and a
Interrupt Service Thread (IST). The Exception Handler, ISR and ISH all
run in the kernel while the IST is a user-level (normal) thread that can
be pre-empted and scheduled like any other thread (the IST needs to be
registered with the ISH when the driver is loaded).
When a hardware interrupt occurs the Exception Handler is executed and
disables all interrupts. The appropriate ISR is called. The ISR returns
a logical (read arbitary) interrupt ID to the ISH. The ISH re-enables
all interrupts except the one it is handling and then signals the IST to
begin processing. The IST does it's processing and calls a special
function to indicate that it has finished servicing the interrupt.
Finally, the ISH re-enables the interrupt it was processing.

My understanding is that since the IST is run as a user-level thread the
processor needs to be in a privledged mode (or at least allowed to get
into a privledged mode in some cases) so that it can play with some of
the hardware. I would have thought, like you, that the use of the
various processor modes would have helped crack down on rogue user-level
applications...but hey I'm not complaining.

Hope that helps.

Regards,
Dirk
Received on Thu Aug 31 17:22:27 2000

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:41 EDT