Ramon van Handel <[EMAIL PROTECTED]> wrote:
> Ulrich Weigand wrote:
> > So we'll let the processor do the check whether the interrupt originated
> > in hardware or software:  if the interrupt gate to our handler has a
> > DPL of 0, software interrupts will trap out to the GPF handler, but
> > hardware interrupts will come through to the interrupt handler.
> 
> Yeah that's a good solution :)

Yup.  It should be noted, though, that Kevin came up with it first ;-)

> > Unfortunately, in the typical case (DOS/Windows under Linux), nearly
> > all the interesting interrupts (BIOS: 0x1x, DOS: 0x2x) do collide with
> > hardware vectors, so we'll have to trap out in the large majority of cases
> > anyway.  So, for simplicity, we might as well use that method always ...
> 
> I don't know about windows, but DOS works in real mode :)

Indeed.  Still, the only software interrupts used in Windows *are* the
BIOS and DOS interrupts (of course they don't really call into BIOS/DOS,
but via a protected mode vector into the Windows KERNEL, but they 
still use the same interrupt number, probably to fool programmers 
into thinking they really call DOS :-/).

> We'll probably want to run that in a v86 session, and switch out of
> it when it switches to protected mode.  That solves that problem
> I think...  Why virtualise real mode when the processor can do a
> good job at that already ?

Now, how to virtualize real/v86 mode is a whole other question ;-)
I really think we should get protected mode working first ...
B.t.w., in v86 mode, every software interrupt drops back into 
protected mode as well (unless you use this semi-documented 
'extended v86 mode' ...)

Bye,
Ulrich

Reply via email to