Date: Fri, 5 Jul 2002 20:01:49 -0700 (PDT) From: David Xu <bsddiy@yahoo.com> To: Julian Elischer <julian@elischer.org> Cc: Peter Wemm <peter@wemm.org>, FreeBSD current users <current@FreeBSD.ORG> Message-ID: <20020706030149.42503.qmail@web20907.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Julian Elischer" <julian@elischer.org> To: "Peter Wemm" <peter@wemm.org> Cc: "FreeBSD current users" <current@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020706030149.42503.qmail>