[coreboot] subsystem IDs

Myles Watson mylesgw at gmail.com
Wed Nov 19 14:46:13 CET 2008


> Uwe Hermann wrote:
> > > +++ mainboard/amd/serengeti/dts	(working copy)
> > > @@ -22,6 +22,8 @@
> > >  	device_operations="serengeti";
> > >  	mainboard_vendor = "AMD";
> > >  	mainboard_name = "Serengeti";
> > > +	subsystem_vendor = "PCI_VENDOR_ID_AMD";
> >
> > Nice, I didn't know that #defines could be used in dts.
> 
> This is a good example of why NOT to use #defines for IDs:
> 
> 1. The value could change unexpectedly
>  * If the #define is changed in the source a new ID can end up being
>    used even though the dts is unchanged. This is not obvious and IMO
>    not acceptable.

If it does a lot more than this breaks.

> 2. It is redundant
>  * mainboard_vendor already provides a friendly name for the vendor.

mainboard_vendor is friendly for printing, but it's hard to convert that
later into 0x1022.

Thanks,
Myles






More information about the coreboot mailing list