From owner-freebsd-arch Thu Jan 23 15:44:36 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 3F99837B405 for ; Thu, 23 Jan 2003 15:44:35 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BE7843F13 for ; Thu, 23 Jan 2003 15:44:34 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h0NNiVMW036739; Thu, 23 Jan 2003 15:44:31 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id h0NNiVwR000658; Thu, 23 Jan 2003 15:44:31 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id h0NNiVnT000657; Thu, 23 Jan 2003 15:44:31 -0800 (PST) Date: Thu, 23 Jan 2003 15:44:31 -0800 From: Marcel Moolenaar To: Rodolphe Ortalo Cc: Nicolas Souchu , arch@freebsd.org Subject: Re: the mythical syscons redesign document ( was Re: Porting wscons ) Message-ID: <20030123234431.GB555@athlon.pn.xcllnt.net> References: <20030123071232.GA80532@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i 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 Thu, Jan 23, 2003 at 11:53:55PM +0100, Rodolphe Ortalo wrote: > > > The approach I took on the ia64 branch is to have a xxx_machdep.c in > > sys/$ARCH/$ARCH for every device xxx that can be a low level console. > > In the file xxx_machdep.c you do whatever MD specific thing you need > > to do to construct a tag and handle for use by the MI code for device > > xxx. When bus enumeration happens, you compare the tag and handle of > > the low-level console with the tag and handle of the device that's > > being probed if you want to know if the device that's being probed is > > the console or not (you don't want to reset the device if it's the > > console for example). > > Why do you want to take so much care wrt the initial boot device? > If you want to preserve the console display across the switch to a new > display driver isn't it possible to do this at a higher level? E.g.: save > the console output somewhere, close() the boot driver, open the new > driver(), set an adequate text (or text-on-graphic) mode, restore the > console output, and then proceed. > Are there other reasons that motivated a more careful approach? Not all low-level consoles are (graphical) display adapters. If the low-level console is a serial interface, you need to preserve the communication settings. In general though I like to take the approach that the low-level console has done some work, possibly non-trivial, to get the state/information it currently has and it seems wasteful to destroy that state simply because we run into that device during bus enumeration and we then have the resources available to use the device to its fullest potential, but end up not doing that. So, unless there's a good reason not to, preserving state can only proof beneficial. I realize it's mostly subjective. I think you should have the mechanism to allow preserving state, so that you have the freedom to make use of it or not... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message