diff options
Diffstat (limited to 'plat/arm/board/fvp/fvp_err.c')
-rw-r--r-- | plat/arm/board/fvp/fvp_err.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/plat/arm/board/fvp/fvp_err.c b/plat/arm/board/fvp/fvp_err.c index c9b20905f..1f9f0dd14 100644 --- a/plat/arm/board/fvp/fvp_err.c +++ b/plat/arm/board/fvp/fvp_err.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, Arm Limited. All rights reserved. + * Copyright (c) 2019-2021, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,7 @@ #include <common/debug.h> #include <drivers/arm/sp805.h> #include <drivers/cfi/v2m_flash.h> +#include <lib/mmio.h> #include <plat/arm/common/plat_arm.h> #include <platform_def.h> @@ -17,25 +18,8 @@ */ __dead2 void plat_arm_error_handler(int err) { - int ret; - - switch (err) { - case -ENOENT: - case -EAUTH: - /* Image load or authentication error. Erase the ToC */ - INFO("Erasing FIP ToC from flash...\n"); - (void)nor_unlock(PLAT_ARM_FIP_BASE); - ret = nor_word_program(PLAT_ARM_FIP_BASE, 0); - if (ret != 0) { - ERROR("Cannot erase ToC\n"); - } else { - INFO("Done\n"); - } - break; - default: - /* Unexpected error */ - break; - } + /* Propagate the err code in the NV-flags register */ + mmio_write_32(V2M_SYS_NVFLAGS_ADDR, (uint32_t)err); console_flush(); |