Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2005 13:11:05 +0600
From:      Dmitry Frolov <frolov@riss-telecom.ru>
To:        Alex Burke <alexjeffburke@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Low level hardware access in FreeBSD
Message-ID:  <20050313071105.GA83021@nerve.riss-telecom.ru>
In-Reply-To: <a8b8bb5105031210121791a9d5@mail.gmail.com>
References:  <a8b8bb5105031210121791a9d5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Alex Burke <alexjeffburke@gmail.com> [13.03.2005 00:13]:

> I am just wondering how I can access either BIOS calls, or preferably
> registers under FreeBSD?
> 
> I am trying to write a simple system capable of displaying graphics on
> the screen, and I am pretty sure I can mmap the VGA memory to my
> programs address space.

LRMI library (http://sf.net/projects/lrmi) allows You to
call VGA real mode routines under VM86 mode on i386 processors.

You can also mmap VGA memory into your process space and
call VGA BIOS using an x86 emulator, such as x86emu,
like XFree86 does.

i386_vm86(2) allows You to call VGA interrupt routines.

However all of that requires root privileges.

> However, to be able to output graphics onto the screen I think I need
> to change the state of the VGA registers from text mode (I am guessing
> thats what the console driver uses) to graphical mode (of which i know
> there exist a couple) - but I think that involves programming
> registers and I dont know how to do that under FreeBSD.
> 
> Also, for the FreeBSD console driver to pick the console back up once
> it finished working, would I be required to reset the VGA registers
> back to text mode?

You may want to use VBE to save/restore controller state
and set video modes.

    wbr&w, dmitry.
-- 
Dmitry Frolov <frolov@riss-telecom.ru>
RISS-Telecom Network, Novosibirsk, Russia
66415911@ICQ, +7 3832 NO WA1T, DVF-RIPE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050313071105.GA83021>