refactor(cactus): use FFA_CONSOLE_LOG for debug logs
With the introduction of ffa_console_log abi, implementation-
defined debug logging is deprecated. Remove support for
SPM_DEBUG_LOG and use FFA_CONSOLE_LOG instead.
Also remove test for FFA_CONSOLE_LOG as it is now used as default
logger. Removing it cleans up test prints.
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: Ibe02e14105aaa1658153ba35a5fc8e852ae3f955
diff --git a/spm/common/sp_debug.c b/spm/common/sp_debug.c
index 2e67be3..9c91c56 100644
--- a/spm/common/sp_debug.c
+++ b/spm/common/sp_debug.c
@@ -7,6 +7,7 @@
#include <drivers/arm/pl011.h>
#include <drivers/console.h>
#include <ffa_helpers.h>
+#include <ffa_svc.h>
#include <sp_debug.h>
#include <spm_helpers.h>
@@ -14,18 +15,24 @@
static int putc_hypcall(int c)
{
- spm_debug_log((char)c);
+ hvc_args args = {
+ .fid = FFA_CONSOLE_LOG_SMC32,
+ .arg1 = 1,
+ .arg2 = c
+ };
+ (void)tftf_hvc(&args);
return c;
}
-
-static int putc_svccall(int c)
+static int putc_ffacall(int c)
{
struct ffa_value args = {
- .fid = SPM_DEBUG_LOG,
- .arg1 = c
+ .fid = FFA_CONSOLE_LOG_SMC32,
+ .arg1 = 1,
+ .arg2 = c
};
- ffa_svc(&args);
+
+ ffa_service_call(&args);
return c;
}
@@ -41,14 +48,12 @@
{
switch (route) {
- case HVC_CALL_AS_STDOUT:
+ case FFA_HVC_CALL_AS_STDOUT:
putc_impl = putc_hypcall;
return;
-
- case SVC_CALL_AS_STDOUT:
- putc_impl = putc_svccall;
+ case FFA_SVC_SMC_CALL_AS_STDOUT:
+ putc_impl = putc_ffacall;
return;
-
case PL011_AS_STDOUT:
default:
break;