Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * SPDX-License-Identifier: BSD-3-Clause |
| 3 | * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. |
| 4 | */ |
| 5 | |
| 6 | #include <arch_helpers.h> |
| 7 | #include <assert.h> |
| 8 | #include <debug.h> |
| 9 | |
| 10 | void __assert(const char *file, int line, const char *expression) |
| 11 | { |
| 12 | ERROR("Assertion \"%s\" failed %s:%d\n", expression, file, line); |
| 13 | while (true) { |
| 14 | wfe(); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | void __assert_func(const char *file, int line, const char *func, const char *expression) |
| 19 | { |
| 20 | ERROR("Assertion \"%s\" failed %s:%d, %s\n", expression, file, line, func); |
| 21 | while (true) { |
| 22 | wfe(); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | |