FIT verification
Subsystems (3)
Joel Stanley
maintainerv2 cover FIT verification
As part of our effort to enable secure boot in openbmc, this turns on FIT verification in the SPL and u-boot.
It adjusts the SRAM layout to accommodate the extra code size, moving the heap to the non-parity checked 24KB of SRAM.
It also modifies the way the SPL is built, including disabling features. This reduces the SPL size to 59716, meaning we could choose to leave ymodem support in the build for now. Please voice your thoughts when reviewing.
Joel Stanley (6):
ast2600: Modify SPL SRAM layout
config: ast2600: Enable FIT signature verification
ast2600: Allow selection of SPL boot devices
config: ast2600: Disable unused features
config: ast2600: Disable SPL ymodem support
config: ast2600: Reduce SPL image size
arch/arm/mach-aspeed/ast2600/Kconfig | 12 ++++++++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +++++++++ configs/ast2600_openbmc_spl_emmc_defconfig | 13 +++++++++++-- include/configs/evb_ast2600a1_spl.h | 4 ++-- 4 files changed, 34 insertions(+), 4 deletions(-)
Signature · 1 line
2.29.2
Joel Stanley
maintainerPATCH v2 1/6 ast2600: Modify SPL SRAM layout
The SRAM is 89KB on the A1 and beyond:
0x1000_0000 to 0x1000_ffff: 64KB, with parity check 0x1001_0000 to 0x1001_5fff: 24KB, w/o parity check 0x1001_6000 to 0x1001_63ff: 1KB, w/o parity check, each byte write once
Allow the image to fill the full 64KB payload size (max that secure boot supports) and place the stack at the top of the 24KB of SRAM.
--- include/configs/evb_ast2600a1_spl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/evb_ast2600a1_spl.h +2 -2
@@ -25,8 +25,8 @@/* SPL */ #define CONFIG_SPL_TEXT_BASE 0x00000000 -#define CONFIG_SPL_MAX_SIZE 0x0000E800 -#define CONFIG_SPL_STACK 0x10010000 +#define CONFIG_SPL_MAX_SIZE 0x00010000 +#define CONFIG_SPL_STACK 0x10016000#define CONFIG_SPL_BSS_START_ADDR 0x90000000#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 1/6] ast2600: Modify SPL SRAM layout
Quoted 10 lines · Joel Stanley
The SRAM is 89KB on the A1 and beyond:
0x1000_0000 to 0x1000_ffff: 64KB, with parity check 0x1001_0000 to 0x1001_5fff: 24KB, w/o parity check 0x1001_6000 to 0x1001_63ff: 1KB, w/o parity check, each byte write once
Allow the image to fill the full 64KB payload size (max that secure boot supports) and place the stack at the top of the 24KB of SRAM.
Signed-off-by Joel Stanley <[email protected]>
I've pushed a change to github that enables socsec to sign larger SPLs:
https://github.com/amboar/socsec/commit/e28d00cb8278d61b02cb65c320ab4bfa70c79ae1
Joel Stanley
maintainerPATCH v2 2/6 config: ast2600: Enable FIT signature verification
In reply to Joel StanleyThis turns on FIT signature verification for the OpenBMC SPL configuration, for both the SPL and u-boot.
--- configs/ast2600_openbmc_spl_emmc_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/ast2600_openbmc_spl_emmc_defconfig +3 -0
@@ -35,6 +35,9 @@ CONFIG_ARMV7_BOOT_SEC_DEFAULT=y CONFIG_ARMV7_PSCI_NR_CPUS=2 CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw" CONFIG_USE_BOOTCOMMAND=y
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 2/6] config: ast2600: Enable FIT signature verification
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_ARMV7_BOOT_SEC_DEFAULT=y · line 40
Quoted 8 lines · Joel Stanley
This turns on FIT signature verification for the OpenBMC SPL configuration, for both the SPL and u-boot.
CONFIG_NR_DRAM_BANKS=1
CONFIG_FIT=yconfigs/ast2600_openbmc_spl_emmc_defconfig +3
-0+CONFIG_FIT_SIGNATURE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y
See my comments on patch 6, but feels like this should logically go after the size-reduction patches.
Quoted 4 lines
CONFIG_USE_BOOTARGS=yCONFIG_BOOTARGS="console=ttyS4,115200n8root=/dev/ram rw"CONFIG_USE_BOOTCOMMAND=y
Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>
Joel Stanley
maintainerPATCH v2 3/6 ast2600: Allow selection of SPL boot devices
In reply to Joel StanleyThe 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.
--- arch/arm/mach-aspeed/ast2600/Kconfig | 12 ++++++++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +++++++++ 2 files changed, 21 insertions(+)
arch/arm/mach-aspeed/ast2600/Kconfig +12 -0
@@ -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"
arch/arm/mach-aspeed/ast2600/spl_boot.c +9 -0
@@ -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
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 3/6] ast2600: Allow selection of SPL boot devices
Quoted 5 lines · Joel Stanley
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.
Signed-off-by Joel Stanley <[email protected]>
Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>
Joel Stanley
maintainerPATCH v2 4/6 config: ast2600: Disable unused features
In reply to Joel Stanley--- configs/ast2600_openbmc_spl_emmc_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/ast2600_openbmc_spl_emmc_defconfig +3 -0
@@ -83,6 +83,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_MTDPARTS=y +# CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_IS_IN_MMC=y
@@ -100,6 +101,7 @@ CONFIG_SYS_I2C_ASPEED=y CONFIG_MISC=y CONFIG_ASPEED_AHBC=y CONFIG_DM_MMC=y +# CONFIG_MMC_VERBOSE is not set CONFIG_SPL_MMC_TINY=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ASPEED=y
@@ -128,6 +130,7 @@ CONFIG_DM_SPI=y CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y +# CONFIG_REGEX is not set CONFIG_TPM=y CONFIG_SPL_TPM=y # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 4/6] config: ast2600: Disable unused features
Hi Joel,
Quoted 1 line
+#
CONFIG_SPL_DOS_PARTITIONis not set
Sounds good.
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_DM_SPI=y · line 133
Quoted 9 lines
configs/ast2600_openbmc_spl_emmc_defconfig +2
-0+# CONFIG_MMC_VERBOSE is not set CONFIG_SPL_MMC_TINY=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ASPEED=y@@ -128,6 +130,7 @@ CONFIG_DM_SPI=y CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y +# CONFIG_REGEX is not set
Are those influencing the SPL size or just U-boot proper?
At any rate, I don't have objections.
Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>
Andrew Jeffery
Acked-byRe: [PATCH u-boot v2019.04-aspeed-openbmc v2 4/6] config: ast2600: Disable unused features
Quoted 6 lines · Klaus Heinrich Kiwi
Hi Joel,
Quoted 1 line
+#
CONFIG_SPL_DOS_PARTITIONis not setSounds good.
Quoted 10 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_DM_SPI=y · line 133
Quoted 9 lines
configs/ast2600_openbmc_spl_emmc_defconfig +2
-0+# CONFIG_MMC_VERBOSE is not set CONFIG_SPL_MMC_TINY=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ASPEED=y@@ -128,6 +130,7 @@ CONFIG_DM_SPI=y CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y +# CONFIG_REGEX is not setAre those influencing the SPL size or just U-boot proper?
The SPL needs MMC support to load u-boot, so I assume CONFIG_MMC_VERBOSE=n is worthwhile.
Joel Stanley
maintainerPATCH v2 5/6 config: ast2600: Disable SPL ymodem support
In reply to Joel StanleyThis feature consumes 3656 bytes. Without it systems will need to load a new SPL over the UART with the AST2600's recovery feature if they flash a bad u-boot proper.
--- configs/ast2600_openbmc_spl_emmc_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/ast2600_openbmc_spl_emmc_defconfig +0 -1
@@ -55,7 +55,6 @@ CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y CONFIG_SPL_WATCHDOG_SUPPORT=y -CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y # CONFIG_AUTO_COMPLETE is not set CONFIG_SYS_PROMPT="ast# "
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 5/6] config: ast2600: Disable SPL ymodem support
Quoted 3 lines · Joel Stanley
This feature consumes 3656 bytes. Without it systems will need to load a new SPL over the UART with the AST2600's recovery feature if they flash a bad u-boot proper.
No objections here. Just a bit confusing since that in the introductory letter you mention we *could* leave that enabled. So if that's not necessary, why bundle that with this patchset (and not separate)?
Quoted 10 lines
Signed-off-by Joel Stanley <[email protected]>--- configs/ast2600_openbmc_spl_emmc_defconfig | 1 - 1 file changed, 1 deletion(-)configs/ast2600_openbmc_spl_emmc_defconfig +0
-0
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SPL_DM_RESET=y · line 60
Quoted 7 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-1@@ -55,7 +55,6 @@ CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y CONFIG_SPL_WATCHDOG_SUPPORT=y -CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y # CONFIG_AUTO_COMPLETE is not set CONFIG_SYS_PROMPT="ast# "
Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 5/6] config: ast2600: Disable SPL ymodem support
In reply to Joel StanleyQuoted 5 lines · Joel Stanley
This feature consumes 3656 bytes. Without it systems will need to load a new SPL over the UART with the AST2600's recovery feature if they flash a bad u-boot proper.
Signed-off-by Joel Stanley <[email protected]>
As mentioned in my reply to the cover letter, I think we should drop this one.
Andrew
Joel Stanley
maintainerPATCH v2 6/6 config: ast2600: Reduce SPL image size
In reply to Joel StanleyThis modifies some features of the SPL to ensure it fits in the 64KB payload size.
This set of options reduceds the binary size by 4760 bytes with GCC 10.
--- configs/ast2600_openbmc_spl_emmc_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
configs/ast2600_openbmc_spl_emmc_defconfig +5 -1
@@ -2,8 +2,9 @@ CONFIG_ARM=y CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl" CONFIG_SYS_DCACHE_OFF=y CONFIG_POSITION_INDEPENDENT=y -CONFIG_SPL_SYS_THUMB_BUILD=y CONFIG_SYS_THUMB_BUILD=y +# CONFIG_SPL_USE_ARCH_MEMCPY is not set +# CONFIG_SPL_USE_ARCH_MEMSET is not set CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds" CONFIG_ARCH_ASPEED=y CONFIG_SYS_TEXT_BASE=0x10000
@@ -51,6 +52,8 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_TPL_BANNER_PRINT is not set +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y
@@ -130,6 +133,7 @@ CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y # CONFIG_REGEX is not set +CONFIG_SPL_TINY_MEMSET=y CONFIG_TPM=y CONFIG_SPL_TPM=y # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.29.2
Re: [PATCH u-boot v2019.04-aspeed-openbmc v2 6/6] config: ast2600: Reduce SPL image size
Hi Joel,
Quoted 4 lines · Joel Stanley
This modifies some features of the SPL to ensure it fits in the 64KB payload size.
This set of options reduceds the binary size by 4760 bytes with GCC 10.
typo here..
Quoted 10 lines
Signed-off-by Joel Stanley <[email protected]>--- configs/ast2600_openbmc_spl_emmc_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)configs/ast2600_openbmc_spl_emmc_defconfig +0
-0
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_ARM=y · line 5
Quoted 4 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-1@@ -2,8 +2,9 @@ CONFIG_ARM=y CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl" CONFIG_SYS_DCACHE_OFF=y CONFIG_POSITION_INDEPENDENT=y -CONFIG_SPL_SYS_THUMB_BUILD=y
Are we sure this is reducing the size? From the Kconfig file.. "Thumb instruction set provides better code density"
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_ARM=y · line 7
Quoted 3 lines
configs/ast2600_openbmc_spl_emmc_defconfig +2
-0CONFIG_SYS_THUMB_BUILD=y +# CONFIG_SPL_USE_ARCH_MEMCPY is not set +# CONFIG_SPL_USE_ARCH_MEMSET is not set
Ack, sounds good.
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_BOARD_EARLY_INIT_F=y · line 55
Quoted 8 lines
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds" CONFIG_ARCH_ASPEED=y CONFIG_SYS_TEXT_BASE=0x10000@@ -51,6 +52,8 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_TPL_BANNER_PRINT is not set
Is this unrelated?
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_BOARD_EARLY_INIT_F=y · line 56
Quoted 1 line
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0+CONFIG_SPL_FIT_IMAGE_TINY=y
I am unsure about this one. I know that we *may* need that to secureboot, but we may loose good tracking of the image that was actually loaded in the fdt, which sounds like a desirable feature in secureboot scenarios, specially where we don't have a TPM for measurements.
I'd put that low on the priority list (i.e., below the ymodem support)?
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 135
Quoted 7 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-0CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y@@ -130,6 +133,7 @@ CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y # CONFIG_REGEX is not set
bikeshedding, but I'd recommend combining the necessary changes to make SPL fit the 64KB size in one patch, and enable the SPL signing in another patch in the same set, while leaving out unrelated / optional changes to another set.
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 136
Quoted 1 line
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0+CONFIG_SPL_TINY_MEMSET=y
ack
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 139
Quoted 3 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-0CONFIG_TPM=y CONFIG_SPL_TPM=y # CONFIG_EFI_LOADER is not set
Thanks,
-Klaus
Signature · 1 line
Klaus Heinrich Kiwi <[email protected]>
Joel Stanley
maintainerRe: [PATCH u-boot v2019.04-aspeed-openbmc v2 6/6] config: ast2600: Reduce SPL image size
Quoted 16 lines · Klaus Heinrich Kiwi
Hi Joel,
Quoted 4 lines · Joel Stanley
This modifies some features of the SPL to ensure it fits in the 64KB payload size.
This set of options reduceds the binary size by 4760 bytes with GCC 10.
typo here..
Quoted 5 lines
Signed-off-by Joel Stanley <[email protected]>--- configs/ast2600_openbmc_spl_emmc_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 11 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_ARM=y · line 5
Quoted 9 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-1@@ -2,8 +2,9 @@ CONFIG_ARM=y CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl" CONFIG_SYS_DCACHE_OFF=y CONFIG_POSITION_INDEPENDENT=y -CONFIG_SPL_SYS_THUMB_BUILD=yAre we sure this is reducing the size? From the
Kconfigfile.. "Thumb instruction set provides better code density"
This is a defconfing change only. We are still building with thumb; check the output .config.
Quoted 6 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_ARM=y · line 7
Quoted 4 lines
configs/ast2600_openbmc_spl_emmc_defconfig +2
-0CONFIG_SYS_THUMB_BUILD=y +# CONFIG_SPL_USE_ARCH_MEMCPY is not set +# CONFIG_SPL_USE_ARCH_MEMSET is not setAck, sounds good.
Quoted 9 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_BOARD_EARLY_INIT_F=y · line 55
Quoted 8 lines
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds" CONFIG_ARCH_ASPEED=y CONFIG_SYS_TEXT_BASE=0x10000@@ -51,6 +52,8 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_TPL_BANNER_PRINT is not setIs this unrelated?
Yes, this can be dropped.
Quoted 7 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_BOARD_EARLY_INIT_F=y · line 56
Quoted 2 lines
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0+CONFIG_SPL_FIT_IMAGE_TINY=yI am unsure about this one. I know that we *may* need that to secureboot, but we may loose good tracking of the image that was actually loaded in the fdt, which sounds like a desirable feature in secureboot scenarios, specially where we don't have a TPM for measurements.
I don't see any need in our design for updating the u-boot device tree with any information from the SPL. If we have that requirement in the future we can consider turning this code on.
Quoted 14 lines
I'd put that low on the priority list (i.e., below the ymodem support)?
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 135
Quoted 7 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-0CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y@@ -130,6 +133,7 @@ CONFIG_SYSRESET=y CONFIG_WDT=y CONFIG_USE_TINY_PRINTF=y # CONFIG_REGEX is not setbikeshedding, but I'd recommend combining the necessary changes to make SPL fit the 64KB size in one patch, and enable the SPL signing in another patch in the same set, while leaving out unrelated / optional changes to another set.
ok.
Quoted 14 lines
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 136
Quoted 2 lines
configs/ast2600_openbmc_spl_emmc_defconfig +1
-0+CONFIG_SPL_TINY_MEMSET=yack
configs/ast2600_openbmc_spl_emmc_defconfig CONFIG_SYSRESET=y · line 139
Quoted 3 lines
configs/ast2600_openbmc_spl_emmc_defconfig +0
-0CONFIG_TPM=y CONFIG_SPL_TPM=y # CONFIG_EFI_LOADER is not setThanks,
-Klaus
--
Klaus Heinrich Kiwi <[email protected]>
Quoted 10 lines · Joel Stanley
As part of our effort to enable secure boot in openbmc, this turns on FIT verification in the SPL and u-boot.
It adjusts the SRAM layout to accommodate the extra code size, moving the heap to the non-parity checked 24KB of SRAM.
It also modifies the way the SPL is built, including disabling features. This reduces the SPL size to 59716, meaning we could choose to leave ymodem support in the build for now. Please voice your thoughts when reviewing.
If we leave ymodem in, after signing we have 1536 bytes spare*.
I suggest we drop the patch disabling ymodem support so we don't have to build a separate SPL config if we want to recover.
Andrew
* Signing requires 512-byte alignment, and aligns the signed image size to a 512-byte boundary. So: (64×1024)−((59716+3656+(512−1))&(~(512−1))+512)