Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2002 05:15:26 -0700 (PDT)
From:      David Xu <bsddiy@yahoo.com>
To:        David Schultz <dschultz@uclink.Berkeley.EDU>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, current@FreeBSD.ORG
Subject:   Re: i386 trap code
Message-ID:  <20020706121526.65635.qmail@web20903.mail.yahoo.com>
In-Reply-To: <20020706092835.GB709@HAL9000.wox.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--- David Schultz <dschultz@uclink.Berkeley.EDU> wrote:
> Thus spake David Xu <bsddiy@yahoo.com>:
> > I don't know if FreeBSD can run DOS program, if it can, then one CPU
> running
> > DOS program can confuse another CPU which is running BIOS code because of
> this
> > global flags. 
> > 
> > my current patch does not remove vm86_lock, it is still there, my orginal
> > purpose is while CPU in VM86 mode, when hardware interrupt occurs, still
> > allow interrupt thread to run.
> 
> FreeBSD can run DOS programs, but it does so by emulating all of
> the common DOS and BIOS calls.  You can't safely give untrusted
> userland programs direct access to the BIOS, and even if you
> could, the BIOS calls wouldn't work as the DOS programs expected
> them to.  See doscmd(1).

I don't know how DOS emulating program works, but if it let DOS
program run in VM86 mode, the in_vm86call global flag can prevent
one CPU to run VM86 BIOS call and another CPU run DOS VM86 code, 
because it can not distinct which CPU the kernel is calling BIOS
and which CPU is running VM86 DOS code, under SMP this is a problem.
for exapmle, vesa module running on first CPU is calling VM86 BIOS,
and second CPU is running DOS program, the DOS program maybe simply
executes a privilege instruction to trigger trap, and the CPU
will see itself calling VM86 BIOS, but it shouldn't.

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?20020706121526.65635.qmail>