From owner-freebsd-ppc@FreeBSD.ORG Sun Sep 8 18:54:34 2013 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 847AEC00; Sun, 8 Sep 2013 18:54:34 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtpauth2.wiscmail.wisc.edu (wmauth2.doit.wisc.edu [144.92.197.222]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B61C2B8E; Sun, 8 Sep 2013 18:54:33 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MST00500LLPXM00@smtpauth2.wiscmail.wisc.edu>; Sun, 08 Sep 2013 13:54:26 -0500 (CDT) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.9.8.184815, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-67-185.dsl.mdsnwi.sbcglobal.net [76.208.67.185]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MST00MQYLUOGE20@smtpauth2.wiscmail.wisc.edu>; Sun, 08 Sep 2013 13:54:26 -0500 (CDT) Message-id: <522CC7E0.9060508@freebsd.org> Date: Sun, 08 Sep 2013 13:54:24 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 To: FreeBSD PowerPC ML , freebsd-arm@freebsd.org Subject: Patch for Cross-Reference Phandles X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2013 18:54:34 -0000 Open Firmware has three namespaces for handles: 1. Instance handles, for open devices 2. Package handles for the client interface 3. Package handles for device tree cross references On Powermac hardware, we assume that (2) and (3) are identical and call both phandles. On embedded FDT systems, you can't open devices and so we abuse ihandle_t for (3). IBM pSeries hardware, however, has all three things. With that in mind, I'd like to start separating them. The patch at http://people.freebsd.org/~nwhitehorn/xref_phandle.diff adds a new function (OF_child_xref_phandle) that takes a phandle of type (3) and turns into one of type (2) by searching for entries named "phandle", "ibm,phandle", or "linux,phandle" in the tree. This should work for FDT as well, but is not connected in the patch to anything actually FDT related. Comments would be appreciated. I'd like to get to get this as in as soon as possible (given the HEAD freeze) otherwise. -Nathan