blob: 700b96cb1aa9fe3bc533061554f231df9a053b77 [file] [log] [blame]
Sathees Balya22576072018-09-03 17:41:13 +01001/*
Ambroise Vincentb237bca2019-02-13 15:58:00 +00002 * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
Sathees Balya22576072018-09-03 17:41:13 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Sathees Balya22576072018-09-03 17:41:13 +01007#include <errno.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008
9#include <arch_helpers.h>
Ambroise Vincentb237bca2019-02-13 15:58:00 +000010#include <plat/arm/common/plat_arm.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000011#include <plat/common/platform.h>
Antonio Nino Diaza320ecd2019-01-15 14:19:50 +000012#include <platform_def.h>
Sathees Balya22576072018-09-03 17:41:13 +010013
14/*
15 * Juno error handler
16 */
17void __dead2 plat_arm_error_handler(int err)
18{
19 uint32_t *flags_ptr = (uint32_t *)V2M_SYS_NVFLAGS_ADDR;
20
21 /* Propagate the err code in the NV-flags register */
22 *flags_ptr = err;
23
24 /* Loop until the watchdog resets the system */
25 for (;;)
26 wfi();
27}