1From d6ee50f581b43b16733b8731369b071d609d5048 Mon Sep 17 00:00:00 2001
2From: Emekcan Aras <emekcan.aras@arm.com>
3Date: Thu, 31 Aug 2023 10:51:54 +0100
4Subject: [PATCH] Handle logging syscall
5
6Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
7Upstream-Status: Pending [upstreamed differently in 280b6a3]
8---
9 core/arch/arm/kernel/spmc_sp_handler.c | 7 ++++++-
10 1 file changed, 6 insertions(+), 1 deletion(-)
11
12diff --git a/core/arch/arm/kernel/spmc_sp_handler.c b/core/arch/arm/kernel/spmc_sp_handler.c
13index 1f218a0df..0676e8898 100644
14--- a/core/arch/arm/kernel/spmc_sp_handler.c
15+++ b/core/arch/arm/kernel/spmc_sp_handler.c
16@@ -1276,7 +1276,12 @@ void spmc_sp_msg_handler(struct thread_smc_args *args,
17 			handle_console_log(args);
18 			sp_enter(args, caller_sp);
19 			break;
20-
21+		case 0xdeadbeef:
22+			ts_push_current_session(&caller_sp->ts_sess);
23+			IMSG("%s", (char *)args->a1);
24+			ts_pop_current_session();
25+			sp_enter(args, caller_sp);
26+			break;
27 		default:
28 			EMSG("Unhandled FFA function ID %#"PRIx32,
29 			     (uint32_t)args->a0);
30--
312.17.1
32
33