diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2023-06-12 11:09:18 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-19 21:34:16 +0300 |
commit | bc91ca4b8bcb2d6d6ce6b04b7814bbbdf47374fe (patch) | |
tree | c3a83bc93a65129ee11da935f3ba8725a3709ff2 /board/armltd | |
parent | b3870dd4929758f99b630ee0a64ff517fdc6d6d0 (diff) | |
download | u-boot-bc91ca4b8bcb2d6d6ce6b04b7814bbbdf47374fe.tar.xz |
corstone1000: add boot index
it is expected that the firmware that runs before
u-boot somehow provide the information of the bank
for now we will fetch the info from the metadata
since the Secure enclave is the one responsible for
this information.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Diffstat (limited to 'board/armltd')
-rw-r--r-- | board/armltd/corstone1000/corstone1000.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index 6ec8e6144f..1bead7a0a8 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -8,6 +8,8 @@ #include <common.h> #include <cpu_func.h> #include <dm.h> +#include <env.h> +#include <env.h> #include <netdev.h> #include <dm/platform_data/serial_pl01x.h> #include <asm/armv8/mmu.h> @@ -87,6 +89,20 @@ int dram_init_banksize(void) return 0; } -void reset_cpu(void) +void fwu_plat_get_bootidx(uint *boot_idx) { + int ret; + + /* + * in our platform, the Secure Enclave is the one who controls + * 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) { + *boot_idx = CONFIG_FWU_NUM_BANKS; + log_err("corstone1000: failed to read active index\n"); + } + + return ret; } |