From owner-freebsd-ppc@FreeBSD.ORG Thu Jul 24 03:59:12 2008 Return-Path: Delivered-To: powerpc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C1C1065670 for ; Thu, 24 Jul 2008 03:59:12 +0000 (UTC) (envelope-from benno@jeamland.net) Received: from mail.jeamland.net (rafe.jeamland.net [203.20.99.33]) by mx1.freebsd.org (Postfix) with ESMTP id 443F18FC0C for ; Thu, 24 Jul 2008 03:59:12 +0000 (UTC) (envelope-from benno@jeamland.net) Received: from mail.jeamland.net (localhost [127.0.0.1]) by mail.jeamland.net (Postfix) with ESMTP id B0F1E1CC48; Thu, 24 Jul 2008 13:59:00 +1000 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on rafe.jeamland.net X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from urtzweil.jeamland.net (ppp154-45.static.internode.on.net [150.101.154.45]) by mail.jeamland.net (Postfix) with ESMTPSA id 471821CC07; Thu, 24 Jul 2008 13:59:00 +1000 (EST) Message-Id: <4C17792D-C96D-461C-A85A-BDF599CAD628@jeamland.net> From: Benno Rice To: M. Warner Losh In-Reply-To: <20080723.213817.1661913390.imp@bsdimp.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Thu, 24 Jul 2008 13:58:42 +1000 References: <20080723.164741.163264646.imp@bsdimp.com> <20080723.213817.1661913390.imp@bsdimp.com> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV using ClamSMTP at rafe.jeamland.net Cc: powerpc@FreeBSD.org Subject: Re: Device trees X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2008 03:59:12 -0000 On 24/07/2008, at 1:38 PM, M. Warner Losh wrote: > In message: > Benno Rice writes: > : > : On 24/07/2008, at 8:47 AM, M. Warner Losh wrote: > : > : > Does FreeBSD/powerpc on the MPC85xx machine use the fake device > open > : > firmware tree stuff from uboot (aka dts in the linux kernel > sources)? > : > : I've got a machine (Mikrotik RouterBOARD 333, uses MPC8321) that has > : this. I've been working with one of the dtc developers to port > their > : code over to FreeBSD. > > Cool! > > : I'm trying to hide it underneath our existing > : OpenFirmware stuff. I've got a few more bugs to get out of it but I > : can probably send you some patches early next week... > > That's basically what Linux does. They force the boot loader to pass > in all kinds of information about the system. This makes a lot of > sense, I think. > > Are you booting /boot/loader? Or directly booting the kernel from > uboot? s/uboot/RouterBOOT/ =) Directly booting. RouterBOOT supports netbooting but doesn't provide hooks that loader can use to do anything itself. It also only supports yaffs2 as a local boot filesystem. I'm going to look into porting yaffs2 at some point. The only thing RouterBOOT hands us is a pointer to a flattened device tree a-la what uboot hands to Linux so I need to be able to handle it to get things like memory sizes/locations, SoC base addresses and where the hell my console is. =) -- Benno Rice benno@jeamland.net