Imre Kis | 2cfb2b4 | 2021-12-15 19:15:42 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: BSD-3-Clause |
| 2 | /* |
| 3 | * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #include "trace.h" |
Imre Kis | e56c7b1 | 2023-06-01 13:33:40 +0200 | [diff] [blame] | 7 | #include "ffa_api.h" |
| 8 | #include <string.h> |
Imre Kis | 2cfb2b4 | 2021-12-15 19:15:42 +0100 | [diff] [blame] | 9 | |
| 10 | #if TRACE_LEVEL >= TRACE_LEVEL_ERROR |
| 11 | |
| 12 | void trace_puts(const char *str) |
| 13 | { |
Imre Kis | e56c7b1 | 2023-06-01 13:33:40 +0200 | [diff] [blame] | 14 | size_t length = strlen(str); |
| 15 | size_t i = 0; |
Imre Kis | 2cfb2b4 | 2021-12-15 19:15:42 +0100 | [diff] [blame] | 16 | |
Imre Kis | e56c7b1 | 2023-06-01 13:33:40 +0200 | [diff] [blame] | 17 | for (i = 0; i < length; i += FFA_CONSOLE_LOG_64_MAX_LENGTH) { |
| 18 | ffa_console_log_64(&str[i], MIN(FFA_CONSOLE_LOG_64_MAX_LENGTH, |
| 19 | length - i)); |
| 20 | } |
Imre Kis | 2cfb2b4 | 2021-12-15 19:15:42 +0100 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | #endif /* TRACE_LEVEL >= TRACE_LEVEL_ERROR */ |