Message ID | 20210128001521.266883-2-joel@jms.id.au |
---|---|
State | New |
Headers | show |
Series | FIT verification | expand |
On Thu, 28 Jan 2021, at 10:45, Joel Stanley wrote: > The AST2600 SPL can boot from a number of sources, with or without the > AST2600 secure boot feature. It may be desirable to disable some of > these, so put them behind the defines for the drivers that are used. > > Reviewed-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > arch/arm/mach-aspeed/ast2600/Kconfig | 12 ++++++++++++ > arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +++++++++ > 2 files changed, 21 insertions(+) > > diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig > b/arch/arm/mach-aspeed/ast2600/Kconfig > index dd991e87c795..518f41b558d3 100644 > --- a/arch/arm/mach-aspeed/ast2600/Kconfig > +++ b/arch/arm/mach-aspeed/ast2600/Kconfig > @@ -53,6 +53,18 @@ config TARGET_SLT_AST2600 > > endchoice > > +config ASPEED_SECBOOT_BL2 > + bool "ASPEED secure boot BL2 support" > + depends on ASPEED_AST2600 > + help > + Enable ASPEED's "secboot" secure boot support for verifying > + the SPL's playload ("BL2"). > + > + Enable this is if you're using secure boot support in the AST2600 > (or similar) > + to verify your u-boot proper. > + > + Disable this is if you are using u-boot's vboot to verify u-boot. > + > source "board/aspeed/evb_ast2600a0/Kconfig" > source "board/aspeed/evb_ast2600a1/Kconfig" > source "board/aspeed/ncsi_ast2600a0/Kconfig" > diff --git a/arch/arm/mach-aspeed/ast2600/spl_boot.c > b/arch/arm/mach-aspeed/ast2600/spl_boot.c > index 58a22f646e08..98cf72bf440d 100644 > --- a/arch/arm/mach-aspeed/ast2600/spl_boot.c > +++ b/arch/arm/mach-aspeed/ast2600/spl_boot.c > @@ -42,6 +42,7 @@ static int aspeed_secboot_spl_ram_load_image(struct > spl_image_info *spl_image, > } > SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, > ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image); The orthogonal groups of MMC/RAM vs secure/not makes it hard to read :( But it looks like your IS_ENABLED(ASPEED_SECBOOT_BL2) #ifdef-ery has missed aspeed_secboot_spl_ram_load_image()? Andrew
On Thu, 28 Jan 2021 at 00:51, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > On Thu, 28 Jan 2021, at 10:45, Joel Stanley wrote: > > The AST2600 SPL can boot from a number of sources, with or without the > > AST2600 secure boot feature. It may be desirable to disable some of > > these, so put them behind the defines for the drivers that are used. > > > > Reviewed-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> > > Signed-off-by: Joel Stanley <joel@jms.id.au> > > --- > > arch/arm/mach-aspeed/ast2600/Kconfig | 12 ++++++++++++ > > arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +++++++++ > > 2 files changed, 21 insertions(+) > > > > diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig > > b/arch/arm/mach-aspeed/ast2600/Kconfig > > index dd991e87c795..518f41b558d3 100644 > > --- a/arch/arm/mach-aspeed/ast2600/Kconfig > > +++ b/arch/arm/mach-aspeed/ast2600/Kconfig > > @@ -53,6 +53,18 @@ config TARGET_SLT_AST2600 > > > > endchoice > > > > +config ASPEED_SECBOOT_BL2 > > + bool "ASPEED secure boot BL2 support" > > + depends on ASPEED_AST2600 > > + help > > + Enable ASPEED's "secboot" secure boot support for verifying > > + the SPL's playload ("BL2"). > > + > > + Enable this is if you're using secure boot support in the AST2600 > > (or similar) > > + to verify your u-boot proper. > > + > > + Disable this is if you are using u-boot's vboot to verify u-boot. > > + > > source "board/aspeed/evb_ast2600a0/Kconfig" > > source "board/aspeed/evb_ast2600a1/Kconfig" > > source "board/aspeed/ncsi_ast2600a0/Kconfig" > > diff --git a/arch/arm/mach-aspeed/ast2600/spl_boot.c > > b/arch/arm/mach-aspeed/ast2600/spl_boot.c > > index 58a22f646e08..98cf72bf440d 100644 > > --- a/arch/arm/mach-aspeed/ast2600/spl_boot.c > > +++ b/arch/arm/mach-aspeed/ast2600/spl_boot.c > > @@ -42,6 +42,7 @@ static int aspeed_secboot_spl_ram_load_image(struct > > spl_image_info *spl_image, > > } > > SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, > > ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image); > > The orthogonal groups of MMC/RAM vs secure/not makes it hard to read :( But it > looks like your IS_ENABLED(ASPEED_SECBOOT_BL2) #ifdef-ery has missed > aspeed_secboot_spl_ram_load_image()? Yeah, it could include that. I'll send a follow up once this series has gone in. Cheers, Joel
On Thu, 28 Jan 2021, at 11:32, Joel Stanley wrote: > On Thu, 28 Jan 2021 at 00:51, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > > > > > On Thu, 28 Jan 2021, at 10:45, Joel Stanley wrote: > > > The AST2600 SPL can boot from a number of sources, with or without the > > > AST2600 secure boot feature. It may be desirable to disable some of > > > these, so put them behind the defines for the drivers that are used. > > > > > > Reviewed-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> > > > Signed-off-by: Joel Stanley <joel@jms.id.au> > > > --- > > > arch/arm/mach-aspeed/ast2600/Kconfig | 12 ++++++++++++ > > > arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +++++++++ > > > 2 files changed, 21 insertions(+) > > > > > > diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig > > > b/arch/arm/mach-aspeed/ast2600/Kconfig > > > index dd991e87c795..518f41b558d3 100644 > > > --- a/arch/arm/mach-aspeed/ast2600/Kconfig > > > +++ b/arch/arm/mach-aspeed/ast2600/Kconfig > > > @@ -53,6 +53,18 @@ config TARGET_SLT_AST2600 > > > > > > endchoice > > > > > > +config ASPEED_SECBOOT_BL2 > > > + bool "ASPEED secure boot BL2 support" > > > + depends on ASPEED_AST2600 > > > + help > > > + Enable ASPEED's "secboot" secure boot support for verifying > > > + the SPL's playload ("BL2"). > > > + > > > + Enable this is if you're using secure boot support in the AST2600 > > > (or similar) > > > + to verify your u-boot proper. > > > + > > > + Disable this is if you are using u-boot's vboot to verify u-boot. > > > + > > > source "board/aspeed/evb_ast2600a0/Kconfig" > > > source "board/aspeed/evb_ast2600a1/Kconfig" > > > source "board/aspeed/ncsi_ast2600a0/Kconfig" > > > diff --git a/arch/arm/mach-aspeed/ast2600/spl_boot.c > > > b/arch/arm/mach-aspeed/ast2600/spl_boot.c > > > index 58a22f646e08..98cf72bf440d 100644 > > > --- a/arch/arm/mach-aspeed/ast2600/spl_boot.c > > > +++ b/arch/arm/mach-aspeed/ast2600/spl_boot.c > > > @@ -42,6 +42,7 @@ static int aspeed_secboot_spl_ram_load_image(struct > > > spl_image_info *spl_image, > > > } > > > SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, > > > ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image); > > > > The orthogonal groups of MMC/RAM vs secure/not makes it hard to read :( But it > > looks like your IS_ENABLED(ASPEED_SECBOOT_BL2) #ifdef-ery has missed > > aspeed_secboot_spl_ram_load_image()? > > Yeah, it could include that. I'll send a follow up once this series has gone in. > Okay, well, on that basis: Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig index dd991e87c795..518f41b558d3 100644 --- a/arch/arm/mach-aspeed/ast2600/Kconfig +++ b/arch/arm/mach-aspeed/ast2600/Kconfig @@ -53,6 +53,18 @@ config TARGET_SLT_AST2600 endchoice +config ASPEED_SECBOOT_BL2 + bool "ASPEED secure boot BL2 support" + depends on ASPEED_AST2600 + help + Enable ASPEED's "secboot" secure boot support for verifying + the SPL's playload ("BL2"). + + Enable this is if you're using secure boot support in the AST2600 (or similar) + to verify your u-boot proper. + + Disable this is if you are using u-boot's vboot to verify u-boot. + source "board/aspeed/evb_ast2600a0/Kconfig" source "board/aspeed/evb_ast2600a1/Kconfig" source "board/aspeed/ncsi_ast2600a0/Kconfig" diff --git a/arch/arm/mach-aspeed/ast2600/spl_boot.c b/arch/arm/mach-aspeed/ast2600/spl_boot.c index 58a22f646e08..98cf72bf440d 100644 --- a/arch/arm/mach-aspeed/ast2600/spl_boot.c +++ b/arch/arm/mach-aspeed/ast2600/spl_boot.c @@ -42,6 +42,7 @@ static int aspeed_secboot_spl_ram_load_image(struct spl_image_info *spl_image, } SPL_LOAD_IMAGE_METHOD("RAM with Aspeed Secure Boot", 0, ASPEED_SECBOOT_DEVICE_RAM, aspeed_secboot_spl_ram_load_image); +#if IS_ENABLED(CONFIG_SPL_MMC_SUPPORT) static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { @@ -101,6 +102,7 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, } SPL_LOAD_IMAGE_METHOD("MMC", 0, ASPEED_BOOT_DEVICE_MMC, aspeed_spl_mmc_load_image); +#if IS_ENABLED(ASPEED_SECBOOT_BL2) static int aspeed_secboot_spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { @@ -161,7 +163,10 @@ static int aspeed_secboot_spl_mmc_load_image(struct spl_image_info *spl_image, return 0; } SPL_LOAD_IMAGE_METHOD("MMC with Aspeed Secure Boot", 0, ASPEED_SECBOOT_DEVICE_MMC, aspeed_secboot_spl_mmc_load_image); +#endif /* ASPEED_SECBOOT_BL2 */ +#endif +#if IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) static int getcymodem(void) { if (tstc()) @@ -204,6 +209,8 @@ end_stream: } SPL_LOAD_IMAGE_METHOD("UART", 0, ASPEED_BOOT_DEVICE_UART, aspeed_spl_ymodem_load_image); + +#if IS_ENABLED(ASPEED_SECBOOT_BL2) static int aspeed_secboot_spl_ymodem_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { @@ -245,3 +252,5 @@ end_stream: return ret; } SPL_LOAD_IMAGE_METHOD("UART with Aspeed Secure Boot", 0, ASPEED_SECBOOT_DEVICE_UART, aspeed_secboot_spl_ymodem_load_image); +#endif /* ASPEED_SECBOOT_BL2 */ +#endif