From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 8 11:28:50 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1542B37B401 for ; Fri, 8 Aug 2003 11:28:50 -0700 (PDT) Received: from mail.speakeasy.net (mail10.speakeasy.net [216.254.0.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 695B443FCB for ; Fri, 8 Aug 2003 11:28:49 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22338 invoked from network); 8 Aug 2003 18:28:48 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 8 Aug 2003 18:28:48 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h78ISk9s037425; Fri, 8 Aug 2003 14:28:46 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <6421.1060328648@critter.freebsd.dk> Date: Fri, 08 Aug 2003 14:27:30 -0400 (EDT) From: John Baldwin To: Poul-Henning Kamp cc: ticso@cicely12.cicely.de cc: freebsd-hackers@freebsd.org cc: ticso@cicely.de Subject: Re: How to get a device_t X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2003 18:28:50 -0000 On 08-Aug-2003 Poul-Henning Kamp wrote: > In message <20030808083617.E7321@freebsd1.cimlogic.com.au>, John Birrell writes >: > >>I'm not convinced that any hacking is required other than passing the >>device_t parent to nexus_pcib_is_host_bridge (in STABLE) as Bernd says. >>I traced the boot on my system and the MMCR is initialised early (when >>the Timecounter "ELAN" output occurs). Immediately following that >>initialisation, 'pcib' is added as a child of 'nexus'. I don't see why >>'mmcr' couldn't be added as a child of 'nexus' too. At this point, >>nexus isn't walking through it's children so there shouldn't be a problem. >>Then the ELAN specific devices (like GPIO and flash) can attach to 'mmcr'. >> >>This seems straight forward. Maybe I'm missing something. 8-) > > That's my take too. And MMCR belongs on nexus not on legacy from an > architectural point of view. Well, that would be a major pain on current since nexus is already finished attaching many of its drivers by the time it gets to here. Also, if you use ACPI and if ACPI exists, then this function _won't_ _ever_ _be_ _called_. If you use a hostb PCI driver, then it will work both for ACPI and legacy. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/