Hi Diego,
Thank you for the reply.
I made sure that regions are defined big enough in dts, however I have doubt about the linux,cma definition that tries to allocate 650MiB where I only have 512MiB of DRAM. It fails but then manages to allocate 128MiB properly :
DDRINFO: DRAM rate 1600MTS
NOTICE: BL31: v2.4(release):1d0298da0
NOTICE: BL31: Built : 09:25:33, Apr 11 2022
U-Boot 2020.04-5.10.9-1.0.0+g1a024e0406 (Jul 29 2022 - 15:00:32 +0000)
CPU: i.MX8MNano Quad rev1.0 1500 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 37C
Reset cause: POR
DRAM: 512 MiB
CPU temperature: 37 C
MMC: mmc@30b50000: no card present
mmc@30b60000: no card present
FSL_SDHC: 0 (eMMC), FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
Fail to setup video link
BuildInfo:
- ATF 1d0298d
- U-Boot 2020.04-5.10.9-1.0.0+g1a024e0406
loading FDT from mmc 0 'imx8mn-tx8m-nd00-m7.dtb'
MAC addr: 00:0c:c6:87:6b:8e
Net: eth0: ethernet@30be0000
Hit any key to stop autoboot: 0
17643528 bytes read in 651 ms (25.8 MiB/s)
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Loading Device Tree to 000000005e913000, end 000000005e91ffff ... OK
serial-number: 2135699850d00200
switching usbotg interface to peripheral mode
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.10.72+gc3b1248550ab (aarch64-poky-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 SMP PREEMPT Tue Aug 2 08:52:38 UTC 2022
[ 0.000000] earlycon: ec_imx6q0 at MMIO 0x0000000030860000 (options '115200')
[ 0.000000] printk: bootconsole [ec_imx6q0] enabled
[ 0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma'
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000058400000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vdevbuffer@58400000, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000004047ffff] // reserved for m7
[ 0.000000] node 0: [mem 0x0000000040480000-0x0000000057ffffff] // not reserved
[ 0.000000] node 0: [mem 0x0000000058000000-0x000000005800ffff] // vring0
[ 0.000000] node 0: [mem 0x0000000058010000-0x00000000580fefff] // vring1
[ 0.000000] node 0: [mem 0x00000000580ff000-0x00000000580fffff] // rsc_table
[ 0.000000] node 0: [mem 0x0000000058100000-0x00000000583fffff] // not reserved
[ 0.000000] node 0: [mem 0x0000000058400000-0x00000000584fffff] // vdevbuffer
[ 0.000000] node 0: [mem 0x0000000058500000-0x000000005fffffff] // not reserved
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] On node 0 totalpages: 131072
[ 0.000000] DMA zone: 2048 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 131072 pages, LIFO batch:31
[ 0.000000] cma: dma_contiguous_reserve(limit 60000000)
[ 0.000000] cma: dma_contiguous_reserve: reserving 128 MiB for global area
[ 0.000000] cma: cma_declare_contiguous_nid(size 0x0000000008000000, base 0x0000000000000000, limit 0x0000000060000000 alignment 0x0000000000000000)
[ 0.000000] cma: Reserved 128 MiB at 0x0000000050000000
[ 0.000000] psci: probing for conduit method from DT.
Is it possible that DMA overrite undefined memory region based on badly defined cma size ?