cancel
Showing results for 
Search instead for 
Did you mean: 

TF-A Exception on boot-up

user_ABCD
Associate II

I have a custom board built upon the stm32mp157f. (Therefore, have custom device trees.)

I currently am seeing an exception in TF-A that I cannot explain.

INFO:    Reset reason (0x14):
INFO:      Pad Reset from NRST
INFO:    PMIC version = 0x21
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe3000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using EMMC
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.4-r1.0(debug):v2.4-dirty
NOTICE:  BL2: Built : 16:43:51, Nov 17 2020
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000Khz
WARNING: Couldn't find property st,phy-cal in dtb
INFO:    Memory size = 0x20000000 (512 MB)
ASSERT: drivers/partition/gpt.c:24

After the initial flashing of the eMMC with the STMCubeProgrammer, it boots fine the first time. Every boot thereafter (cold or warm), I get the above exception.

Any idea what this means, how to debug or solve it?

1 ACCEPTED SOLUTION

Accepted Solutions

@user_ABCD​,

We maybe found an hypothesis that can explain why the eMMC is corrupted (a problem that we had in the past). Can you check your U-Boot env ?

If it is not defined in the GPT table, U-boot will use its own config (probably Kconfig) to find a place to save its configuration and he can corrupt the eMMC at this moment.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

15 REPLIES 15
Olivier GALLIEN
ST Employee

Hi @user_ABCD​ ,

Looks like you eMMC has not been properly programmed or can not be read by TF-A.

Could you please share the tsv you used + complete log of CubeProg + Console during programming ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I will have to get the logs next week when I can program a board. Below is my tsv, I don't use the extra partitions (bootfs,vendorfs,userfs) that OpenSTLinux uses.

0693W00000QKgaKQAT.png

@Community member​ 

Attached is a boot log and a programming log (verbosity level 2). Both seem identical to previous "good images" that don't have this issue.

Looks like this only allows me to add one file to a response.

Olivier GALLIEN
ST Employee

Hi @user_ABCD​ ,

Ok then assumption is a corruption of GPT partitioning at first boot.

Could you share the complete first boot trace on which you get linux prompt ?

Are you observing some filesystem decompression steps?

Once you get linux prompt, could you then try to access and check emmc partitioning ?

evaluate Linux file system size ?

Else fist time I see usage of single image.ext4 instead of legacy OSTL partitioning ?

What rational behind ?

May you have opportunity to try with the OSTL partitioning ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Erwan SZYMANSKI
ST Employee

Hello @user_ABCD​ ,

Indeed I do not see something strange in the first boot, moreover it seems to well write the GPT partition the first time.

As @Community member​ said, this specific assert means that TF-A is not able to read a null partition name on eMMC and so stop the boot.

Can you check at the first boot, when you are in Linux, if you can well find the GPT table with doing the following command: "gdisk -l /dev/mmcblk0" ?

This is just to check if the GPT table is still well known before making a reboot.

Then, I would advise to put some logs in TF-A drivers to see if we can print the different partitions name that it is able to find or not, with INFO(...) macro. It could be done in drivers/partition/gpt.c in both functions, "unicode_to_ascii()" and "parse_gpt_entry()".

It could also be interesting to have a trace in drivers/partition/partition.c in the function "verify_partition_gpt()" to check the number of partition that TF-A find (list.entry_count).

Maybe this information can be a first step for us to help at debug.

Kind regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Erwan SZYMANSKI​ 

0693W00000QLRhDQAX.pngThe issue appears to be that there is no "Name" on the bad image. On a good image, the "Name" appears as rootfs.

0693W00000QLRiGQAX.pngI am trying to follow some of the latest stuff on the ST Wiki. Is the PARTUUID possibly causing me issues? I have not used that in the past and unsure of the implications other than I am currently doing nothing with it.

From the ST Wiki - "The partition named "rootfs" has a specific PARTUUID."

STM32CubeProgrammer flashlayout - stm32mpu

@user_ABCD​ ,

As a first test, can you try to make your rootfs partition a System type instead of a Filesystem type ? I do not know if it as an impact on TF-A's reading capability but I just want to be sure before going further.

Regards.

Erwan

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Erwan SZYMANSKI​ 

I actually had previously tried that and it does not change anything.

The 'System' partition named "bootfs" is marked 'bootable'.

This is a statement from the wiki and it is unclear what actually makes something "bootable". Anyways, System and Filesystem create the same TF-A exception.