Remove OP-TEE dependency on trace functions
Introducing a custom trace component which replaces the one that comes
from the SP dev kit. The new component provides the same DMSG, IMSG,
EMSG macros for printing trace messages with different levels.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I5f9466c5a32fefeb9ef350b179dc22ee33324f7e
diff --git a/environments/opteesp/sp_trace.c b/environments/opteesp/sp_trace.c
new file mode 100644
index 0000000..6ac0ddc
--- /dev/null
+++ b/environments/opteesp/sp_trace.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ */
+
+#include "trace.h"
+#include "ffa_internal_api.h"
+
+#if TRACE_LEVEL >= TRACE_LEVEL_ERROR
+
+void trace_puts(const char *str)
+{
+ struct ffa_params resp;
+
+ ffa_svc(0xdeadbeef, (uintptr_t)str, 0, 0, 0, 0, 0, 0, &resp);
+}
+
+#endif /* TRACE_LEVEL >= TRACE_LEVEL_ERROR */