From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 19 19:43:44 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D90E716A41B for ; Tue, 19 Feb 2008 19:43:44 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 51EE513C459 for ; Tue, 19 Feb 2008 19:43:44 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m1JJheRC044357; Tue, 19 Feb 2008 20:43:42 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m1JJhdrJ044356; Tue, 19 Feb 2008 20:43:39 +0100 (CET) (envelope-from olli) Date: Tue, 19 Feb 2008 20:43:39 +0100 (CET) Message-Id: <200802191943.m1JJhdrJ044356@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 19 Feb 2008 20:43:43 +0100 (CET) X-Mailman-Approved-At: Tue, 19 Feb 2008 19:51:49 +0000 Cc: Subject: /boot/loader graphics support & extensibility X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 19:43:45 -0000 Hi everyone, I'm currently working on adding graphics support to the boot loader. At the moment only the standard VGA mode 640 x 480 at 4 bit depth (16 colors) is supported, but support for other modes can be added in the future. Only i386 and amd64 machines with VGA BIOS are supported. Here's a screen shot of my work in progress: http://www.secnetix.de/olli/FreeBSD/vloader/screenshot.png It will not replace the current text menu ("beastie.4th"), so you can still use it on your Hercules monochrome or CGA machine or with serial console, of course. I need a little help with a few design decisions regarding the implementation. First, I'm not sure if and how the infrastructure of the existing code should be used to allow future support for other architectures or other kind of hardware. This is a list of things that comes to mind: (a) Support for i386/amd64 machines that have VGA hard- ware but no VGA BIOS (this is different from the system BIOS!). Is there a sufficiently large number of such systems that it would be desirable to support them? (b) Support for non-i386/amd64 machines that have VGA hardware (ia64, powerpc, ...). (c) Support for non-VGA graphics hardware (any platform). (d) Did I forget anything? Personally I won't be able to implement any of the above because I only have standard i386/amd64 hardware. But if someone else wants to implement it, my code certainly shouldn't get in the way. Currently my code is simply compiled conditionally, depending on make(1) variables (${MACHINE_ARCH}), so it is only included for i386 and amd64. So, basically, if multiple platforms are supported, the source file with the graphics support functions would be selected based on ${MACHINE_ARCH}. Would that be sufficient? I have looked at the archsw, but I'm not sure if that gives any additional benefit in this case. For a different architecture you ahve to compile a different binary anyway, so it seems that it is sufficient to make the decision at build time, so the additional indirection of the archsw isn't required. Please someone correct me if I'm wrong. By the way, please have a look at the current graphics.h file which defines the interface between the implementation of the graphics functions and FICL: http://perforce.freebsd.org/fileViewer.cgi?FSPC=//depot/user/olli/boot/ficl/i386/graphics.h By the way, the Forth code that produced the above screen shot only used the PCX functions to load the background image, and the text functions to print the menu. Comments appreciated. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I started using PostgreSQL around a month ago, and the feeling is similar to the switch from Linux to FreeBSD in '96 -- 'wow!'." -- Oddbjorn Steffensen