mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-29 16:48:59 +00:00

Used mmio* functions to read/write NVFLAGS registers to avoid possibile reordering of instructions by compiler. Change-Id: Iae50ac30e5413259cf8554f0fff47512ad83b0fd Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
27 lines
587 B
C
27 lines
587 B
C
/*
|
|
* Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <errno.h>
|
|
|
|
#include <arch_helpers.h>
|
|
#include <drivers/arm/sp805.h>
|
|
#include <plat/arm/common/plat_arm.h>
|
|
#include <platform_def.h>
|
|
|
|
/*
|
|
* Juno error handler
|
|
*/
|
|
void __dead2 plat_arm_error_handler(int err)
|
|
{
|
|
/* Propagate the err code in the NV-flags register */
|
|
mmio_write_32(V2M_SYS_NVFLAGS_ADDR, (uint32_t)err);
|
|
|
|
/* Setup the watchdog to reset the system as soon as possible */
|
|
sp805_refresh(ARM_SP805_TWDG_BASE, 1U);
|
|
|
|
for (;;)
|
|
wfi();
|
|
}
|