[Prev][Next][Index][Thread]

Re: x86 interrupt handling



> From: "Jonathan S. Shapiro" <shap@eros-os.org>
> To: <oskit-users@fast.cs.utah.edu>
> Subject: x86 interrupt handling
> Date: Sun, 26 Nov 2000 01:44:43 -0500
> 
> I'm also a little puzzled about the interrupt handling logic. Here again =
> I am very sure that there is a good reason for the handling and that I =
> have missed it.
> 
> It appears that interrupts are programmed to manifest as exception =
> vectors 0x20..0x27 (master) and 0x28..0x2f (slave). This is good, as it =
> ensures that the trap vectors are disjoint. Under DOS, in contrast, it =
> is hard to distinguish interrupts from exceptions, and in some cases =
> this proves unfortunate.
> 
> Given the uniform numbering, the absence of a unified trap handler has =
> me a bit puzzled. The interrupt entry points clearly need to disable the =
> PICs, but this can be done according to the same design logic that =
> differentiates exceptions that push an error code from those that don't =
> -- it's a third (primary) and fourth (secondary) case. Once the =
> interrupt vector numbers are recoded, there is no real reason why they =
> shouldn't just go through the standard trap handler with exception codes =
> in the range 0x20..0x2f. The only difference that I can see in the two =
> handlers is the use of different annotation tables. Unless I have missed =
> something, the separation of annotation tables appears to be a side =
> effect of the separation of the trap/interrupt handlers rather than an =
> intended aspect of the design.
> 
> I'm surely missing something here, and I'ld appreciate a hint as to what =
> it might be.
> 

No, I don't think you are missing anything, I suspect they could be
unified.  I am guessing that it was just the evolution of the code that
led them to be separate (caveat: I'm not an OSKit historian either :-)

> While I'm thinking about it, how heavily do the various COM objects rely =
> on the annotation mechanism?
> 

I do not believe that any OSKit components use the annotation mechanism.
There is an example that uses it, and we used it in our Fluke kernel, but
that is about it.