From owner-svn-src-head@FreeBSD.ORG Tue May 5 14:34:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9846ADCD; Tue, 5 May 2015 14:34:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FAB1B41; Tue, 5 May 2015 14:34:12 +0000 (UTC) Received: from dhcp-10-2-210-36.hudson-trading.com (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BB3EBB953; Tue, 5 May 2015 10:34:10 -0400 (EDT) Message-ID: <5548D4E4.7070600@FreeBSD.org> Date: Tue, 05 May 2015 10:34:12 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andrew Turner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282480 - in head/sys: arm64/arm64 dev/ofw References: <201505051113.t45BDHme019858@svn.freebsd.org> In-Reply-To: <201505051113.t45BDHme019858@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 05 May 2015 10:34:10 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2015 14:34:12 -0000 On 5/5/15 7:13 AM, Andrew Turner wrote: > Author: andrew > Date: Tue May 5 11:13:16 2015 > New Revision: 282480 > URL: https://svnweb.freebsd.org/changeset/base/282480 > > Log: > Move the point we attach the ofw driver on arm64 to nexus.c. This will > allow us to have a single place to decide to use ofw or acpi. > > Modified: > head/sys/arm64/arm64/nexus.c > head/sys/dev/ofw/ofwbus.c x86 does this by having an ACPI-specific nexus(4). It checks for ACPI in its nexus_probe() routine and if found returns a higher probe value than the default nexus. The ACPI nexus adds acpi0 whereas the default nexus adds legacy0. For x86 this allowed us to also do other things based on ACPI or not via bus attachments (so pre-ACPI versions of things like PCI interrupt routing, or non-ACPI CPU devices for cpufreq would hang off of legacy0 rather than having to do explicit runtime checks for ACPI). Xen makes use of this to add its own nexus for PVH that overrides the normal ACPI nexus even when ACPI is present, so this approach can work well if you have multiple types of "platforms" you want to support without the various platforms having to be aware of each other (e.g. the PNPBIOS bits don't have to explicitly check for ACPI to disable themselves, instead the PNPBIOS stuff only runs on legacy0). -- John Baldwin