Why VESA and DPMS are available only for i386?

Peter Wemm peter at wemm.org
Mon Sep 15 22:59:23 UTC 2008

On Mon, Sep 15, 2008 at 1:43 PM, Pedro Giffuni
<pfgshield-freebsd at yahoo.com> wrote:
> On Mon, Sep 15, 2008 at 1:32 PM, Jung-uk Kim <jkim at freebsd.org> wrote:
> ...
>>> Another way would be to write a 32bit x86 instruction
>>> emulator (similar to what programs like qemu or bochs do),
>>> so you can execute the VESA functions within an emulated
>>> virtual machine that programs the VGA hardware registers.
>>> This isn't exactly trivial either.  Note that there are
>>> already such emulators, but I'm not aware of a BSD-licensed
>>> one that could be included in the FreeBSD kernel without
>>> problems.
>> doscmd(1) had a rudimentary 16-bit CPU emulation:
> I can't find any reference, but according to the Wikipedia, even in long mode AMD64 is able to run 16-bit (or 80286) protected mode applications:
> http://en.wikipedia.org/wiki/AMD64#Operating_modes
> Pedro.

I think you're right.  We probably could implement bios32() and
bios16() calls without too much trouble.  It is vm86() real-mode calls
that we can't do without switching out of long mode.  For that we
could theoretically use libint10 from Xfree86/Xorg.

Our VESA code in i386 is vm86() based.
We use bios16 in APM on i386.
We use bios32 in APM and PCI on i386.

Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell

More information about the freebsd-current mailing list