[Skiboot] [PATCH 1/2] include: Add PRD message definition

Jeremy Kerr jk at ozlabs.org
Mon Feb 16 19:19:46 AEDT 2015


Hi Stewart,

>>> +struct opal_prd_msg {
>>> +	uint8_t		type;
>>> +	uint8_t		pad[3];
>>> +	uint32_t	token;
>>
>> Do we want a version in here?
>>
>> I'm thinking of future when we have either:
>> a) more types
>> b) some types have extended information.
>>
>> Please clearly document how OS should behave in the event of unknown
>> types or newer version.
> 
> We just make a new message in that case, though we could use pad as
> flags ...

We have a version field in the init message; this'll  be the first
message that the "client" sends.

> 
>>> +	union {
>>> +		struct {
>>> +			uint32_t	version;
>>> +			uint64_t	ipoll;
>>> +		} init;
>>> +		struct {
>>> +			uint64_t	proc;
>>> +			uint64_t	ipoll_status;
>>> +			uint64_t	ipoll_mask;
>>> +		} attn;
>>> +		struct {
>>> +			uint64_t	proc;
>>> +			uint64_t	ipoll_ack;
>>> +		} attn_ack;
>>> +		struct {
>>> +			uint64_t	chip;
>>> +		} occ_error;
>>> +		struct {
>>> +			uint64_t	chip;
>>> +		} occ_reset;
>>> +	};
>>> +};
>>
>> seeing as this is an opal_msg, can we also have a BUILD_ASSERT() of it
>> being < sizeof(struct opal_msg) ?
> 
> Ack.

Already have one in the new version of 2/2 :)

This change also uses the __be32/__be64 types, for endian annotation.

Cheers,


Jeremy


More information about the Skiboot mailing list