From ab07a26290e44fb198403b658b8f1550e959a0cc Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Mon, 27 Feb 2023 14:40:13 +0000 Subject: [PATCH 41/42] corstone1000: boot index from active In our platform, the Secure Enclave is the one who control all the boot tries and status, so, every time we get here we know that the we are booting from the active index. Upstream-Status: Pending Signed-off-by: Rui Miguel Silva --- board/armltd/corstone1000/corstone1000.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index b767195ccc..db508ac3cb 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -118,7 +118,18 @@ int dram_init_banksize(void) void fwu_plat_get_bootidx(int *boot_idx) { - *boot_idx = corstone1000_boot_idx; + int ret; + + /* + * in our platform, the Secure Enclave is the one who control + * all the boot tries and status, so, every time we get here + * we know that the we are booting from the active index + */ + ret = fwu_get_active_index(boot_idx); + if (ret < 0) + log_err("corstone1000: failed to read active index\n"); + + return ret; } int board_late_init(void) -- 2.25.1