From owner-freebsd-hackers Fri Nov 8 11:26:46 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A4DF37B401; Fri, 8 Nov 2002 11:26:44 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E24443E4A; Fri, 8 Nov 2002 11:26:44 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gA8JQiFC003203; Fri, 8 Nov 2002 11:26:44 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gA8JQiF8003202; Fri, 8 Nov 2002 11:26:44 -0800 (PST) (envelope-from dillon) Date: Fri, 8 Nov 2002 11:26:44 -0800 (PST) From: Matthew Dillon Message-Id: <200211081926.gA8JQiF8003202@apollo.backplane.com> To: John Baldwin Cc: hackers@FreeBSD.ORG Subject: Re: RE: Int 0x15 and VM86 question References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : : :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 <>< 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message