Log Hafnium's role in system
Function to log Hafnium's role in a system at initialization. It
can be Hypervisor or SPMC. Useful when skimming through the logs of
tests in which both are deployed.
Change-Id: I7ab2f89bc2fbd9fc563113b8190aa92e8f72390e
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/arch/aarch64/hypervisor/other_world.c b/src/arch/aarch64/hypervisor/other_world.c
index ebe94ca..a3fa12b 100644
--- a/src/arch/aarch64/hypervisor/other_world.c
+++ b/src/arch/aarch64/hypervisor/other_world.c
@@ -32,6 +32,15 @@
#endif
+void arch_other_world_log_init(void)
+{
+#if SECURE_WORLD == 0
+ dlog_info("Initializing Hafnium (Hypervisor)\n");
+#else
+ dlog_info("Initializing Hafnium (SPMC)\n");
+#endif
+}
+
void arch_other_world_init(void)
{
#if SECURE_WORLD == 0
diff --git a/src/arch/fake/hypervisor/other_world.c b/src/arch/fake/hypervisor/other_world.c
index c41e1d6..ebddb41 100644
--- a/src/arch/fake/hypervisor/other_world.c
+++ b/src/arch/fake/hypervisor/other_world.c
@@ -12,6 +12,11 @@
#include "hf/ffa.h"
#include "hf/ffa_internal.h"
+void arch_other_world_log_init(void)
+{
+ dlog_info("Initializing Hafnium\n");
+}
+
struct ffa_value arch_other_world_call(struct ffa_value args)
{
dlog_error("Attempted to call TEE function %#x\n", args.func);
diff --git a/src/init.c b/src/init.c
index a5b48ab..09d503e 100644
--- a/src/init.c
+++ b/src/init.c
@@ -48,7 +48,7 @@
/* Make sure the console is initialised before calling dlog. */
plat_console_init();
- dlog_notice("Initialising hafnium\n");
+ arch_other_world_log_init();
mpool_init(&ppool, MM_PPOOL_ENTRY_SIZE);
mpool_add_chunk(&ppool, ptable_buf, sizeof(ptable_buf));