[Skiboot] [PATCH v2 4/5] external/opal-prd: Support manufacturing command HTMGT and attribute override

Jeremy Kerr jk at ozlabs.org
Wed Aug 26 09:59:29 AEST 2015


Hi Patrick,

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

> Is there a reason why this file isn't just copied verbatim from 
> Hostboot?

Because we developed this interface in collaboration on the internal
wiki; those comments were added on the hostboot-only side.

Cheers,


Jeremy


More information about the Skiboot mailing list