From owner-freebsd-sparc64@FreeBSD.ORG Tue Mar 16 11:40:48 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E109316A4CE for ; Tue, 16 Mar 2004 11:40:48 -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 9688343D53 for ; Tue, 16 Mar 2004 11:40:48 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost [127.0.0.1]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i2GJefY1048518; Tue, 16 Mar 2004 11:40:41 -0800 (PST) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.12.11/8.12.11/Submit) id i2GJefbo048517; Tue, 16 Mar 2004 11:40:41 -0800 (PST) (envelope-from marcel) Date: Tue, 16 Mar 2004 11:40:41 -0800 From: Marcel Moolenaar To: Ken Smith Message-ID: <20040316194041.GA48477@ns1.xcllnt.net> References: <20040316055650.GA15182@electra.cse.Buffalo.EDU> <20040316064541.GA12961@dhcp01.pn.xcllnt.net> <20040316070004.GA16684@electra.cse.Buffalo.EDU> <20040316070937.GA13045@dhcp01.pn.xcllnt.net> <20040316073406.GC17054@electra.cse.Buffalo.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040316073406.GC17054@electra.cse.Buffalo.EDU> User-Agent: Mutt/1.5.5.1i cc: freebsd-sparc64@freebsd.org Subject: Re: Console patch part II... X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 19:40:49 -0000 On Tue, Mar 16, 2004 at 02:34:06AM -0500, Ken Smith wrote: > On Mon, Mar 15, 2004 at 11:09:37PM -0800, Marcel Moolenaar wrote: > > > You need to fix the code to call cninit() soon enough that you > > never need to panic before it? > > Expanding slightly... cninit() currently is before the first printf()'s > or calls to panic(). But it can't stay there, at least some of the > potential consoles (e.g. Kris's Creator-3D) wind up calling make_dev() > and that was causing his panic's. Fix syscons. > Alpha had this same problem and the end solution for alpha is more or > less identical to what I'm proposing with the kludge hack. I accepted the hack on alpha simply because there's no developer base to put in the work to actually fix the problem. Now that sparc64 appears to suffer from the same, I'm passionately of the opinion that we cannot kluge our way out of this. > - [ This is a new thought... ] Restructure all the potential > console drivers to be like ofw_console is. ofw_console doesn't > call make_dev() in its attach routine. Instead it uses a > sysinit() to handle the make_dev() later in the boot sequence > instead of doing at attach time. Look at uart(4). It does everything right and consequently does not force us to delay cninit() or kdb_init() for that matter. With uart(4), you do not need ofw_console(4) most of the time. Your problem is therefore not that cninit() is called to soon. Your problem is that syscons is broken. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net