mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00

Add a function fwu_get_alternate_boot_bank() to return a valid bank to boot from. This function can be called by a platform to get an alternate bank to try to boot the platform in the unlikely scenario of the active bank being in an invalid state, or if the number of times the platform boots in trial state exceeds a pre-set count. Change-Id: I4bcd88e68e334c452882255bf028e01b090369d1 Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
23 lines
491 B
C
23 lines
491 B
C
/*
|
|
* Copyright (c) 2021, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef FWU_H
|
|
#define FWU_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#define FWU_BANK_STATE_ACCEPTED 0xFCU
|
|
#define FWU_BANK_STATE_VALID 0xFEU
|
|
#define FWU_BANK_STATE_INVALID 0xFFU
|
|
|
|
#define INVALID_BOOT_IDX 0xFFFFFFFFU
|
|
|
|
void fwu_init(void);
|
|
uint32_t fwu_get_active_bank_state(void);
|
|
uint32_t fwu_get_alternate_boot_bank(void);
|
|
const struct fwu_metadata *fwu_get_metadata(void);
|
|
|
|
#endif /* FWU_H */
|