Page MenuHomePhabricator

imx8m does not start after EHF with S-EL2 SPMC change
Open, Needs TriagePublic

Description

I've tried to startup the imx8mm_evk target with latest upstream TF-A synced at commit 1309c6c80519 ("Merge changes from topic "fix_fip_in_emmc_boot" into integration"), but experienced the hang after TF-A initialization.

Following is the boot log that can be recorded until the hand occurs:

U-Boot SPL 2022.10-rc4-00052-g3d079881b7 (Sep 09 2022 - 16:44:52 +0200)
No pmic
SEC0:  RNG instantiated
Normal Boot
WDT:   Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from MMC1
NOTICE:  BL31: v2.7(release):v2.7.0-359-g1309c6c80
NOTICE:  BL31: Built : 14:42:36, Sep  9 2022

Bisecting into the tree, I was able to narrow it down to the offending commit with Change-Id: I72d4cf4d8ecc549a832d1c36055fbe95866747fe, which when reverted - allows the boot process to complete to U-Boot prompt.

I am not totally sure which part of the change caused such a hang. Can this be looked into by the author of the change to advise how this can be solved?

Event Timeline

zandrey created this task.Fri, Sep 9, 2:58 PM

Hi,
From the logs I understand BL31 is started by U-Boot SPL rather than TF-A's BL1/BL2, correct?
Would it be possible to gather more verbose logs (build with DEBUG=1 LOG_LEVEL=50) ?
Can you share the TF-A command line used to build this platform?
In particular what's the state of EL3_EXCEPTION_HANDLING, SPD, SPMD_SPM_AT_SEL2 toggles?
Thanks, Olivier.

zandrey added a comment.EditedSat, Sep 17, 7:34 PM

Hello Olivier,

Sorry, it took me some time to get the build and start-up logs. I was able to reproduce the issue also on imx8mp_lpddr4-evk platform.

Hi,
From the logs I understand BL31 is started by U-Boot SPL rather than TF-A's BL1/BL2, correct?

Yes, that is correct. BL31 is started directly from SPL.

Would it be possible to gather more verbose logs (build with DEBUG=1 LOG_LEVEL=50) ?

I was not able to launch the full debug build due to the size, but release build show the log attached to this message as [1].

Can you share the TF-A command line used to build this platform?

This is a simple make command targeting the imx8mp platform.

$ make V=1 LOG_LEVEL=50 PLAT=imx8mp bl31

Build log is attached here as [2]

GCC version used is:

$ aarch64-leica-linux-gcc --version
aarch64-leica-linux-gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

In particular what's the state of EL3_EXCEPTION_HANDLING, SPD, SPMD_SPM_AT_SEL2 toggles?

Sure, they are:

-DEL3_EXCEPTION_HANDLING=0
-DSPD_none
-DSPMD_SPM_AT_SEL2=1

Entire set of options can be seen in the build log file.

Please let me know if you need any additional info here!

Thanks, Olivier.

Thanks a lot!

  • andrey

Link: [1]:


Link: [2]:

odeprez added a comment.EditedThu, Sep 22, 11:22 AM

Thanks for your reply. Looks like there is a fix under works:

https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16815

Thanks Marco for digging.

Hello Olivier,

Thanks for your reply. Looks like there is a fix under works:

https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16815

That is indeed the change required to fix this issue! I've just posted a comment there that with a patch applied - the boot process proceeds as normal.

Thanks Marco for digging.

Thanks a lot to both of you!

Regards,
Andrey