How to print log in BL31?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to print log in BL31?

760 Views
ssong
Contributor II

Hello.

I´m working with the S32R45 chip using YOCTO.

and i'm modifying ATF(arm trusted firmware).

 

BL31 of ATF not print log anything, but BL2 does.

I can see BL2 log, followed u-boot log.

BL2 and BL31 uses same print function(used "ERROR()" macro function), and i'm not modify relative configurtation.

BSP version is 32.

 

How to I see BL31 log?

 

0 Kudos
Reply
2 Replies

292 Views
zhongchao
Contributor I
From 1ceadfc50d0c19d2ad5c8bf8917129e9dc115b9f Mon Sep 17 00:00:00 2001
From: "zhongchao.wang" <zhongchao.wang@nio.com>
Date: Mon, 10 Jun 2024 10:11:24 +0800
Subject: [PATCH 17/17] add some logs

---
Makefile | 2 +-
lib/psci/psci_main.c | 1 +
plat/nxp/s32/s32_bl31.c | 4 ++--
plat/nxp/s32/s32_common.mk | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index e7194a73f..094d2e5a7 100644
--- a/Makefile
+++ b/Makefile
@@ -305,7 +305,7 @@ ifneq (${DEBUG}, 0)
else
BUILD_TYPE := release
# Use LOG_LEVEL_NOTICE by default for release builds
- LOG_LEVEL := 20
+ LOG_LEVEL := 40
endif
 
# Default build string (git branch and commit)
diff --git a/lib/psci/psci_main.c b/lib/psci/psci_main.c
index 52a8b8a18..b98bbbc8a 100644
--- a/lib/psci/psci_main.c
+++ b/lib/psci/psci_main.c
@@ -490,6 +490,7 @@ u_register_t psci_smc_handler(uint32_t smc_fid,
break;
 
case PSCI_CPU_ON_AARCH64:
+ WARN("BL31: PSCI_CPU_ON_AARCH64 cpu:0x%x\n", (unsigned int)x1);
ret = (u_register_t)psci_cpu_on(x1, x2, x3);
break;
 
diff --git a/plat/nxp/s32/s32_bl31.c b/plat/nxp/s32/s32_bl31.c
index b1d89fe6f..36ba8dcad 100644
--- a/plat/nxp/s32/s32_bl31.c
+++ b/plat/nxp/s32/s32_bl31.c
@@ -475,9 +475,9 @@ void bl31_plat_arch_setup(void)
s32_smp_fixup();
s32_el3_mmu_fixup();
 
-#if (S32_USE_LINFLEX_IN_BL31 == 1)
+// #if (S32_USE_LINFLEX_IN_BL31 == 1)
console_s32_register();
-#endif
+// #endif
 
#if defined(HSE_SECBOOT) && defined(SPD_opteed)
s32_add_hse_irqs();
diff --git a/plat/nxp/s32/s32_common.mk b/plat/nxp/s32/s32_common.mk
index 4937b6a37..22c730975 100644
--- a/plat/nxp/s32/s32_common.mk
+++ b/plat/nxp/s32/s32_common.mk
@@ -174,7 +174,7 @@ LOG_LEVEL ?= 50
# there is no hardware lock to prevent concurrent access to the device. For now,
# opt to suppress output (except for crash reporting). For debugging and other
# similarly safe contexts, output can be turned back on using this switch.
-S32_USE_LINFLEX_IN_BL31 ?= 0
+S32_USE_LINFLEX_IN_BL31 ?= 1
$(eval $(call add_define_val,S32_USE_LINFLEX_IN_BL31,$(S32_USE_LINFLEX_IN_BL31)))
 
# Whether we're going to run a hypervisor (EL2) or jump straight into the
--
2.25.1
========================================================================
the log will print  when kernel up cpu
WARNING: BL31: PSCI_CPU_ON_AARCH64 cpu:0x1
NOTICE: S32 TF-A: s32_pwr_domain_on: booting up core 1 (4)


0 Kudos
Reply

744 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

This is just a Linux question. I have asked for help here our application team.

Once they have a time they will reply here.

Best regards,

Peter

0 Kudos
Reply