xref: /rk3399_ARM-atf/plat/arm/board/juno/juno_err.c (revision c3cf06f1a3a9b9ee8ac7a0ae505f95c45f7dca84)
1 /*
2  * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <arch_helpers.h>
8 #include <errno.h>
9 #include <platform.h>
10 #include <v2m_def.h>
11 
12 /*
13  * Juno error handler
14  */
15 void __dead2 plat_arm_error_handler(int err)
16 {
17 	uint32_t *flags_ptr = (uint32_t *)V2M_SYS_NVFLAGS_ADDR;
18 
19 	/* Propagate the err code in the NV-flags register */
20 	*flags_ptr = err;
21 
22 	/* Loop until the watchdog resets the system */
23 	for (;;)
24 		wfi();
25 }
26