summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan O'Donoghue <[email protected]>2018-01-12 12:40:18 +0000
committerStefano Babic <[email protected]>2018-01-14 17:26:30 +0100
commit317956e82cbbd7819d4eb60aeaadafa9f7626339 (patch)
treeed428b23705c75ac8acc461cb2a044309dd2597a
parentaeae70fac5c9ca9b082222da513d5f287bda73c4 (diff)
arm: imx: hab: Implement hab_rvt_failsafe
This patch implements the basic callback hooks for hab_rvt_check_failsafe for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just do nothing and there's definitely a TODO to implement that extra functionality on the alternative BootROM API. Signed-off-by: Bryan O'Donoghue <[email protected]> Cc: Stefano Babic <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Albert Aribaud <[email protected]> Cc: Sven Ebenfeld <[email protected]> Cc: George McCollister <[email protected]> Cc: Breno Matheus Lima <[email protected]> Tested-by: Breno Lima <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
-rw-r--r--arch/arm/mach-imx/hab.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index d1c5f696815..1236717b3ec 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -70,6 +70,21 @@
((hab_rvt_exit_t *)HAB_RVT_EXIT) \
)
+static inline void hab_rvt_failsafe_new(void)
+{
+}
+
+#define hab_rvt_failsafe_p \
+( \
+ (is_mx6dqp()) ? \
+ ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \
+ (is_mx6dq() && (soc_rev() >= CHIP_REV_1_5)) ? \
+ ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \
+ (is_mx6sdl() && (soc_rev() >= CHIP_REV_1_2)) ? \
+ ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \
+ ((hab_rvt_failsafe_t *)HAB_RVT_FAILSAFE) \
+)
+
static inline enum hab_status hab_rvt_check_target_new(enum hab_target target,
const void *start,
size_t bytes)