diff options
author | Soby Mathew <soby.mathew@arm.com> | 2018-03-07 11:32:04 +0000 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2018-03-08 09:44:05 +0000 |
commit | 7b56928a122f4ba19b5f3d6b834590de2e82a978 (patch) | |
tree | ac94c4ff0449270294a78d5f9b08ba968927fbbf /plat/arm/board/juno/juno_err.c | |
parent | 74847ab203ca1801b450d32a61f3a3cb98adf83b (diff) |
Juno: Change the Firmware update detect mechanism
Previously, Juno used to depend on the SSC_GPRETN register to inform
about the reset syndrome. This method was removed when SCP migrated
to the SDS framework. But even the SDS framework doesn't report the
reset syndrome correctly and hence Juno failed to enter Firmware
update mode if BL2 authentication failed.
In addition to that, the error code populated in V2M_SYS_NVFLAGS register
does not seem to be retained any more on Juno across resets. This could
be down to the motherboard firmware not doing the necessary to preserve
the value.
Hence this patch modifies the Juno platform to use the same mechanism to
trigger firmware update as FVP which is to corrupt the FIP TOC on
authentication failure. The implementation in `fvp_err.c` is made common
for ARM platforms and is moved to the new `arm_err.c` file in
plat/arm/common folder. The BL1 and BL2 mmap table entries for Juno
are modified to allow write to the Flash memory address.
Change-Id: Ica7d49a3e8a46a90efd4cf340f19fda3b549e945
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'plat/arm/board/juno/juno_err.c')
-rw-r--r-- | plat/arm/board/juno/juno_err.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/plat/arm/board/juno/juno_err.c b/plat/arm/board/juno/juno_err.c deleted file mode 100644 index 0fe70167..00000000 --- a/plat/arm/board/juno/juno_err.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include <arch_helpers.h> -#include <errno.h> -#include <platform.h> -#include <v2m_def.h> - -#define V2M_SYS_NVFLAGS_ADDR (V2M_SYSREGS_BASE + V2M_SYS_NVFLAGS) - -/* - * Juno error handler - */ -void plat_error_handler(int err) -{ - uint32_t *flags_ptr = (uint32_t *)V2M_SYS_NVFLAGS_ADDR; - - /* Propagate the err code in the NV-flags register */ - *flags_ptr = err; - - /* Loop until the watchdog resets the system */ - for (;;) - wfi(); -} |