----- Original Message ----- From: "Julian Elischer" <[EMAIL PROTECTED]> To: "Peter Wemm" <[EMAIL PROTECTED]> Cc: "FreeBSD current users" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message