cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP15 ECO 5.0.0. kernel halts after Secondary CPU 1 switching to normal world boot

debugging
Lead

Custom board. Boot log as below

extlinux.conf:

MENU BACKGROUND /splash_landscape.bmp
TIMEOUT 20
LABEL OpenSTLinux
KERNEL /uImage
FDTDIR /
INITRD /st-image-resize-initrd
APPEND root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=${console},${baudrate} dyndbg="file drivers/usb/core/hub.c +p"

adding the dyndbg following: https://wiki.st.com/stm32mpu/wiki/How_to_use_the_kernel_dynamic_debug#Debug_messages_during_boot_process

ums 0 mmc 0

Did not show /media/$USER/bootfs.

Any hints/ideas/suggestion to (enable) debug the root cause?

the dt of u-boot is the same as for the kernel.

The kernel uImage and DT blob were copied to bootfs.

The rootfs /lib/modules was also updated, probably not needed as the  SD card was created with the files and tools of the starter package in ECO 5.0.0. and modules were not changed.

U-Boot 2022.10-stm32mp-r1 (Oct 06 2023 - 20:22:10 +0800)

CPU: STM32MP157AAA Rev.B
Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
DRAM: 512 MiB
Core: 67 devices, 28 uclasses, devicetree: board
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:8...
Found /mmc0_extlinux/extlinux.conf
Retrieving file: /mmc0_extlinux/extlinux.conf
Retrieving file: /splash_landscape.bmp
1: OpenSTLinux
Enter choice: 1: OpenSTLinux
Retrieving file: /uImage
Retrieving file: /st-image-resize-initrd
append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
Retrieving file: /stm32mp157a-board-mx.dtb
## Booting kernel from Legacy Image at c2000000 ...
Image Name: Linux-6.1.28
Created: 2023-10-05 15:40:50 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 7762200 Bytes = 7.4 MiB
Load Address: c2000040
Entry Point: c2000040
Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
Booting using the fdt blob at 0xc4000000
XIP Kernel Image
Loading Ramdisk to cfa0c000, end cffffcd7 ... OK
Loading Device Tree to cf9f8000, end cfa0b977 ... OK

Starting kernel ...

I/TC: Secondary CI/TC: Secondary CPU 1 switching to normal world boot

 

1 ACCEPTED SOLUTION
8 REPLIES 8

Based on the above, you haven't enabled earlyprintk yet? Requires to build the kernel with the following options selected.

Symbol: DEBUG_LL
Depends on: DEBUG_KERNEL
Location:
-> Kernel hacking
-> arm Debugging
[*] Kernel low-level debugging functions

Symbol: STM32MP1_DEBUG_UART
Location:
-> Kernel hacking
-> arm Debugging
[*] Kernel low-level debugging functions
[*] Kernel low-level debugging port
(X) Use STM32MP1 UART for low-level debug

Symbol: EARLY_PRINTK
Depends on: DEBUG_LL
Location:
-> Kernel hacking
-> arm Debugging
[*] Kernel low-level debugging functions
[*] Early printk

Then alter extlinux.conf (found on the bootfs) to include earlyprintk fe.
root=/dev/mmcblk0p6 rootwait rw earlyprintk console=ttySTM0,115200`

debugging
Lead

I used

root= .....   rootwait rw console=ttySTM0,115200 loglevel=5  

 but nothing shown

Never used that loglevel=... but earlyprintk so far always showed something if nothing happens passed 'starting kernel'.

Can you share dt? Unlikely, but maybe i'll notice something off...

If you share the uImage I can try to boot with it here, proc is the same family so it 'should' work. That could atleast rule the uImage out (or point to it).

Added:

ums 0 mmc 0

Did not show /media/$USER/bootfs

  • The media thing only happens if the os mounts the partition. (doesn't always happen automatically)
  • Needs a working usb connection for it (so dmesg might show if something happened)
  • Other option is to check with lsblk before and after (on the computer with the terminal) to see what is added and mount those manually.

 

debugging
Lead

Thanks that worked ~ So I am now at the next problem :)

 

debugging
Lead

Found a message that a "cut here" is a kernel bug and should be reported.. Here it is

The flags 0x1c06 seem to relate to the DFSR: Data Fault Status Register, ad that seems to mean a memory access violation.

I don't hope this is another (UART) bug in ST code. (well actually yes, then there should be a solution) :)

 
I wonder if this AMBA driver is correct, but in config I selected the STM32MP1 type for debug.
 
[    0.286463] Unhandled fault: imprecise external abort (0x1c06) at 0x96628f78

0.249626] Serial: AMBA PL011 UART driver
[ 0.256773] stm32-pm-domain pm_domain: domain core-ret-power-domain registered
[ 0.264136] stm32-pm-domain pm_domain: subdomain core-power-domain registered
[ 0.271315] stm32-pm-domain pm_domain: domains probed
[ 0.283372] 8<--- cut here ---
[ 0.286463] Unhandled fault: imprecise external abort (0x1c06) at 0x96628f78
[ 0.293552] [96628f78] *pgd=00000000
[ 0.297163] Internal error: : 1c06 [#1] PREEMPT SMP ARM
[ 0.302421] Modules linked in:
[ 0.305497] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.28 #2
[ 0.311454] Hardware name: STM32 (Device Tree Support)
[ 0.316616] PC is at _raw_spin_unlock_irqrestore+0xc/0x4c
[ 0.322060] LR is at clk_gate_enable+0xc/0x14
[ 0.326449] pc : [<c0c428bc>] lr : [<c060cf1c>] psr: a0000093
[ 0.332750] sp : dd815b40 ip : 00000000 fp : c18cecc0
[ 0.338004] r10: c18cec40 r9 : ffffffff r8 : c10022ec
[ 0.343255] r7 : 00000000 r6 : c1328640 r5 : 00000000 r4 : c18cfb40
[ 0.349818] r3 : 00000000 r2 : dd875094 r1 : a0000093 r0 : c137797c
[ 0.356381] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 0.363645] Control: 10c5387d Table: c000406a DAC: 00000051
[ 0.369417] Register r0 information: non-slab/vmalloc memory
[ 0.375113] Register r1 information: non-paged memory
[ 0.380194] Register r2 information: 0-page vmalloc region starting at 0xdd875000 allocated at stm32mp1_rcc_init+0x1c/0x1a4
[ 0.391407] Register r3 information: NULL pointer
[ 0.396139] Register r4 information: slab kmalloc-192 start c18cfb40 pointer offset 0 size 192
[ 0.404829] Register r5 information: NULL pointer
[ 0.409561] Register r6 information: non-slab/vmalloc memory
[ 0.415254] Register r7 information: NULL pointer
[ 0.419984] Register r8 information: non-slab/vmalloc memory
[ 0.425674] Register r9 information: non-paged memory
[ 0.430755] Register r10 information: slab kmalloc-128 start c18cec00 pointer offset 64 size 128
[ 0.439614] Register r11 information: slab kmalloc-128 start c18cec80 pointer offset 64 size 128
[ 0.448473] Register r12 information: NULL pointer

Now the question is if this bug has been fixed in mainline already...

debugging
Lead

Copied the uImage from the starter package to the SD card bootfs and also that stops after

I/TC: Secondary CI/TC: Secondary CPU 1 switching to normal world boot

Either the Linux dtb has an issue or it's somewhere upstream in u-boot, TF-A or OP-TEE...