FDTbus and nexus
Nathan Whitehorn
nwhitehorn at freebsd.org
Sun Nov 3 17:22:12 UTC 2013
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
More information about the freebsd-mips
mailing list