*BSD News Article 30138


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:2436 comp.os.linux.misc:14221
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!news.uoknor.edu!ns1.nodak.edu!netnews.nwnet.net!reuter.cse.ogi.edu!cs.uoregon.edu!sgiblab!uhog.mit.edu!europa.eng.gtefsd.com!gatech!prism!prism!not-for-mail
From: gt8134b@prism.gatech.edu (Robert Sanders)
Newsgroups: comp.os.386bsd.misc,comp.os.linux.misc
Subject: Re: Impressions: FreeBSD vs Linux
Date: 29 Apr 1994 01:42:10 -0400
Organization: Georgia Institute of Technology
Lines: 54
Message-ID: <2pq6ni$3if@acme.gatech.edu>
References: <2pfjmi$3j9@u.cc.utah.edu> <2ph0ut$2nc@acme.gatech.edu> <1994Apr25.220509.11893@kf8nh.wariat.org> <2ppvde$4ch@u.cc.utah.edu>
NNTP-Posting-Host: localhost.gatech.edu

terry@cs.weber.edu (Terry Lambert) writes:

>In article <1994Apr25.220509.11893@kf8nh.wariat.org> bsa@kf8nh.wariat.org (Brandon S. Allbery) writes:

>[ ... using dosemu vs using vm86() perform BIOS-based video card setup ... ]

>]Your way would work with unmodified XFree86; just run the BIOS setup as the
>]clock-setting program.  His way requires changes to XFree86 which the XFree86
>]developers have *already* refused to make...

>You apparently misunderstand what I have proposed.

There's a lot of misunderstanding going around.  People seem to have 
misunderstood what I proposed as well: I did not suggest using a DOS emulator
I just explained why Amancio's idea of using the VGA BIOS wasn't such a
bad idea.  Really.  Go back and read it.

>You implement a vm86() call in the BSD kernel.
>This is easier than implementing a DOS emulator.
>You write a BSD clock set program using it.

Aside from the unnecessary BSD-centrism, this is a bit simplistic.  I
hate to inject unwanted facts into an otherwise perfect USENET discussion,
but it simply isn't that easy.  Using V86 mode to call the SVGA BIOS isn't
as simple as simply setting the VM bit in the EFLAGS register, loading
the register with the appropriate parameters, and executing an int 0x10.

As I have explained to others, I have come across at least two brands of
VGA BIOSs which use the PIC and PIT chips.  So, your kernel vm86()
syscall must now do some fairly difficult hardware emulation.  That's
already too much bloat for my taste, but tastes differ.  This sort
of virtual machine, IMHO, should be done in user space.  For those
lucky enough never to have come across dosemu, it isn't really much
of a DOS emulator at all: it's a V86 virtual machine.  There are some
DOS-specific bits in there, as well as some general BIOS emulation, but
much of it is devoted to simply being a virtual 8086 PC.  And that's
what you need to use the SVGA BIOS.

Furthermore, VGA BIOSs assume the standard DOS/PC memory layout, so
you need some way to set up a DOS-like memory map for V86 mode.
Maybe I'm guessing wrong, but I don't know why that would be any easier
in the BSD kernel than it would be in Linux's.  

That's another reason why I suggest it should be done in user space.
Of course that's the approach I took with dosemu.  The SVGA BIOS works
just fine for card initialization, mode setting, etc. under dosemu.
If anyone else has any similar success stories with different approaches,
I'd be glad to hear them.

-- 
 _g,  '96 --->>>>>>>>>>   gt8134b@prism.gatech.edu  <<<<<<<<<---  CompSci  ,g_
W@@@W__        |-\      ^        | disclaimer:  <---> "Bow before ZOD!" __W@@@W
W@@@@**~~~'  ro|-<ert s/_\ nders |   who am I???  ^  from Superman  '~~~**@@@@W
`*MV' hi,ocie! |-/ad! /   \ss!!  | ooga ooga!!    |    II (cool)!         `VW*'