From owner-freebsd-ppc@FreeBSD.ORG Fri Jul 25 08:31:14 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 9D51C106566C for ; Fri, 25 Jul 2008 08:31:14 +0000 (UTC) (envelope-from neko@genesi-usa.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.230]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD928FC0A for ; Fri, 25 Jul 2008 08:31:13 +0000 (UTC) (envelope-from neko@genesi-usa.com) Received: by hu-out-0506.google.com with SMTP id 34so288939hue.8 for ; Fri, 25 Jul 2008 01:31:12 -0700 (PDT) Received: by 10.210.104.20 with SMTP id b20mr1573138ebc.149.1216973740252; Fri, 25 Jul 2008 01:15:40 -0700 (PDT) Received: from ?192.168.1.98? ( [92.237.58.95]) by mx.google.com with ESMTPS id u14sm13776315gvf.6.2008.07.25.01.15.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 25 Jul 2008 01:15:39 -0700 (PDT) Message-ID: <48898BA7.8090508@genesi-usa.com> Date: Fri, 25 Jul 2008 09:15:35 +0100 From: Matt Sealey User-Agent: Thunderbird 2.0.0.17pre (Windows/20080724) MIME-Version: 1.0 To: Philip Schulz References: <20080723.164741.163264646.imp@bsdimp.com> <20080723.213817.1661913390.imp@bsdimp.com> <1c66db910807240451n5c181956rfe82b2ba4e80c5ae@mail.gmail.com> In-Reply-To: <1c66db910807240451n5c181956rfe82b2ba4e80c5ae@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: Matt Sealey Cc: powerpc@freebsd.org, "M. Warner Losh" 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: Fri, 25 Jul 2008 08:31:14 -0000 Philip Schulz wrote: > > Unless I misunderstood what you guys said, I think it should be done > the other way around. > > It's my understanding that Linux always uses the FDT internally. If it > finds that it's being booted from a full Open Firmware implementation > with device tree, it will first parse the device tree and convert it > to an FDT. That way, Linux doesn't have to do any client interface > calls once it's past the device tree parsing stage. I think that's > good, see below. It would be more correct to say that both device tree implementations are parsed and pushed into a single internal device tree representation. The only difference is OpenFirmware implementations had this done anyway (since quiesce is called and the OF is killed, they need a copy of the DT) and in a flattened device tree, a text representation is compiled and this binary blob is attached to the kernel either manually or by boot firmware. I would definitely suggest a similar route; using the CIF to access the device drivers hardly ever works properly, and it's slow (horrible calling convention) and cannot support interrupts (everything must be polled, through that horrible calling convention). There is little point keeping anything but RTAS around (RTAS is important :) -- Matt Sealey Genesi, Manager, Developer Relations