Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2015 10:34:12 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrew Turner <andrew@FreeBSD.org>, 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
Message-ID:  <5548D4E4.7070600@FreeBSD.org>
In-Reply-To: <201505051113.t45BDHme019858@svn.freebsd.org>
References:  <201505051113.t45BDHme019858@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5548D4E4.7070600>