aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ext/accelerator/cc312/cc312_log.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/platform/ext/accelerator/cc312/cc312_log.c b/platform/ext/accelerator/cc312/cc312_log.c
index de73c664a..694e9eeb1 100644
--- a/platform/ext/accelerator/cc312/cc312_log.c
+++ b/platform/ext/accelerator/cc312/cc312_log.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -24,22 +24,23 @@ void CC_PalLogInit(void){}
void CC_PalLog(int level, const char* format, ...)
{
- char buf[CC312_LOG_BUF_SIZE] = {0};
- va_list args;
- int format_len = strlen(format);
+ (void) level;
- if (format_len + 2 > CC312_LOG_BUF_SIZE)
- {
- printf("CC312 logging error: Message too long\r\n");
- return;
- }
+ char buf[CC312_LOG_BUF_SIZE] = {0};
+ va_list args;
+ size_t format_len = strlen(format);
+ if (format_len + 2 > CC312_LOG_BUF_SIZE) {
+ printf("CC312 logging error: Message too long\r\n");
+ return;
+ }
- va_start(args, format);
+ va_start(args, format);
- /* CC312 lib doesn't insert CR characters so it's done here */
- strcpy(buf, format);
- buf[format_len] = '\r';
+ /* CC312 lib doesn't insert CR characters, so it's done here */
+ strcpy(buf, format);
+ buf[format_len] = '\r';
- vprintf(buf, args);
+ // TODO: replace with print function that works at higher isolation levels
+ vprintf(buf, args);
}