dd8e27881d92467e20281509339ea0ce1a45a98c
[project/bcm63xx/atf.git] / plat / arm / board / juno / juno_err.c
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 }