blob: 37077d4d8d212b0367730b48951acc43a343f8f6 [file] [log] [blame]
Jiafei Pan46367ad2018-03-02 07:23:30 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Jiafei Pan46367ad2018-03-02 07:23:30 +00007#include <errno.h>
8#include <stdint.h>
9
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <arch_helpers.h>
11#include <common/debug.h>
12
Jiafei Pan46367ad2018-03-02 07:23:30 +000013/*
14 * Error handler
15 */
16void plat_error_handler(int err)
17{
18 switch (err) {
19 case -ENOENT:
20 case -EAUTH:
21 /* ToDo */
22 break;
23 default:
24 /* Unexpected error */
25 break;
26 }
27
28 /* Loop until the watchdog resets the system */
29 for (;;)
30 wfi();
31}