Date: Sun, 27 Oct 2013 09:24:33 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, freebsd-mips@freebsd.org Subject: FDTbus and nexus Message-ID: <526D2221.2020307@freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?526D2221.2020307>