[Skiboot] [PATCH] hdata: Check the Host I2C devices array version

Oliver O'Halloran oohall at gmail.com
Fri May 26 14:15:49 AEST 2017


On Thu, May 25, 2017 at 4:46 PM, Vasant Hegde
<hegdevasant at linux.vnet.ibm.com> wrote:
> On 05/24/2017 01:39 PM, Oliver O'Halloran wrote:
>>
>> Currently this is not populated on FSP machines which causes some
>> obnoxious errors to appear in the boot log. We also only want to
>> parse version 1 of this structure since future versions will completely
>
>
> Latest HDAT spec says 0x02 for P9.

The latest specs (I think it changed in j) changed the format, but
existing hostboot still provide the v1 format. I don't think there are
any immediate plans to start using the v2 format for now so we need to
tolerate getting either. I've been asking for some change to the v2
format so I don't want to support it yet, but I think skiboot needs to
cleanly handle the unsupported format.

>> change the array item format.
>>
>> Cc: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
>> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
>> ---
>>  hdata/i2c.c | 33 +++++++++++++++++++++++++++++++++
>>  1 file changed, 33 insertions(+)
>>
>> diff --git a/hdata/i2c.c b/hdata/i2c.c
>> index f5c5bafe758b..4c3f920e2fda 100644
>> --- a/hdata/i2c.c
>> +++ b/hdata/i2c.c
>> @@ -149,6 +149,11 @@ static bool is_zeros(const void *p, size_t size)
>>         return true;
>>  }
>>
>> +struct host_i2c_hdr {
>> +       const struct HDIF_array_hdr hdr;
>> +       __be32 version;
>
>
> May be we should define macro for each version instead of hardcoding below.

I don't really see the point. It's only ever going to be 1, 2, 3, etc

>
> -Vasant
>


More information about the Skiboot mailing list