Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2002 16:45:16 -0800
From:      "Luoqi Chen" <lchen@briontech.com>
To:        "Matthew Dillon" <dillon@apollo.backplane.com>, <hackers@FreeBSD.ORG>
Subject:   RE: Int 0x15 and VM86 question
Message-ID:  <AHEKICEOIHLOGINAFIINAEGFCAAA.lchen@briontech.com>
In-Reply-To: <200211081007.gA8A7fwx000751@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From: owner-freebsd-hackers@FreeBSD.ORG
> [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Matthew Dillon
> Sent: Friday, November 08, 2002 2:08 AM
> To: hackers@FreeBSD.ORG
> Subject: Int 0x15 and VM86 question
> 
> 
>     I've been pulling my hair out all night trying to figure out how
>     the hell the VM86 code is able to issue an int 0x15 to the BIOS.
>     I can't find where it gets the interrupt descriptor table entry
>     for int 0x15.  My assumption is that it copies it from the idt
>     supplied by the BIOS but I don't see where.  As far as I can tell
>     FreeBSD loads a pristine IDT that does not have a record for 
>     int 0x15.  So how can the VM86 code issue an int 0x15 and have it
>     find the BIOS?
> 
>     If anyone knows the answer to this, I'm all ears!
> 
> 						-Matt
> 
> 
When iopl is less than 3 (that's what our kernel is running at), the
soft interrupts in vm86 are not dispatched through the normal protective
mode idt vector. Depending on your vme setting and interrupt redirection
bitmap, it either triggers a general protection fault (vme clear and redir
bit set), or directly jumps to vector at low memory as in real mode (vme
set and redir bit clr). IIRC vme is available for P5 or later processors.
So for you it most likely is the direct jump. The first page of physical
memory (which contains the BIOS vectors) is not touched by the kernel,
and is mapped at address 0 in the vm86 process space.

Does this answer your question, Matt? It has been quite a while since
I looked at the stuff, some of the descriptions might not be accurate.

-lq

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AHEKICEOIHLOGINAFIINAEGFCAAA.lchen>