FDT on x86 and for non-fdtbus devices.

Marcel Moolenaar marcel at xcllnt.net
Wed Feb 13 20:56:50 UTC 2013


All,

Here at Juniper we added support for FDT to x86 (we'll contribute
that shortly). However, it's applicability is rather limited right
now by virtue of needing the devices to be attached to fdtbus
(directly or indirectly). This so that we can map from device_t
to pnode_t. However, there's great value in being able to use the
FDT to tweak the behaviour of any device in the system, and in
particular when we don't need nor use FDT to enumerate them.

What we like to do is to use the FDT to define properties for
pretty much any kind of device. Examples are:
1.  Allow the FDT to define the name by which an interface is
    to be created.
2.  Enumerate smb devices so that we can attach drivers for them
    under smbus when we don't need FDT to find ichsmb itself.

I think one way to state the problem in a generic way is: How
can we obtain the FDT pnode_t given an arbitrary device_t and
use the pnode_t to query for properties, etc.

Are people already doing things like this?
Is there an interest in being able to do things like this?
Are changes to drivers to have them query FDT contributable at
all or do people think such would be "pollution"?

Thoughts?
Ideas?

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the freebsd-arch mailing list