From owner-freebsd-mips@FreeBSD.ORG Sun Oct 27 14:24:36 2013 Return-Path: Delivered-To: freebsd-mips@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 61AB494C; Sun, 27 Oct 2013 14:24:36 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtpauth4.wiscmail.wisc.edu (wmauth4.doit.wisc.edu [144.92.197.145]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 350D72A5D; Sun, 27 Oct 2013 14:24:35 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth4.wiscmail.wisc.edu by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MVB00200ZN6CH00@smtpauth4.wiscmail.wisc.edu>; Sun, 27 Oct 2013 09:24:34 -0500 (CDT) X-Spam-PmxInfo: Server=avs-4, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.10.27.141515, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-69-44.dsl.mdsnwi.sbcglobal.net [76.208.69.44]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MVC00ETJ00X7G00@smtpauth4.wiscmail.wisc.edu>; Sun, 27 Oct 2013 09:24:34 -0500 (CDT) Message-id: <526D2221.2020307@freebsd.org> Date: Sun, 27 Oct 2013 09:24:33 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 To: "freebsd-arm@freebsd.org" , freebsd-mips@freebsd.org Subject: FDTbus and nexus X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2013 14:24:36 -0000 As many of you may have noticed, I've been working on trying to bring the code in /sys/dev/fdt a little bit closer to the code in /sys/dev/ofw as well as improving standards-compliance. One motivation for this is to be able to build kernels that support both real Open Firmware and FDT at the same time, with the same drivers, which is not currently possible, largely due to differences in bus enumeration. The remaining primary difference between FDT and OF systems is that the root of the OF hierarchy is attached through fdtbus on one and enumerated through nexus on the other. Of these two, I think nexus is the cleaner approach here since it means we can get rid of things like fdt_bs_tag and isolate the MD resource allocation code to the MD nexus driver, as well as increasing flexibility with things like interrupt mapping (nexus and individual PIC drivers can then handle the mappings in /sys/dev/fdt/fdt_ARCH.c). The patch at http://people.freebsd.org/~nwhitehorn/nexus.diff implements this change by subclassing the ARM and MIPS nexus drivers from ofw_nexus (the same thing fdtbus subclasses, and what is already done on PowerPC). fdtbus is made optional for now as a consideration for out-of-tree code that I don't know about, and the set of things attaching to fdtbus is made to attach to nexus instead. The patch is quite minimal, aside from rearranging the order of some ARM and MIPS nexus methods for easier #ifdef, and has been tested with no issues on both PowerPC (on both FDT and non-FDT systems) and ARM. The MIPS support is only compile-tested, however, so I would really appreciate some testing there. -Nathan