[coreboot] [poll] device_t

Patrick Georgi pgeorgi at google.com
Fri May 8 19:16:08 CEST 2015


2015-05-08 17:31 GMT+02:00 Aaron Durbin <adurbin at google.com>:
> In romstage *both* struct device and device_t are present but are
> completely different types. It's the romstage, ramstage, and smm
> overlap that is large and extremely annoying to deal with.
History time:
Until not too long ago, bootblock and romstage used u32 device_t,
ramstage used struct device, smm didn't really matter and nothing else
existed.
This was further enforced by struct device being available in ramstage
_only_. We now have a read-only view of the device tree available in
romstage that makes things look more complicated.

One of the ideas that led to the devicetree in romstage was to make
struct device the default interface where possible, together with the
aforementioned isolation of romcc based code. Essentially: for romcc,
use u32. For everything else, struct device.

We may want to determine first what data structure we want to use in
each stage. This could be 'u32 for all hardware accesses, with some
struct device -> u32 conversion to move from devicetree to hardware',
which sounds like what you propose (and is completely contrary to that
other idea).
But until there's a consensus on that, I guess it's too early to
discuss the fate of device_t.


Patrick
-- 
Google Germany GmbH, ABC-Str. 19, 20354 Hamburg
Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores



More information about the coreboot mailing list