--- David Schultz <[EMAIL PROTECTED]> wrote:
> Thus spake David Xu <[EMAIL PROTECTED]>:
> > 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

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to