[U-Boot] [PATCH 2/5] x86: baytrail: Add fsp-header verification for secure boot fsp
Anatolij Gustschin
agust at denx.de
Mon May 15 07:20:49 UTC 2017
Hi Simon,
On Sun, 14 May 2017 21:03:27 -0600
Simon Glass sjg at chromium.org wrote:
...
> > @@ -119,6 +119,13 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
> > /* No valid FSP info header was found */
> > panic("Invalid FSP header");
> > }
> > +#ifdef CONFIG_BAYTRAIL_SECURE_BOOT
>
> Can you use if (IS_ENABLED(CONFIG_BAYTRAIL_SECURE_BOOT) instead of
> #ifdef? It reduces the number of build paths.
OK, will fix it.
> > + /* compare primary and secondary header */
> > + if (memcmp((void *)(CONFIG_FSP_ADDR + FSP_FIRST_HEADER_OFFSET),
> > + (void *)(CONFIG_FSP_ADDR + FSP_SECOND_HEADER_OFFSET),
> > + fsp_hdr->hdr_len))
> > + panic("SB: first & secondary FSP headers don't match");
>
> How about s/SB/Secure Boot/?
OK, I'll change it. Thanks!
--
Anatolij
More information about the U-Boot
mailing list