cancel
Showing results for 
Search instead for 
Did you mean: 

Bootstage space exhausted in stm32mp1

ahamod3.1416
Associate II

Hello everyone,

we have developed a custom board based on stm32mp157 chip. We have also forked the tf-a, optee, u-boot and linux-kernel from meta-st-stm32mp layer. We have the following configuration for the tf-a and u-boot.

 

 

NOTICE:  CPU: STM32MP157CAA Rev.Z
NOTICE:  Model: emtrion DIMM-Argon stm32mp157c, yocto, SDCARD
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.6-stm32mp1-r2.0(debug):v2.6-dirty(a1f02f4f)
NOTICE:  BL2: Built : 13:14:26, Nov 23 2021
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000kHz
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0x2ffff000
INFO:    Image id=1 loaded: 0x2ffff000 - 0x2ffff226
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x2ffc5000
INFO:    Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820
INFO:    BL2: Skip loading image id 8
INFO:    BL2: Skip loading image id 9
INFO:    BL2: Loading image id 2
INFO:    Loading image id=2 at address 0xc0500000
INFO:    Image id=2 loaded: 0xc0500000 - 0xc0512fe0
INFO:    BL2: Loading image id 16
INFO:    Loading image id=16 at address 0x2ffc0000
INFO:    Image id=16 loaded: 0x2ffc0000 - 0x2ffc3ef9
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01ece78
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffc5000
INFO:    SPSR = 0x1d3
NOTICE:  SP_MIN: v2.6-stm32mp1-r2.0(debug):v2.6-dirty(a1f02f4f)
NOTICE:  SP_MIN: Built : 13:14:26, Nov 23 2021
INFO:    ARM GICv2 driver initialized
INFO:    SP_MIN: Initializing runtime services
INFO:    SP_MIN: Preparing exit to normal world
serial_stm32 serial@40018000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19


U-Boot 2021.10-stm32mp-r2 (Sep 18 2024 - 10:36:49 +0000)

CPU: STM32MP157CAA Rev.Z
Model: emtrion DIMM-Argon, sdcard, yocto
Board: stm32mp1 in trusted mode (st,stm32mp157c-dimm-stm32mp157caa3-mx)
DRAM:  512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT:   Not found!
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0 

 

 

 

We are using sd card for booting. We are able to boot through tf.-a and u-boot, and when it tries to boot through kernel it give following error:

 

 

 

Boot over mmc0!
Saving Environment to MMC... Writing to redundant MMC(0)... OK
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:7...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@58005000.blk...
Scanning disk mmc@58007000.blk...
Found 18 disks
No EFI system partition
ETZPC: 0x5a003000 node disabled, decprot 10=1
BootOrder not defined
EFI boot manager: Cannot load any image

 

 

 But if I ignore the error and load the fitImage using ext4load command and try to boot the kernel using bootargs. It does not boot and linux kernel stucks. it does not reset. It stucks there for inifinte time. In Ethernet port port I can see LEDs are blinking (As I add ethernet functionality in Linux device tree). I have following information after loading the image to kernel addr:

 

 

 

Loading kernel from FIT Image at c2000000 ...
   Using 'conf-stm32mp157c-dimm-argon.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Created:      2024-09-17   8:04:17 UTC
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0xc2000104
     Data Size:    7908568 Bytes = 7.5 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0xc0800000
     Entry Point:  0xc0800000
     Hash algo:    sha256
     Hash value:   b24fe6e760c667e0b9b43ab76e3c6396bd996065ca709fb04a09f1acbf78875d
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at c2000000 ...
   Using 'conf-stm32mp157c-dimm-argon.dtb' configuration
   Trying 'fdt-stm32mp157c-dimm-argon.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Created:      2024-09-17   8:04:17 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0xc278aef4
     Data Size:    75471 Bytes = 73.7 KiB
     Architecture: ARM
     Hash algo:    sha256
     Hash value:   c5f86121613f8307e3326350111826377f31ef7de05856bf09a7e9bfa717bcd1
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0xc278aef4
   Loading Kernel Image
   Loading Device Tree to cffea000, end cffff6ce ... OK
Bootstage space exhasuted
Bootstage space exhasuted

Starting kernel ...

 

 

I tried to understand to "Bootstage space exhausted" error and checked the device tree in u-boot and in op-tee, but could not solve it. Can anyone help me to solve this issue? Thanks in advance.

0 REPLIES 0