Forums » Software Development »
Enable DDR ECC in Am62A processor
Added by Rajkumar Dumala about 12 hours ago
Hello there,
We are using the MitySOM-AM62x Devkit with the AM62A System on Module (SoM), which includes 4 GB of LPDDR4 (with inline ECC).
As part of SDL, we enabled ECC in the R5 MSRAM (512 KB) it is working fine . After that, I enabled ECC for DDR4 by following the instructions at the following link:
ddrss_ecc
I enabled ECC by adding ti,ecc-enable; to the memorycontroller node in the file arch/arm/dts/k3-am62a-ddr.dtsi , and ensured that all of the following flags are present in configs/mitysom_am62ax_devkit_r5_defconfig :CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_INLINE_ECC=y
CONFIG_K3_SYSTEM_CONTROLLER=y
CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
However, when I boot the board, I encounter the following error (I am sharing the complete boot log below).
@U-Boot SPL 2024.04-g990d9851d9-dirty (May 13 2025 - 10:12:50 +0530)
SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
Configuring LPDDR4 for 4GB
ECC is enabled, priming DDR which will take several seconds.
ECC: priming DDR completed in 2035 msec
SPL initial stack usage: 17056 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...
NOTICE: BL31: v2.11.0(release):v2.11.0-906-g58b25570c9-dirty
NOTICE: BL31: Built : 04:20:32, Nov 1 2024
U-Boot SPL 2024.04-g990d9851d9-dirty (May 13 2025 - 10:13:04 +0530)
SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
Trying to boot from MMC2
Authentication passed
Authentication passed
U-Boot 2024.04-g990d9851d9-dirty (May 13 2025 - 10:13:04 +0530)
SoC: AM62AX SR1.0 HS-FSModel: Critical Link MitySOM-AM62A
MitySOM-62x - Model No: 62A34-TX-XAE-RI Serial No: 24008049 Part Number: 80-001736RI-2A
DRAM: 4 GiB
Core: 107 devices, 31 uclasses, devicetree: separate
MMC: mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc1:1...
Loading Environment from MMC... OK
In: serial@2800000
Out: serial@2800000
Err: serial@2800000
Net: eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
Hit any key to stop autoboot: 0
Resetting HDMI tfp410
Setting bus to 1
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
574 bytes read in 34 ms (15.6 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
53172 bytes read in 150 ms (345.7 KiB/s)
Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
Load Remote Processor 0 with data@addr=0x82000000 53172 bytes: Success!
8391984 bytes read in 161 ms (49.7 MiB/s)
Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
Load Remote Processor 2 with data@addr=0x82000000 8391984 bytes: Success!
Failed to load 'rproc'
Failed to load 'u-boot'
27884032 bytes read in 1189 ms (22.4 MiB/s)
68959 bytes read in 39 ms (1.7 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 000000008feec000, end 000000008fffffff ... OK
Working FDT set to 8feec000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.6.58-g1b3c2390b954-dirty (svaya@Pc-17) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 13.3.1 20240614, GNU ld (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 2.42.0.20240614) #3 SMP PREEMPT Wed May 7 10:41:45 IST 2025
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Critical Link MitySOM-AM62A
[ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[ 0.000000] printk: bootconsole [ns16550a0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x00000000c0000000, size 576 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000c0000000..0x00000000e3ffffff (589824 KiB) map reusable linux,cma
[ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008007ffff (512 KiB) nomap non-reusable tfa@80000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node c7x-dma-memory@99800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000099800000..0x00000000998fffff (1024 KiB) nomap non-reusable c7x-dma-memory@99800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099900000, size 31 MiB
[ 0.000000] OF: reserved mem: initialized node c7x-memory@99900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000099900000..0x000000009b7fffff (31744 KiB) nomap non-reusable c7x-memory@99900000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009b800000..0x000000009b8fffff (1024 KiB) nomap non-reusable r5f-dma-memory@9b800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b900000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009b900000..0x000000009c7fffff (15360 KiB) nomap non-reusable r5f-dma-memory@9b900000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009c800000..0x000000009c8fffff (1024 KiB) nomap non-reusable r5f-dma-memory@9c800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c900000, size 30 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009c900000..0x000000009e6fffff (30720 KiB) nomap non-reusable r5f-dma-memory@9c900000
[ 0.000000] OF: reserved mem: 0x000000009e800000..0x000000009fffffff (24576 KiB) nomap non-reusable optee@9e800000
[ 0.000000] OF: reserved mem: 0x00000000a0000000..0x00000000a0ffffff (16384 KiB) nomap non-reusable edgeai-rtos-ipc-memory-region
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node edgeai-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a1000000..0x00000000a2ffffff (32768 KiB) nomap non-reusable edgeai-dma-memory@a1000000
[ 0.000000] OF: reserved mem: initialized node edgeai_shared-memories, compatible id dma-heap-carveout
[ 0.000000] OF: reserved mem: 0x00000000a3000000..0x00000000adffffff (180224 KiB) map non-reusable edgeai_shared-memories
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000ae000000, size 288 MiB
[ 0.000000] OF: reserved mem: initialized node edgeai-core-heap-memory@ae000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000ae000000..0x00000000bfffffff (294912 KiB) nomap non-reusable edgeai-core-heap-memory@ae000000
[ 0.000000] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.58-g1b3c2390b954-dirty #3
[ 0.000000] Hardware name: Critical Link MitySOM-AM62A (DT)
[ 0.000000] pstate: 200000c5 (nzCv daIF PAN -UAO -TCO -DIT -SSBS BTYPE=-)
[ 0.000000] pc : create_kpti_ng_temp_pgd+0x134/0x6b0
[ 0.000000] lr : create_kpti_ng_temp_pgd+0xd0/0x6b0
[ 0.000000] sp : ffff800081863b50
[ 0.000000] x29: ffff800081863b50 x28: ffff800080010000 x27: 0000000000000000
[ 0.000000] x26: ffff800080e50000 x25: 0040000000000783 x24: ffff800080010000
[ 0.000000] x23: 0000000082010000 x22: ffff800080e4ffff x21: ffff800080e50000
[ 0.000000] x20: fffffbfffdc35010 x19: ffff800080e50000 x18: 0000000000000006
[ 0.000000] x17: 3231393439322820 x16: 6666666666666662 x15: 3030303030303030
[ 0.000000] x14: 78302e2e30303030 x13: 3030303030306561 x12: 4079726f6d656d2d
[ 0.000000] x11: 706165682d65726f x10: ffff8000818dcad0 x9 : 0000000000000000
[ 0.000000] x8 : fffffbfffdc38000 x7 : 0000000000000035 x6 : ffff800081a9b000
[ 0.000000] x5 : ffff800080e50000 x4 : fffffbfffdc35010 x3 : 0000000082010000
[ 0.000000] x2 : ffff800080e4ffff x1 : ffff8000bfffffff x0 : ffff800082e50000
[ 0.000000] Call trace:
[ 0.000000] create_kpti_ng_temp_pgd+0x134/0x6b0
[ 0.000000] map_kernel_segment+0xa0/0x108
[ 0.000000] paging_init+0x110/0x708
[ 0.000000] setup_arch+0x200/0x5b8
[ 0.000000] start_kernel+0x74/0x688
[ 0.000000] __primary_switched+0xbc/0xd0
[ 0.000000] Code: d1000661 eb02003f 9a9a3273 aa130000 (f9400297)
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---@
Thank you ,
Rajkumar.
Replies (9)
RE: Enable DDR ECC in Am62A processor - Added by Rajkumar Dumala about 12 hours ago
Just to add to the above point:
In the boot log, it shows that ECC is enabled, and I am able to run some test cases as mentioned in the TI documentation using U-Boot (manual boot mode).
Thank you.
RE: Enable DDR ECC in Am62A processor - Added by Michael Williamson about 10 hours ago
Hello,
When you enable ECC in LPDDR4, you reduce the maximum amount of addressable memory available to the device. IT uses some of the 4 GB to hold the ECC data.
The CMA settings I am seeing above include a 576 MB (assuming 0x20000000) at 0xC0000000. This would run up to the top of a 4 GB address space.
With ECC enabled, you don't have that much space. I don't recall the exact reduction, but it is at least on the order of 10%.
I think you need to reduce the CMA allocation or lower it's address.
With regards,
Mike
RE: Enable DDR ECC in Am62A processor - Added by Michael Williamson about 10 hours ago
Well. Sorry it only goes up to 0xF0000000. But that still may be too high.
RE: Enable DDR ECC in Am62A processor - Added by Rajkumar Dumala about 9 hours ago
Hello Mike,
I reduced the CMA size to 512 MiB; however, the issue remains the same.I am providing the image for your reference.
Thank you,
Rajkumar.
RE: Enable DDR ECC in Am62A processor - Added by Rajkumar Dumala about 9 hours ago
Hello,
It was my mistake—I shared the wrong screenshot earlier. You can find the correct one attached with this message.
Thank you,
Rajkumar
RE: Enable DDR ECC in Am62A processor - Added by Michael Williamson about 8 hours ago
Hi Rajkumar,
From this link:
https://support.criticallink.com/redmine/projects/mitysom_am62x/wiki/Enabling_DDRSS_ECC
The maximum memory address is approximately 0xFFFFFFFF * 8 / 9 ~= 0xE38E38E2
It looks like the maximum CMA space you are calling for reaches up to 0XE000000, so maybe that's OK now?
If this works on the TI AM62Ax EVM, which includes 8 GB of LPDDR4, then we must still have memory references that are too high in the design.
With regards,
Mike
RE: Enable DDR ECC in Am62A processor - Added by Rajkumar Dumala about 6 hours ago
Hi Mike,
I don't understand why it's not working, even though all the reserved regions seem to be within the valid memory range.
@@[ 0.000000] Reserved memory: created CMA memory pool at 0x00000000c0000000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000c0000000..0x00000000cfffffff (262144 KiB) map reusable linux,cma
[ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008007ffff (512 KiB) nomap non-reusable tfa@80000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node c7x-dma-memory@99800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000099800000..0x00000000998fffff (1024 KiB) nomap non-reusable c7x-dma-memory@99800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000099900000, size 31 MiB
[ 0.000000] OF: reserved mem: initialized node c7x-memory@99900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000099900000..0x000000009b7fffff (31744 KiB) nomap non-reusable c7x-memory@99900000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009b800000..0x000000009b8fffff (1024 KiB) nomap non-reusable r5f-dma-memory@9b800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b900000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9b900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009b900000..0x000000009c7fffff (15360 KiB) nomap non-reusable r5f-dma-memory@9b900000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c800000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009c800000..0x000000009c8fffff (1024 KiB) nomap non-reusable r5f-dma-memory@9c800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c900000, size 30 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9c900000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000009c900000..0x000000009e6fffff (30720 KiB) nomap non-reusable r5f-dma-memory@9c900000
[ 0.000000] OF: reserved mem: 0x000000009e800000..0x000000009fffffff (24576 KiB) nomap non-reusable optee@9e800000
[ 0.000000] OF: reserved mem: 0x00000000a0000000..0x00000000a0ffffff (16384 KiB) nomap non-reusable edgeai-rtos-ipc-memory-region
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node edgeai-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a1000000..0x00000000a2ffffff (32768 KiB) nomap non-reusable edgeai-dma-memory@a1000000
[ 0.000000] OF: reserved mem: initialized node edgeai_shared-memories, compatible id dma-heap-carveout
[ 0.000000] OF: reserved mem: 0x00000000a3000000..0x00000000adffffff (180224 KiB) map non-reusable edgeai_shared-memories
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000ae000000, size 288 MiB
[ 0.000000] OF: reserved mem: initialized node edgeai-core-heap-memory@ae000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000ae000000..0x00000000bfffffff (294912 KiB) nomap non-reusable edgeai-core-heap-memory@ae000000
[ 0.000000] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
Thank you,
Raj.
RE: Enable DDR ECC in Am62A processor - Added by Michael Williamson about 6 hours ago
Hi Raj,
Does it work on the TI EVM? The reason I ask is that the EVM has 8 GB of memory. I just want to make sure it's memory size and not something with the IPC / DSP comms and enabling ECC that is the problem.
-Mike
RE: Enable DDR ECC in Am62A processor - Added by Jonathan Cormier about 3 hours ago
Sorry guys. Ecc doesn't work with the current u-boot code.
The issue is my ddr setup code which dynamically sets up the ddr based on ddr size. The code needs to reduce the max size when ecc is enabled.
I have some hard coded test code I wrote. Let me see if I can find it.