]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(stm32mp1): add a check on TRUSTED_BOARD_BOOT with secure chip
authorLionel Debieve <lionel.debieve@foss.st.com>
Wed, 5 Oct 2022 14:52:09 +0000 (16:52 +0200)
committerLionel Debieve <lionel.debieve@foss.st.com>
Mon, 14 Nov 2022 10:25:01 +0000 (11:25 +0100)
Add a security check to enforce the usage of TRUSTED_BOARD_BOOT
on closed device. It will guarantee the secure bootchain.

Change-Id: Id6120d0e5041e8f2d3866e5710876ec96b6d0216
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
plat/st/stm32mp1/bl2_plat_setup.c

index 57efb80efbaa35b0e19dd5e13e4261b2bbfc1785..c64a618e262c550de08974baf928fd29fd79f280 100644 (file)
@@ -341,6 +341,14 @@ void bl2_el3_plat_arch_setup(void)
        }
 
 skip_console_init:
+#if !TRUSTED_BOARD_BOOT
+       if (stm32mp_is_closed_device()) {
+               /* Closed chip mandates authentication */
+               ERROR("Secure chip: TRUSTED_BOARD_BOOT must be enabled\n");
+               panic();
+       }
+#endif
+
        if (fixed_regulator_register() != 0) {
                panic();
        }