FDT on x86 and for non-fdtbus devices.

Warner Losh imp at bsdimp.com
Wed Feb 13 23:21:56 UTC 2013


On Feb 13, 2013, at 1:56 PM, Marcel Moolenaar wrote:

> 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).

That's cool...

> 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.

Yes, I can see that for many possible cases...  However, you'll have to solve the namespace boundary problems inherent in such an undertaking...

> 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.

This might be hard...  Perhaps you could flesh out a bit how you'd propose to do this.

> 2.  Enumerate smb devices so that we can attach drivers for them
>    under smbus when we don't need FDT to find ichsmb itself.

If there's a 1-1 correspondence in the the FDT between the smb bridge driver (ichsmb) and the sub devices, this could work.

> 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.

Yes. What's the naming conventions we need to use here, especially since names in the FDT don't necessarily match our driver names. Crazy idea: define freebsd,driver-name properlty to make this association explicit.

> Are people already doing things like this?

only a little.

> Is there an interest in being able to do things like this?

Yes.

> Are changes to drivers to have them query FDT contributable at
> all or do people think such would be "pollution"?

I like this idea, but others may not be so open to it.

> Thoughts?
> Ideas?

"Go speed racer! Go!"

Warner


More information about the freebsd-arch mailing list