[Skiboot] [PATCH v2 4/5] external/opal-prd: Support manufacturing command HTMGT and attribute override
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Aug 26 10:24:16 AEST 2015
Jeremy Kerr <jk at ozlabs.org> writes:
>> // Reserve some space for future growth. // do NOT ever change this
>> number, even if you add functions. // // The value of 32 was
>> somewhat arbitrarily chosen. // // If either side modifies the
>> interface.h file we're suppose to be able to // tolerate the other
>> side not supporting the function yet. The function // pointer can
>> be NULL. So if we require a new interface from OPAL, // like
>> "read_iic", we need to be able to tolerate that function pointer //
>> being NULL and do something sane (and erroring out is not consider
>> sane). // // The purpose of this is to give us the ability to
>> update Hostboot and // OPAL independently. It is pretty rare that
>> we both have function ready // at the same time. The "reserve" is
>> there so that the structures are // allocated with sufficient space
>> and populated with NULL function pointers. // 32 is big enough that
>> we should not likely add that many functions from // either
>> direction in between any two levels of support.
>
> That seems like a bad way to retain ABI compatibility. Since this
> doesn't allow any for agreement on the actual size of the struct, we
> have no way to contain reads/writes to areas of memory that we can
> guarantee are valid.
I tend to agree.
Having version and size members let you sort out pretty much all
additions/removals/modifications pretty trivially.
More information about the Skiboot
mailing list