Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2002 11:26:44 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: RE: Int 0x15 and VM86 question
Message-ID:  <200211081926.gA8JQiF8003202@apollo.backplane.com>
References:   <XFMail.20021108114052.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:
:On 08-Nov-2002 Matthew Dillon wrote:
:>     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!
:
:I think we use a different IDT for vm86 mode that is basically a
:duplicate (if not the original) of the BIOS IDT.
:
:-- 
:
:John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
:"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

...

:The old locore is saved, and restored into the vm86 environment
:for the purposes of permitting the call.
:
:If we were really clever, we would use the IDT gate to thunk
:much of the BIOS functionality back into the host OS.
:
:-- Terry
:
    
    I figure it has to be something of that nature, but I can't find
    *WHERE* the old IDT vector is saved or where it is being loaded
    for the VM86 code.  I thought maybe the entries in the old IDT
    vector were being copied to the new one, but the only code I see
    that does anything like that is code in locore.s that copies the debug
    vectors from the bootstrap gdt and idt.  I see nothing that copies
    int 0x15.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

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?200211081926.gA8JQiF8003202>