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 | |
| 7 | #include <arch_helpers.h> |
| 8 | #include <debug.h> |
| 9 | #include <errno.h> |
| 10 | #include <stdint.h> |
| 11 | |
| 12 | /* |
| 13 | * Error handler |
| 14 | */ |
| 15 | void plat_error_handler(int err) |
| 16 | { |
| 17 | switch (err) { |
| 18 | case -ENOENT: |
| 19 | case -EAUTH: |
| 20 | /* ToDo */ |
| 21 | break; |
| 22 | default: |
| 23 | /* Unexpected error */ |
| 24 | break; |
| 25 | } |
| 26 | |
| 27 | /* Loop until the watchdog resets the system */ |
| 28 | for (;;) |
| 29 | wfi(); |
| 30 | } |