Date: Mon, 15 Sep 2008 15:59:22 -0700 From: "Peter Wemm" <peter@wemm.org> To: pfgshield-freebsd@yahoo.com Cc: Xin LI <delphij@delphij.net>, freebsd-current@freebsd.org, Oliver Fromme <olli@fromme.com>, Jung-uk Kim <jkim@freebsd.org> Subject: Re: Why VESA and DPMS are available only for i386? Message-ID: <e7db6d980809151559k5a464fe3xc847cf115d08b7a6@mail.gmail.com> In-Reply-To: <179579.54770.qm@web32701.mail.mud.yahoo.com> References: <179579.54770.qm@web32701.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 15, 2008 at 1:43 PM, Pedro Giffuni <pfgshield-freebsd@yahoo.com> wrote: > On Mon, Sep 15, 2008 at 1:32 PM, Jung-uk Kim <jkim@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: >> > > FWIW, > > 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@wemm.org; peter@FreeBSD.org; peter@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e7db6d980809151559k5a464fe3xc847cf115d08b7a6>