SK-AM64B: Booting the AM64x becomes stuck while booting the sbl_ospi_linux example with enabled inline ecc (ddr)

Part Number: SK-AM64B
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Dear experts,

In our future project we want to develop our own SBL for an AM64x based device.

For that we are currently evaluating the ospi_linux example from the MCU SDK.

One of the goals are:
- load and start multicore app image as soon as possible
- load all linux stuff as much as possible from sdcard (u-boot-img!).
- enable/use inline ECC for ddr memory (and that's where we have a problem)

Our setup/environment:

Board
- TI's SK-AM64B board

Software
- CCS 12.81
- mcu_plus_sdk_am64x_11_01_00_17
- ti-processor-sdk-linux-am64xx-evm-11.01.05.03
- ti-cgt-armllvm_4.0.4.LTS
- sysconfig_1.25.0

What we have done so far:
- R5 sbl:
  import and modify sbl_ospi_linux example into ccs
  Used proper lpddr init header from TI's ddr config tool (online sysconfig)
  According to docs, ddr should be configured here in sbl -> ddr: disable/enable ecc

- Multicore appimage:
  import empty project template from MCU SDK folder (just enable R5 cores, M4F: disabled, A53 removed, since we use linux)
  besides initialization, the code does nothing ( for(;;){} )

- modify u-boot (ti-processor-sdk_linux) so inline ECC is enabled (according to docs / make u-boot)

- create sdcard (use updated u-boot via make u-boot_install)

- call MCU_SDK\tools\boot\linuxAppimageGen to have the linux.appimage/u-boot.img files

- flash everything to OSPI via uart-uniflash sbl_ecc_ddr.cfg

The project: ecc_ddr_am64x.zip

After getting everything together...

1st try, boot from sd card (ospi not involved?):

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:38:46 +0200)
Resetting on cold boot to workaround ErrataID:i2331
Please resend tiboot3.bin in case of UART/DFU boot
resetting ...

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:38:46 +0200)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.2--v11.01.02 (Fancy Rat)')
EEPROM not available at 0x50, trying to read at 0x51
ECC is enabled, priming DDR which will take several seconds.
ECC: priming DDR completed in 3230 msec
SPL initial stack usage: 13552 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Loading Environment from nowhere... OK
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.13.0(release):v2.13.0-240-gd90bb650fe-dirty
NOTICE:  BL31: Built : 21:37:18, Jun 23 2025
I/TC:
I/TC: OP-TEE version: 4.6.0-dev (gcc version 13.4.0 (GCC)) #1 Fri Apr 25 11:17:53 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.2--v11.01.02 (Fancy Rat)')
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.2--v11.01.02 (Fancy Rat)')
Trying to boot from MMC2
Authentication passed
Authentication passed


U-Boot 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)

SoC:   AM64X SR2.0 HS-FS
Model: Texas Instruments AM642 SK
Board: AM64B-SKEVM rev A
DRAM:  1.8 GiB
Core:  96 devices, 33 uclasses, devicetree: separate
MMC:   mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Failed to probe prueth driver
Net:   eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
574 bytes read in 3 ms (186.5 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
22323712 bytes read in 933 ms (22.8 MiB/s)
63024 bytes read in 7 ms (8.6 MiB/s)
Working FDT set to 88000000
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to 000000008feed000, end 000000008fffffff ... OK
Working FDT set to 8feed000

Starting kernel ...

observation: sd card seems to be ok, u-boot log reads ecc enabled, ram size is reduced since of ecc overhead

With ecc disabled, the system boots also as supposed, except...

DMSC Firmware Version 11.0.7--v11.00.07 (Fancy Rat)
DMSC Firmware revision 0xb
DMSC ABI revision 4.0

KPI_DATA: [BOOTLOADER_PROFILE] CPU Clock        : 800.000 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size  : 93 KB
KPI_DATA: [BOOTLOADER_PROFILE] Cores present    :
a530-0
r5f1-0
r5f1-1
r5f0-0
r5f0-1
KPI_DATA: [BOOTLOADER PROFILE] SYSFW init                       :      12751us
KPI_DATA: [BOOTLOADER PROFILE] System_init                      :     379898us
KPI_DATA: [BOOTLOADER PROFILE] Drivers_open                     :       1781us
KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen                :     124534us
KPI_DATA: [BOOTLOADER PROFILE] Sciclient Get Version            :       9991us
KPI_DATA: [BOOTLOADER PROFILE] App_loadLinuxImages              :     254753us
KPI_DATA: [BOOTLOADER PROFILE] App_loadImages                   :      39741us
KPI_DATA: [BOOTLOADER PROFILE] CPU Load                         :          0us
KPI_DATA: [BOOTLOADER PROFILE] SBL End                          :          0us
KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken             :     823452us

Image loading done, switching to application ...
Starting linux and RTOS/Baremetal applications
NOTICE:  BLE31:R v2R.1O3.0R(re:le aseB):vo2.o13.t0-240-gd90bb650fe-dirty
NOTICE:  BL31: Built : 21:37:18, Jun 23 2025
I/TC:
I/TC: OP-TEE version: 4.6.0-dev (gcc version 13.4.0 (GCC)) #1 Fri Apr 25 11:17:53 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
EEPROM not available at 0x50, trying to read at 0x51
Trying to boot from SPI
Authentication passed
Authentication passed


U-Boot 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)

