LIB: Update secure partitions with new logging API
Change-Id: Ic4651000ac3c22f54f329d0e0aebb41ffb839b34
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
diff --git a/partitions/measured_boot/measured_boot_utils.c b/partitions/measured_boot/measured_boot_utils.c
index 4f13c31..e6f79e6 100644
--- a/partitions/measured_boot/measured_boot_utils.c
+++ b/partitions/measured_boot/measured_boot_utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Arm Limited. All rights reserved.
+ * SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -7,7 +7,7 @@
#include "measured_boot_utils.h"
#include "measured_boot_api.h"
-#include "tfm_sp_log.h"
+#include "tfm_log_unpriv.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
@@ -17,18 +17,18 @@
size_t i;
if (array == NULL || len == 0) {
- LOG_DBGFMT("\r\n");
+ VERBOSE_UNPRIV_RAW("\n");
} else {
for (i = 0; i < len; ++i) {
if (array[i] < 0x10) {
- LOG_DBGFMT(" 0%x", array[i]);
+ VERBOSE_UNPRIV_RAW(" 0%x", array[i]);
} else {
- LOG_DBGFMT(" %x", array[i]);
+ VERBOSE_UNPRIV_RAW(" %x", array[i]);
}
if ((i & 0xFu) == 0xFu) {
- LOG_DBGFMT("\r\n");
+ VERBOSE_UNPRIV_RAW("\n");
if (i < (len - 1)) {
- LOG_DBGFMT(" :");
+ VERBOSE_UNPRIV_RAW(" :");
}
}
}
@@ -58,16 +58,16 @@
uint8_t string_buf[((SW_TYPE_MAX_SIZE > VERSION_MAX_SIZE) ?
SW_TYPE_MAX_SIZE : VERSION_MAX_SIZE) + 1];
- LOG_DBGFMT("Measured Boot : store and extend measurement:\r\n");
- LOG_DBGFMT(" - slot : %u\r\n", index);
- LOG_DBGFMT(" - signer_id :");
+ VERBOSE_UNPRIV_RAW("Measured Boot : store and extend measurement:\n");
+ VERBOSE_UNPRIV_RAW(" - slot : %u\n", index);
+ VERBOSE_UNPRIV_RAW(" - signer_id :");
print_byte_array(signer_id, signer_id_size);
add_null_terminator(string_buf, version, version_size);
- LOG_DBGFMT(" - version : %s\r\n", string_buf);
- LOG_DBGFMT(" - algorithm : %x\r\n", measurement_algo);
+ VERBOSE_UNPRIV_RAW(" - version : %s\n", string_buf);
+ VERBOSE_UNPRIV_RAW(" - algorithm : %x\n", measurement_algo);
add_null_terminator(string_buf, sw_type, sw_type_size);
- LOG_DBGFMT(" - sw_type : %s\r\n", string_buf);
- LOG_DBGFMT(" - measurement :");
+ VERBOSE_UNPRIV_RAW(" - sw_type : %s\n", string_buf);
+ VERBOSE_UNPRIV_RAW(" - measurement :");
print_byte_array(measurement_value, measurement_value_size);
- LOG_DBGFMT(" - locking : %s\r\n", lock_measurement ? "true" : "false");
+ VERBOSE_UNPRIV_RAW(" - locking : %s\n", lock_measurement ? "true" : "false");
}