[Skiboot] [PATCH v3 4/6] hdata: Enable SPIRA-H

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Mar 22 14:51:59 AEDT 2016


On 03/21/2016 10:17 AM, Michael Neuling wrote:
>
>> +static void fixup_spira(void)
>> +{
>> +#if !defined(TEST)
>> +> 	  spiras = (struct spiras *)CPU_TO_BE64(SPIRA_HEAP_BASE);
>> +#endif
>> +
>> +> 	  /* Validate SPIRA-S signature */
>> +> 	  if (!spiras)
>> +> 	  	  return;
>> +> 	  if (!(spiras->hdr.d1f0 == CPU_TO_BE16(0xd1f0)))
>> +> 	  	  return;
>> +> 	  if (memcmp(spiras->hdr.id, SPIRAS_HDIF_SIG, sizeof(spiras->hdr.id)))
>> +> 	  	  return;
>

Michael,

> These two above can be done with HDIF_check() I think.

Yes. Will fix it.


>
> Also, we are using spirah and spira below so we should check them too?

OPAL populates spira and spirah header. Hence I think we don't need to check 
this header.

-Vasant



More information about the Skiboot mailing list