From owner-freebsd-hackers Fri Nov 8 16:42:49 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 7468437B401 for ; Fri, 8 Nov 2002 16:42:48 -0800 (PST) Received: from bricore.com (adsl-64-169-95-166.dsl.snfc21.pacbell.net [64.169.95.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EF0F43E6E for ; Fri, 8 Nov 2002 16:42:47 -0800 (PST) (envelope-from lchen@briontech.com) Received: from luoqi (luoqi.bricore.com [192.168.1.63]) by bricore.com (8.11.6/8.11.6) with SMTP id gA90gjm69459; Fri, 8 Nov 2002 16:42:45 -0800 (PST) (envelope-from lchen@briontech.com) From: "Luoqi Chen" To: "Matthew Dillon" , Subject: RE: Int 0x15 and VM86 question Date: Fri, 8 Nov 2002 16:45:16 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <200211081007.gA8A7fwx000751@apollo.backplane.com> 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 > -----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