From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 13 07:10:26 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D61E216A4CE for ; Sun, 13 Mar 2005 07:10:26 +0000 (GMT) Received: from nerve.riss-telecom.ru (nerve.riss-telecom.ru [80.66.65.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id B293143D31 for ; Sun, 13 Mar 2005 07:10:25 +0000 (GMT) (envelope-from frol@nerve.riss-telecom.ru) Received: from nerve.riss-telecom.ru (incgji1ewgtv8vaz@localhost [127.0.0.1]) by nerve.riss-telecom.ru (8.13.1/8.13.1) with ESMTP id j2D7B6Fv083784; Sun, 13 Mar 2005 13:11:06 +0600 (NOVT) (envelope-from frol@nerve.riss-telecom.ru) Received: (from frol@localhost) by nerve.riss-telecom.ru (8.13.1/8.13.1/Submit) id j2D7B5vq083783; Sun, 13 Mar 2005 13:11:05 +0600 (NOVT) (envelope-from frol) Date: Sun, 13 Mar 2005 13:11:05 +0600 From: Dmitry Frolov To: Alex Burke Message-ID: <20050313071105.GA83021@nerve.riss-telecom.ru> Mail-Followup-To: Alex Burke , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: RISS-Telecom, JSC X-PGP-Fingerprint: 5232 98E7 596E 21C2 52B5 FCAE 8088 3F87 88BC 27B0 User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: Low level hardware access in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 07:10:26 -0000 * Alex Burke [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 RISS-Telecom Network, Novosibirsk, Russia 66415911@ICQ, +7 3832 NO WA1T, DVF-RIPE