]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation
authorJonas Karlman <jonas@kwiboo.se>
Tue, 30 Apr 2024 15:30:13 +0000 (15:30 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 7 May 2024 07:56:08 +0000 (15:56 +0800)
The RK3399 SoC support the ARMv8 Cryptography Extensions, use of ARMv8
crypto can speed up FIT checksum validation in SPL.

Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto
extensions for SHA256 when validating checksum of FIT images.

Imply SPL_FIT_SIGNATURE and LEGACY_IMAGE_FORMAT to enable FIT checksum
validation to almost all RK3399 boards.

The following boards have been excluded:
- chromebook_bob: SPL max size limitation of 120 KiB
- chromebook_kevin: SPL max size limitation of 120 KiB

Also imply OF_LIVE to help speed up init of U-Boot proper and disable
CONFIG_SPL_RAW_IMAGE_SUPPORT on leez-rk3399 to ensure SPL does not try
to jump to code that failed checksum validation.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/Kconfig
configs/chromebook_bob_defconfig
configs/chromebook_kevin_defconfig
configs/leez-rk3399_defconfig
configs/puma-rk3399_defconfig
configs/rock-4se-rk3399_defconfig
configs/rock-pi-4-rk3399_defconfig
configs/rockpro64-rk3399_defconfig

index 20f1b7572a312051763b1025d887511e204c1dcd..7c0116da4921dc0090c256f97b60964b1c0a0493 100644 (file)
@@ -261,15 +261,20 @@ config ROCKCHIP_RK3399
        select DM_PMIC
        select DM_REGULATOR_FIXED
        select BOARD_LATE_INIT
+       imply ARMV8_CRYPTO
+       imply ARMV8_SET_SMPEN
        imply BOOTSTD_FULL
        imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+       imply LEGACY_IMAGE_FORMAT
        imply MISC
        imply MISC_INIT_R
+       imply OF_LIVE
        imply PARTITION_TYPE_GUID
        imply PRE_CONSOLE_BUFFER
        imply ROCKCHIP_COMMON_BOARD
        imply ROCKCHIP_EFUSE
        imply ROCKCHIP_SDRAM_COMMON
+       imply SPL_FIT_SIGNATURE
        imply SPL_ROCKCHIP_COMMON_BOARD
        imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
        imply TPL_CLK
index 805da11dbf6a3268a2d5403a6aa0c668a006f786..400b2d7ed7dec717d18732e07f173826e2c201db 100644 (file)
@@ -28,6 +28,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
index 8744152df61d8a23798ea2267326afcf32edb6a5..a881028cc7eba005c2531f828f35bcffde502dd3 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
index e5088341389ab2560f3923b23d973968f1d34c0b..2831cfb366895f5651ffaff5730b41ba11caca45 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-leez-p710.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
 CONFIG_SPL_PAD_TO=0x7f8000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
index bd4926cf0fcee4dc9fa7dce5ffb8388e72363c83..53fc62bf7e35403ff10abc287afab15e656d09d2 100644 (file)
@@ -42,7 +42,6 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIVE=y
 CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
index 712502517eb265e35d5f40d28f04d638ff842f67..04622df3c0a0b3516c697fab691b0820cf151f8b 100644 (file)
@@ -15,8 +15,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-4se.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
index 315b8b853fc334ede7e691870e033e8fb3da2ca5..9036c51de42153541ef997b799514fdf863c1644 100644 (file)
@@ -19,7 +19,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4a.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
index d66b4a9d8900a69c6d7033ad87f6b71308145f01..062477286708c6a4ee94fa21761ef71fcd4f9e22 100644 (file)
@@ -17,8 +17,6 @@ CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_USE_PREBOOT=y