Jiafei Pan | 46367ad | 2018-03-02 07:23:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Jiafei Pan | 46367ad | 2018-03-02 07:23:30 +0000 | [diff] [blame] | 7 | #include <errno.h> |
| 8 | #include <stdint.h> |
| 9 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <arch_helpers.h> |
| 11 | #include <common/debug.h> |
| 12 | |
Jiafei Pan | 46367ad | 2018-03-02 07:23:30 +0000 | [diff] [blame] | 13 | /* |
| 14 | * Error handler |
| 15 | */ |
| 16 | void 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 | } |