From owner-freebsd-ppc@FreeBSD.ORG Thu Jul 24 16:45:08 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 08718106564A for ; Thu, 24 Jul 2008 16:45:08 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (ice.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id C8E738FC2F for ; Thu, 24 Jul 2008 16:45:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id EBED786DC0; Thu, 24 Jul 2008 11:25:50 -0500 (CDT) Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (ice.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 17819-06; Thu, 24 Jul 2008 11:25:50 -0500 (CDT) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-188.icecube.wisc.edu [172.16.223.188]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 5274586D63; Thu, 24 Jul 2008 11:25:50 -0500 (CDT) Message-ID: <4888AD0A.4020001@freebsd.org> Date: Thu, 24 Jul 2008 11:25:46 -0500 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.14 (X11/20080609) MIME-Version: 1.0 To: Benno Rice References: <20080723.164741.163264646.imp@bsdimp.com> <4887CC78.8040707@freebsd.org> <3008B18B-DC6F-4E33-939E-169484B6EEFE@jeamland.net> In-Reply-To: <3008B18B-DC6F-4E33-939E-169484B6EEFE@jeamland.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at ice.icecube.wisc.edu 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 16:45:08 -0000 Benno Rice wrote: > > On 24/07/2008, at 10:27 AM, Nathan Whitehorn wrote: > >> Benno Rice wrote: >>> 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. 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... >> >> >> Can you use this to abstract real OF too? We don't support real mode >> Open Firmware and IBM is shipping new systems with a very basic >> firmware that runs only in real mode (this includes the Bimini 970MP >> dev board, apparently, as well as their Cell blades). The easiest >> course seems to be just to pretend it's a flattened device tree if we >> can support that. > > My plan (assuming some measure of available time) was to actually get > loader to handle turning OpenFirmware device data into an FDT which > could be handed to FreeBSD as part of the loader metadata. On > platforms like the Mikrotik where all we get is an FDT, if we have > loader it can just pass it through or if we're not using loader we can > have a hook that shunts the data into the right place. > > Does that sound workable? > It would be nice not to require loader at all and support direct loading of the kernel. We already support this, and it is handy on systems with low-featured firmware that doesn't allow loader to easily load more files. I think the best way forward is to support some kind of pluggable Open Firmware implementation. On systems with nonexistent/bad firmware, we can supply a fake interpreter with a very limited vocabulary to OF_init (I'm assuming this is what you are doing with the Microtik board) that either uses a passed-in FDT or generates one from the real-mode firmware early in the boot process. But I don't think we should turn everything into an FDT: we gain some real advantages on systems with decent firmware implementations from being able to use them, like RTC and power management support. It would be silly to throw that away and I believe the existing architecture is flexible enough to support runtime switching between implementations. Also, while I'm sending email to everyone, I'll give my apparently daily update on G5 support. We're self-hosting! This means that my patches (http://people.freebsd.org/~nwhitehorn/g5.diff, as before) fix building PPC world and that the system is now stable enough to build that world itself. The NFS bug has now been fixed in HEAD (thanks to dfr). You still can't build a kernel with INVARIANTS. -Nathan