console in 1024x768 mode?

Andrew Reilly andrew-freebsd at
Sun Jul 2 01:57:21 UTC 2006

On Fri, Jun 30, 2006 at 07:02:10PM +1000, Peter Jeremy wrote:
> On Fri, 2006-Jun-30 07:33:51 +0400, Arseny Nasokin wrote:
> >On Fri, Jun 30, 2006 at 07:29:52AM +0400, Arseny Nasokin wrote:
> >> Can it be needed for something else, not only for VESA videomode emulating?
> >
> >yes, it can: binary drivers, such N-Vidia =)
> Building a vm86 emulator that can handle occasional calls to VESA BIOS
> to change screen configuration is relatively easy - efficiency is
> irrelevant and you could adapt a x86 disassembler with minimal effort.
> Building a VM86 emulator that can usefully execute a binary driver -
> especially a performance-critical one like a video driver - is a
> totally different undertaking.

A static trans-code would probably work though.  Since the
operating system functionality and APIs are nominally the same,
you might be able to get some way with an ia32->c, c->amd64 (or
other) translation.  Actually, given the similarity, it would be
even more straightforward to do an ia32->asm->munge->asm->amd64
recompilation.  Only computed branches, if any, would cause a
problem, but that can be cadged with a hash table of valid entry
points...  It would be an interesting project, IMO.

On the other hand, something like the freebsd-ia32-6.0 nvidia
drivers are ia32, not 8086, so it *ought* to be possible to
convince the kernel to run them natively, just the way ia32
binaries can be run now.  Sure, there'd be shims and call gates,
and that'd slow it down a bit, but it *might* work...

I've often thought that it'd be neat to have qemu in the
kernel, (or at least have the kernel know how to run it as an
interpreter in user-land for the appropriately typed binaries)
and be able to just run binaries from all sorts of processor
architectures.  Not terribly useful, but neat :-) I believe
there's a qemu mode that lets individual linux executables (as
opposed to whole operating systems) run that way, but don't know
if that extends to FreeBSD executables, or if Linux has the
necessary exec magic to just run them.



More information about the freebsd-amd64 mailing list