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

Michael Neuling mikey at neuling.org
Mon Mar 21 15:47:35 AEDT 2016


> +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;

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

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

Mikey


More information about the Skiboot mailing list