From owner-freebsd-arch Wed Jan 22 22:30:49 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F4E337B401 for ; Wed, 22 Jan 2003 22:30:48 -0800 (PST) Received: from cirb503493.alcatel.com.au (c18609.belrs1.nsw.optusnet.com.au [210.49.80.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8E6F43EB2 for ; Wed, 22 Jan 2003 22:30:46 -0800 (PST) (envelope-from peterjeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.5/8.12.5) with ESMTP id h0N6UgLZ016296; Thu, 23 Jan 2003 17:30:42 +1100 (EST) (envelope-from jeremyp@cirb503493.alcatel.com.au) Received: (from jeremyp@localhost) by cirb503493.alcatel.com.au (8.12.6/8.12.5/Submit) id h0N6UeRo016295; Thu, 23 Jan 2003 17:30:40 +1100 (EST) Date: Thu, 23 Jan 2003 17:30:40 +1100 From: Peter Jeremy To: Nicolas Souchu Cc: arch@FreeBSD.ORG Subject: Re: the mythical syscons redesign document ( was Re: Porting wscons ) Message-ID: <20030123063040.GA16266@cirb503493.alcatel.com.au> References: <20030122010246.52789.qmail@web13404.mail.yahoo.com> <1043236066.28124.6.camel@builder02.qubesoft.com> <20030122223626.B8449@armor.fastether> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030122223626.B8449@armor.fastether> User-Agent: Mutt/1.4i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 22, 2003 at 10:36:26PM +0100, Nicolas Souchu wrote: >On Wed, Jan 22, 2003 at 11:47:46AM +0000, Doug Rabson wrote: >> The main sticking point for this stuff is that console is needed before >> the device tree is probed. > >The approach of KGI is to provide a very basic/minimal driver for console boot >that can be overlaped later by fully probed graphic board drivers. This is >somehow how VGA adapter is organized, with the video_switch used immediatly >and later the vga_isa.c glue-code for newbus full attachement. I think you've missed the point of Doug's quoted comment. During the system boot, the kernel determines all the attached devices by starting with a hardware-dependent list of known busses and then working through all the busses looking for devices and bridges to other busses. When all this is finished, each attached device is known by an address within a parent bus. All the newbus I/O functions require this logical descriptor - amongst other things, it specifies how to interpret the address and actually perform physical I/O to the hardware. The console devices represent a special case: The address(es) of the console are either implicitly hard-wired (eg a VGA device lives at specific I/O addresses on the [primary] ISA bus) or passed to the kernel by the firmware (eg Alpha SRM) as a physical address (eg bus, slot, address). The problem is that: 1) you can't portably perform I/O via the physical address 2) you can't translate the physical address into a logical descriptor until the device tree is probed 3) you need to be able to perform console writes (at least) before the device tree is probed. The existing console code gets around this by being excessively chummy with the hardware (and I gather KGI works the same way). The downside is that this is very non-portable - you need separate low-level console code for each architecture and for each different possible console device. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message