From owner-freebsd-current Fri Jul 5 20: 3:11 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F5B337B400 for ; Fri, 5 Jul 2002 20:03:07 -0700 (PDT) Received: from web20905.mail.yahoo.com (web20905.mail.yahoo.com [216.136.226.227]) by mx1.FreeBSD.org (Postfix) with SMTP id D145B43E31 for ; Fri, 5 Jul 2002 20:03:06 -0700 (PDT) (envelope-from bsddiy@yahoo.com) Message-ID: <20020706030306.96129.qmail@web20905.mail.yahoo.com> Received: from [218.108.150.59] by web20905.mail.yahoo.com via HTTP; Fri, 05 Jul 2002 20:03:06 PDT Date: Fri, 5 Jul 2002 20:03:06 -0700 (PDT) From: David Xu Subject: Re: i386 trap code To: Julian Elischer Cc: Peter Wemm , FreeBSD current users MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@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: "Julian Elischer" To: "Peter Wemm" Cc: "FreeBSD current users" Sent: Saturday, July 06, 2002 8:43 AM Subject: i386 trap code > > Looking at i386/exception.s > one sees: > ################################### > .globl alltraps > .type alltraps,@function > alltraps: > pushal > pushl %ds > pushl %es > pushl %fs > alltraps_with_regs_pushed: > mov $KDSEL,%ax > mov %ax,%ds > mov %ax,%es > mov $KPSEL,%ax > mov %ax,%fs > FAKE_MCOUNT(13*4(%esp)) > calltrap: > FAKE_MCOUNT(btrap) /* init "from" btrap -> calltrap > */ > call trap > > /* > * Return via doreti to handle ASTs. > */ > MEXITCOUNT > jmp doreti > ####################################### > > but one has to look in isa/ipl.s to find: > ######################################## > SUPERALIGN_TEXT > .type doreti,@function > doreti: > FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ > doreti_next: > /* > * Check if ASTs can be handled now. PSL_VM must be checked first > * since segment registers only have an RPL in non-VM86 mode. > */ > testl $PSL_VM,TF_EFLAGS(%esp) /* are we in vm86 mode? */ > jz doreti_notvm86 > cmpl $1,in_vm86call /* are we in a vm86 call? */ sorry for a bit OT, does anyone see this in_vm86call crazy global variable? it prevents two CPUs to trap into VM86 model :( if you have interest in fixing this problem, please have a look at PR : http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/38223 I have also fixed the problem that VM86 call is preempted by interrupt threads and causes system crash. newest patch can always be gotten from : http://opensource.zjonline.com.cn/freebsd/vm86patch.tgz -David Xu __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message