From owner-freebsd-mips@FreeBSD.ORG Sun Nov 3 17:22:12 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BA33678D; Sun, 3 Nov 2013 17:22:12 +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 8B14228AC; Sun, 3 Nov 2013 17:22:12 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed; delsp=yes 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 <0MVP00J006J7KE00@smtpauth2.wiscmail.wisc.edu>; Sun, 03 Nov 2013 11:22:05 -0600 (CST) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.11.3.171215, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from [10.0.2.100] (adsl-76-208-69-44.dsl.mdsnwi.sbcglobal.net [76.208.69.44]) 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 <0MVP00G3Z6WRBU30@smtpauth2.wiscmail.wisc.edu>; Sun, 03 Nov 2013 11:22:05 -0600 (CST) Message-id: <7467BF46-692E-4BDF-9F4B-6EFF8F80A824@freebsd.org> From: Nathan Whitehorn To: Nathan Whitehorn In-reply-to: <526D2221.2020307@freebsd.org> Subject: Re: FDTbus and nexus Date: Sun, 03 Nov 2013 11:22:02 -0600 References: <526D2221.2020307@freebsd.org> X-Mailer: Apple Mail (2.936) Cc: "freebsd-arm@freebsd.org" , freebsd-mips@freebsd.org 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, 03 Nov 2013 17:22:12 -0000 On Oct 27, 2013, at 9:24 AM, Nathan Whitehorn wrote: > 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 I've received several testing reports that this works without issue on a variety of MIPS and ARM systems so, unless some issues arise, I plan to commit it on Tuesday November 5. -Nathan