Hi Sir,
Printing a log message to UART inresume_bl31 causes the Linux kernel to fail to resume.
static void resume_bl31(struct s32g_ssram_mailbox *ssram_mb)
{
...
if (ddrss_to_normal_mode(csr_addr)) {
ERROR("Failed to transition DDR to normal mode\n");
panic();
}
NOTICE("Print some debug messages here!\n");
isb();
dsb();
disable_mmu_el3();
resume_entrypoint();
}
Best regards,
Jeff Huang
Solved! Go to Solution.
Hello, @Jeff-CF-Huang
Thanks for your reply.
I have checked the code and found you had put the print message after "ddrss_to_normal_mode", since DDR mod changed via executing the function, the buffer of the Notice macro may possibly impacted by the changes, thus caused the issue.
I suggest not putting your debug messages there and try putting it before the DDR state changes, which should work for print debug messages.
BR
Chenyin
Hello, @Jeff-CF-Huang
Thanks for your post.
1. May I know which version BSP is used? Is it based on S32G2/3? on a custom board or RDB?
2. The issue could be reproduced from STR operation?
BR
Chenyin
Hello, @Jeff-CF-Huang
Thanks for your reply.
I had checked the code you mentioned, seems at the stage you pointed, the console had not been registered from default BSP's perspective, which may be the reason for the issue you met, may I know if you had done any modification regarding to code of the console part?
BR
Chenyin
Hi Chenyin,
The other log message can appear if it is located far from the wakeup_resume_point of the Linux kernel.
void bl2_el3_early_platform_setup(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
{
enum reset_cause reset_cause;
struct s32g_ssram_mailbox *ssram_mb = (void *)BL31SSRAM_MAILBOX;
...
s32_early_plat_init();
console_s32_register();
NOTICE("Reset status: %s\n", get_reset_cause_str(reset_cause));
if (reset_cause == CAUSE_WAKEUP_DURING_STANDBY) {
/* Trampoline to bl31_warm_entrypoint */
resume_bl31(ssram_mb);
panic();
}
...
Hello, @Jeff-CF-Huang
Thanks for the reply.
I have mentioned that the console had been initialized in your code samples, then I will investigate it directly on my board.
May I know you tested it on a S32G2 or S32G3 board?
B R
Chenyin
S32G3 board
Hello, @Jeff-CF-Huang
Thanks for your reply.
I have checked the code and found you had put the print message after "ddrss_to_normal_mode", since DDR mod changed via executing the function, the buffer of the Notice macro may possibly impacted by the changes, thus caused the issue.
I suggest not putting your debug messages there and try putting it before the DDR state changes, which should work for print debug messages.
BR
Chenyin