From owner-cvs-src@FreeBSD.ORG Mon May 23 00:11:58 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21A7F16A41C; Mon, 23 May 2005 00:11:58 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 773E743D54; Mon, 23 May 2005 00:11:57 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.10/ZEIST.DE) with ESMTP id j4N0BtrY003467; Mon, 23 May 2005 02:11:55 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j4N0BoIa003466; Mon, 23 May 2005 02:11:50 +0200 (CEST) (envelope-from marius) Date: Mon, 23 May 2005 02:11:50 +0200 From: Marius Strobl To: Marcel Moolenaar Message-ID: <20050523021150.F75942@newtrinity.zeist.de> References: <200505212017.j4LKH1cM075616@repoman.freebsd.org> <20050522201313.D75942@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from marcel@xcllnt.net on Sun, May 22, 2005 at 01:11:07PM -0700 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-4; AVE: 6.30.0.12; VDF: 6.30.0.192; host: newtrinity.zeist.de) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sparc64/sparc64 ofw_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2005 00:11:58 -0000 On Sun, May 22, 2005 at 01:11:07PM -0700, Marcel Moolenaar wrote: > On May 22, 2005, at 11:13 AM, Marius Strobl wrote: > > > With the approach uart_cpu_getdev_keyboard() currently takes one > > can't tell nodes of SCCs/UARTs serving as keyboard controllers and > > those of PS/2 keyboards apart without also looking at the 'name' > > property. > > Well, we may improve or actually implement the probe functions. That > way we poke the hardware to see if it behaves as expected. The probe > for ns8250-class UARTs is implemented. I don't know if it's good > enough in its current form or whether it's only good to see if > something, anything, is out there. The probe functions for the SAB > and ZS are not implemented yet. > That should also work but it basically accomplishes the same as checking the 'name' property just with more code. With a different approach I meant something not involving traversing the OFW device tree looking for viable targets but something similar to how the sparc64 uart_cpu_getdev_console() works. E.g. something like checking whether the 'stdin' instance uses the 'sun-keyboard' package. Obviously that would however only work when the keyboard is the chosen input. I think to what extent this really makes a difference can't be decided until trying to get RS232 keyboards that were plugged in after the kernel has booted to work. E.g. the simplest approach would be to check whether 'stdin' is a RS232 keyboard for getting the low-level console to work. Later on during device configuration one can simply check whether a SCC/UART has a 'keyboard' property which would also cover potential keyboard ports. This however might not fit the system devices idea and abstraction of uart(4), making again a uart_cpu_getdev_console() that also identifies potential usage as keyboard port necessary. Marius