On Sat, Oct 16, 2010 at 11:28:33AM +0300, Jukka Ruohonen wrote: > I do not know OF well, but my impression is that it is much, much less > invasive than what we have nowadays on x86 where close interaction between > the firmware and drivers are expected.
Indeed. Quentin once tried to explain to me why autoconfig is so much harder with ACPI than with OF, but I failed to get the big picture. The main difference that I understood seems to be what you call virtual and natural device trees: in OF world we guide the whole autoconfig tree along the OF device tree, with differences close to the leafs (i.e. the scsibus der Mouse mentioned). At every point during autoconfig we can make sure to have enough OF information already available during the device_register() call. The only problem we ran into so far, IIRC, is the id of FC disks for boot device detection, but we worked around that pretty easily. I don't think the auto-config time and in/out distinction you draw realy is that relevant. With OF we still can call firmware methods any time later, and we could take callbacks (though I don't think there are any relevant). ACPI seems to do more in that area, but I fail to see the fundamental problem, assuming you manage to get ACPI device tree traversal and autoconfig tree building "synchronized" somehow (i.e. have all needed ACPI information available for device_register()). Martin