test(spm): use ffa_helpers for ivy partition

Allow the ivy partition to use the ffa_helpers functions.

To achieve this we create a common struct for ff-a calls that is
used for both parameters and returns, this aligns with the Hafnium
implementation. We can then use preprocessor macros to pick either
SMC or SVC as the conduit depending on the exception level the SP
is running at.

Change-Id: Ic9525baabcf40d15545b6f6d504cf954373f08f9
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
diff --git a/spm/common/sp_debug.c b/spm/common/sp_debug.c
index 396253b..2e67be3 100644
--- a/spm/common/sp_debug.c
+++ b/spm/common/sp_debug.c
@@ -1,13 +1,13 @@
 /*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
 #include <drivers/arm/pl011.h>
 #include <drivers/console.h>
+#include <ffa_helpers.h>
 #include <sp_debug.h>
-#include <sp_helpers.h>
 #include <spm_helpers.h>
 
 static int (*putc_impl)(int);
@@ -21,12 +21,11 @@
 
 static int putc_svccall(int c)
 {
-	/* TODO svc call */
-	svc_args args = {
+	struct ffa_value args = {
 		.fid = SPM_DEBUG_LOG,
 		.arg1 = c
 	};
-	sp_svc(&args);
+	ffa_svc(&args);
 
 	return c;
 }