SoC:   AM64X SR2.0 HS-FS
Model: Texas Instruments AM642 SK
Board: AM64B-SKEVM rev A
DRAM:  2 GiB
Core:  96 devices, 33 uclasses, devicetree: separate
MMC:   mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Failed to probe prueth driver
Net:   eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
574 bytes read in 3 ms (186.5 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
22323712 bytes read in 934 ms (22.8 MiB/s)
63024 bytes read in 8 ms (7.5 MiB/s)
Working FDT set to 88000000
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to 000000008feed000, end 000000008fffffff ... OK
Working FDT set to 8feed000

Starting kernel ...

observation: ecc seems NOT to be active while u-boot(ing)

With ecc ENABLED, no ECC regions defined, the system becomes stuck right at "DRAM":

DMSC Firmware Version 11.0.7--v11.00.07 (Fancy Rat)
DMSC Firmware revision 0xb
DMSC ABI revision 4.0

KPI_DATA: [BOOTLOADER_PROFILE] CPU Clock        : 800.000 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size  : 93 KB
KPI_DATA: [BOOTLOADER_PROFILE] Cores present    :
a530-0
r5f1-0
r5f1-1
r5f0-0
r5f0-1
KPI_DATA: [BOOTLOADER PROFILE] SYSFW init                       :      12751us
KPI_DATA: [BOOTLOADER PROFILE] System_init                      :     380009us
KPI_DATA: [BOOTLOADER PROFILE] Drivers_open                     :       1776us
KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen                :     124741us
KPI_DATA: [BOOTLOADER PROFILE] Sciclient Get Version            :       9992us
KPI_DATA: [BOOTLOADER PROFILE] App_loadLinuxImages              :     254426us
KPI_DATA: [BOOTLOADER PROFILE] App_loadImages                   :      39752us
KPI_DATA: [BOOTLOADER PROFILE] CPU Load                         :          0us
KPI_DATA: [BOOTLOADER PROFILE] SBL End                          :          0us
KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken             :     823451us

Image loading done, switching to application ...
Starting linux and RTOS/Baremetal applications
NOTICE:  BL3E1: v2.R13R.0(OrelRea:se): v2.B13o.0-o240-gd90bb650fe-dirty
NOTICE:  BL31: Built : 21:37:18, Jun 23 2025
I/TC:
I/TC: OP-TEE version: 4.6.0-dev (gcc version 13.4.0 (GCC)) #1 Fri Apr 25 11:17:53 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
EEPROM not available at 0x50, trying to read at 0x51
Trying to boot from SPI
Authentication passed
Authentication passed


U-Boot 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)

SoC:   AM64X SR2.0 HS-FS
Model: Texas Instruments AM642 SK
Board: AM64B-SKEVM rev A
DRAM:<stuck>

observation: boot process became stuck at DRAM: info.

With ecc ENABLED and ECC region defined, the system becomes also stuck right at "DRAM", too:

DMSC Firmware Version 11.0.7--v11.00.07 (Fancy Rat)
DMSC Firmware revision 0xb
DMSC ABI revision 4.0

KPI_DATA: [BOOTLOADER_PROFILE] CPU Clock        : 800.000 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size  : 93 KB
KPI_DATA: [BOOTLOADER_PROFILE] Cores present    :
a530-0
r5f1-0
r5f1-1
r5f0-0
r5f0-1
KPI_DATA: [BOOTLOADER PROFILE] SYSFW init                       :      12750us
KPI_DATA: [BOOTLOADER PROFILE] System_init                      :    5020666us
KPI_DATA: [BOOTLOADER PROFILE] Drivers_open                     :       1790us
KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen                :     124745us
KPI_DATA: [BOOTLOADER PROFILE] Sciclient Get Version            :       9992us
KPI_DATA: [BOOTLOADER PROFILE] App_loadLinuxImages              :     254616us
KPI_DATA: [BOOTLOADER PROFILE] App_loadImages                   :      39688us
KPI_DATA: [BOOTLOADER PROFILE] CPU Load                         :          0us
KPI_DATA: [BOOTLOADER PROFILE] SBL End                          :          0us
KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken             :      95542us

Image loading done, switching to application ...
Starting linux and RTOS/Baremetal applications
NOTICE:  BL31:E v2R.13.R0(rOeleasRe)::v2. 13.0-240B-gd90bb650fe-dirty
NOTICE:  BL31: Built : 21:37:18, Jun 23 2025
I/TC:
I/TC: OP-TEE version: 4.6.0-dev (gcc version 13.4.0 (GCC)) #1 Fri Apr 25 11:17:53 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
EEPROM not available at 0x50, trying to read at 0x51
Trying to boot from SPI
Authentication passed
Authentication passed


U-Boot 2025.01-gd2a72467939e-dirty (Oct 01 2025 - 16:39:24 +0200)

SoC:   AM64X SR2.0 HS-FS
Model: Texas Instruments AM642 SK
Board: AM64B-SKEVM rev A
DRAM:<stuck>

observation: boot process became stuck at DRAM: info. But initial boot time took significant longer, probably because of priming memory in R5 sbl?!

So my question is, how to properly enable inline ecc when booting from ospi in combination of linux?

I am also unsure, if I have used the proper files, when I created the linux.appimage from newly built u-boot.img for use in ospi-boot (config.mak was adjusted accordingly)?!

I used u-boot-spl.bin from this location: ti-processor-sdk-linux-am64xx-evm-11.01.05.03/board-support/u-boot-build/a53/spl. Is this correct?

kind regards, thorsten