diff options
author | Siew Chin Lim <elly.siew.chin.lim@intel.com> | 2021-03-22 13:04:52 +0300 |
---|---|---|
committer | Ley Foon Tan <ley.foon.tan@intel.com> | 2021-03-23 09:46:35 +0300 |
commit | 2dbcc037ccf3a16a2a0225133f8721b87ae7fffb (patch) | |
tree | 62e83490e5f24906cf0d36450e0e222b66a76f6f /arch/arm/mach-socfpga | |
parent | 1f9c3f13f6ad8595a0fb5ab2cb830583cdc0b60a (diff) | |
download | u-boot-2dbcc037ccf3a16a2a0225133f8721b87ae7fffb.tar.xz |
arm: socfpga: Only do 'is OS booted from FIT' checking when VAB is enabled
Check CONFIG_SOCFPGA_SECURE_VAB_AUTH before perform 'is OS booted from FIT'
checking in board_prep_linux function. And, fix typo of
CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE.
CONFIG_FIT will be enabled in both ATF and VAB boot flow, thus,
board_prep_linux function will always be called by both ATF and
VAB boot flow.
board_pre_linux function will do 'is OS booted from FIT' checking,
and it will be called before board_fit_image_post_process function.
VAB boot flow expects the OS is always booted from FIT and with VAB
signed cerfiticate because the VAB authentication is implemented in
board_fit_image_post_process function. So, VAB needs the 'is OS booted
from FIT' checking in board_pre_linux function.
However, for ATF boot flow, it is not a requirement that the OS must
always booted from FIT. The OS can be booted from individual Image and
kernel dtb file. Thus, we should not do 'if OS is booted from FIT'
checking in board_prep_linux function.
Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Diffstat (limited to 'arch/arm/mach-socfpga')
-rw-r--r-- | arch/arm/mach-socfpga/board.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 81aa07c902..650122fcd4 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -115,7 +115,8 @@ void board_fit_image_post_process(void **p_image, size_t *p_size) #if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_FIT) void board_prep_linux(bootm_headers_t *images) { - if (!IS_ENABLED(CONFIG_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) { + if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH) && + !IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) { /* * Ensure the OS is always booted from FIT and with * VAB signed certificate |