This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4AL-Q1: 4GB Memory setting

Part Number: TDA4AL-Q1

Hello TI members,

Please see first : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1227640/faq-tda4vm-tda4vl-tda4al-tda4vh-dra821-how-can-we-make-the-jacinto-sdk-compatible-for-device-variants-yxz

I want to use 4GB memory based on the link patch above.

However, the v09x source code is different from the v08x source code, so it cannot be applied.

Especially the memory-related FDT usage part has changed a lot.

Is there a patch guide document for setting up TDA4AL in the v09x SDK?

Regards,

JK

  • Hi JK,

    As the filename remains the same (or similar), could you manually do the changes instead of directly applying the patch here?

    I believe you are referring to the 4GB DDR changes right? 

    Please let me know if you are facing any issue after manually adding the changes.

    Regards,

    Nikhil

  • Hi Nikhil,

    dram_init_banksize() is not used in evm.c. It has been changed to use fdtdec_setup_memory_banksize() function.

    And the above patch describes the 8GB setup. Please explain how to set up 4GB.

    Regards,

    JK

  • Hi JK,

    dram_init_banksize() is not used in evm.c. It has been changed to use fdtdec_setup_memory_banksize() function.

    Yes, this change came in SDK 9.2. 

    dram_init_banksize() is there is SDK 9.1, however, from SDK 9.2, we are filling that from the device tree itself, so that change is not required.

    And the above patch describes the 8GB setup. Please explain how to set up 4GB.

    For 4GB, the changes in k3-j721s2-ddr-evm-lp4-4266.dtsi and k3-j721s2-ddr.dtsi would be the same as we are disabling one DDR instance.

    In /k3-j721s2-som-p0.dtsi, the change would be as shown below. 

    diff --git a/arch/arm/dts/k3-j721s2-som-p0.dtsi b/arch/arm/dts/k3-j721s2-som-p0.dtsi
    index f3080e948e..9e91110d90 100644
    --- a/arch/arm/dts/k3-j721s2-som-p0.dtsi
    +++ b/arch/arm/dts/k3-j721s2-som-p0.dtsi
    @@ -13,9 +13,9 @@
     / {
     	memory@80000000 {
     		device_type = "memory";
    -		/* 16 GB RAM */
    +		/* 4 GB RAM */
     		reg = <0x00 0x80000000 0x00 0x80000000>,
    -		      <0x08 0x80000000 0x03 0x80000000>;
    +		      <0x08 0x80000000 0x00 0x80000000>;
     	};
     
     	/* Reserving memory regions still pending */

    There is no change required in evm.c from SDK 9.2 onwards.

    Please apply the above changes and check if DRAM: 4 GiB, is printed in the u-boot logs.

    Regards,

    Nikhil

  • Hello Nikhil,

    The above patch makes a kernel panic. I will attach the log below.

    Regards,

    JK

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2024.04.30 08:54:01 =~=~=~=~=~=~=~=~=~=~=~=
    
    U-Boot SPL 2023.04-dirty (Apr 30 2024 - 08:46:18 +0900)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    SPL initial stack usage: 13472 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from nowhere... OK
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    I/TC: 
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 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: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-dirty (Apr 30 2024 - 08:47:01 +0900)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    
    
    U-Boot 2023.04-dirty (Apr 30 2024 - 08:47:01 +0900)
    
    SoC:   J721S2 SR1.0 GP
    Model: Texas Instruments J721S2 EVM
    Board: J721S2X-PM1-SOM rev E3
    DRAM:  2 GiB (effective 4 GiB)
    Core:  89 devices, 32 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from nowhere... OK
    In:    serial@2880000
    Out:   serial@2880000
    Err:   serial@2880000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Net:   eth0: ethernet@46000000port@1
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    654 bytes read in 17 ms (37.1 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    Running uenvcmd ...
    1 bytes read in 17 ms (0 Bytes/s)
    Already setup.
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work
    Failed to load '/lib/firmware/j721s2-mcu-r5f0_1-fw'
    835020 bytes read in 29 ms (27.5 MiB/s)
    Load Remote Processor 2 with data@addr=0x82000000 835020 bytes: Success!
    330964 bytes read in 23 ms (13.7 MiB/s)
    Load Remote Processor 3 with data@addr=0x82000000 330964 bytes: Success!
    Failed to load '/lib/firmware/j721s2-main-r5f1_0-fw'
    Failed to load '/lib/firmware/j721s2-main-r5f1_1-fw'
    15212688 bytes read in 100 ms (145.1 MiB/s)
    Load Remote Processor 6 with data@addr=0x82000000 15212688 bytes: Success!
    9703328 bytes read in 39 ms (237.3 MiB/s)
    Load Remote Processor 7 with data@addr=0x82000000 9703328 bytes: Success!
    19376640 bytes read in 219 ms (84.4 MiB/s)
    95815 bytes read in 19 ms (4.8 MiB/s)
    Working FDT set to 88000000
    10407 bytes read in 18 ms (564.5 KiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
    ERROR: reserving fdt memory region failed (addr=880000000 size=2c000000 flags=4)
       Loading Device Tree to 000000008fee5000, end 000000008fffffff ... OK
    Working FDT set to 8fee5000
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [    0.000000] Linux version 6.1.80-dirty (mobase@mobase-VirtualBox) (aarch64-oe-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Tue Apr 30 08:38:22 KST 2024
    [    0.000000] Machine model: Texas Instruments J721S2 EVM
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002880000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a0000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a0100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a1000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a1100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a2000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 31 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a2100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a4000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 31 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a4100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a6000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a6100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a7000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a7100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a8000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-rtos-ipc-memory-region@a8000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000aa000000, size 96 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-dma-memory@aa000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000b0000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-c71-dma-memory@b0000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000b0100000, size 95 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-c71_0-memory@b0100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000b6000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-c71_1-dma-memory@b6000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000b6100000, size 31 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-c71_1-memory@b6100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000b8000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-lo@b8000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x0000000880000000, size 704 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-hi@880000000, compatible id shared-dma-pool
    [    0.000000] OF: reserved mem: initialized node vision_apps_shared-memories, compatible id dma-heap-carveout
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000980000000, size 896 MiB
    [    0.000000] OF: reserved mem: initialized node linux-cma-buffers@980000000, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000]   DMA32    empty
    [    0.000000]   Normal   [mem 0x0000000100000000-0x00000008ffffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009e7fffff]
    [    0.000000]   node   0: [mem 0x000000009e800000-0x00000000bbffffff]
    [    0.000000]   node   0: [mem 0x00000000bc000000-0x00000000ffffffff]
    [    0.000000]   node   0: [mem 0x0000000880000000-0x00000008abffffff]
    [    0.000000]   node   0: [mem 0x00000008ac000000-0x00000008ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000008ffffffff]
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: Trusted OS migration not required
    [    0.000000] psci: SMC Calling Convention v1.4
    [    0.000000] percpu: Embedded 20 pages/cpu s41064 r8192 d32664 u81920
    [    0.000000] Detected PIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: detected: Spectre-v3a
    [    0.000000] CPU features: detected: Spectre-BHB
    [    0.000000] CPU features: detected: ARM erratum 1742098
    [    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
    [    0.000000] alternatives: applying boot alternatives
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1032192
    [    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02880000 mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);spi-nand0:512k(ospi_nand.tiboot3),2m(ospi_nand.tispl),4m(ospi_nand.u-boot),256k(ospi_nand.env),256k(ospi_nand.env.backup),98048k@32m(ospi_nand.rootfs),256k@130816k(ospi_nand.phypattern) root=PARTUUID=09cfa2be-02 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] software IO TLB: area num 2.
    [    0.000000] software IO TLB: mapped [mem 0x00000000fbfff000-0x00000000fffff000] (64MB)
    [    0.000000] Memory: 2826128K/4194304K available (11712K kernel code, 1258K rwdata, 3812K rodata, 1984K init, 438K bss, 450672K reserved, 917504K cma-reserved)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu: RCU event tracing is enabled.
    [    0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
    [    0.000000] Trampoline variant of Tasks RCU enabled.
    [    0.000000] Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [    0.000000] GICv3: 960 SPIs implemented
    [    0.000000] GICv3: 0 Extended SPIs implemented
    [    0.000000] Root IRQ handler: gic_handle_irq
    [    0.000000] GICv3: GICv3 features: 16 PPIs
    [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001900000
    [    0.000000] ITS [mem 0x01820000-0x0182ffff]
    [    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @8ac800000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x00000008ac030000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000008ac040000
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000000] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.008415] Console: colour dummy device 80x25
    [    0.012986] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.023657] pid_max: default: 32768 minimum: 301
    [    0.028395] LSM: Security Framework initializing
    [    0.033177] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.040751] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.049632] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.057041] cblist_init_generic: Setting shift to 1 and lim to 1.
    [    0.063309] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.070698] cblist_init_generic: Setting shift to 1 and lim to 1.
    [    0.077016] rcu: Hierarchical SRCU implementation.
    [    0.081916] rcu: Max phase no-delay instances is 1000.
    [    0.087446] Platform MSI: msi-controller@1820000 domain created
    [    0.093672] PCI/MSI: /bus@100000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.103087] EFI services will not be available.
    [    0.107840] smp: Bringing up secondary CPUs ...
    I/TC: Secondary CPU 1 initializing
    I/TC: Secondary CPU 1 switching to normal world boot
    [    0.120926] Detected PIPT I-cache on CPU1
    [    0.120999] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
    [    0.121013] GICv3: CPU1: using allocated LPI pending table @0x00000008ac050000
    [    0.121047] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
    [    0.121105] smp: Brought up 1 node, 2 CPUs
    [    0.150453] SMP: Total of 2 processors activated.
    [    0.155259] CPU features: detected: 32-bit EL0 Support
    [    0.160513] CPU features: detected: CRC32 instructions
    [    0.165790] CPU: All CPU(s) started at EL2
    [    0.169973] alternatives: applying system-wide alternatives
    [    0.176597] devtmpfs: initialized
    [    0.186099] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.196085] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    [    0.203102] ------------[ cut here ]------------
    [    0.207817] WARNING: CPU: 0 PID: 1 at mm/cma.c:110 cma_init_reserved_areas+0x68/0x20c
    [    0.215833] Modules linked in:
    [    0.218949] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.80-dirty #1
    [    0.225529] Hardware name: Texas Instruments J721S2 EVM (DT)
    [    0.231306] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [    0.238418] pc : cma_init_reserved_areas+0x68/0x20c
    [    0.243398] lr : cma_init_reserved_areas+0x78/0x20c
    [    0.248377] sp : ffff8000092fbd50
    [    0.251755] x29: ffff8000092fbd50 x28: 0000000000000000 x27: ffff800008f500c8
    [    0.259048] x26: ffff800008fd6038 x25: ffff8000092bd538 x24: 0000000000000000
    [    0.266339] x23: ffff800008ed2000 x22: fffffc0000000000 x21: 0000000000980000
    [    0.273631] x20: ffff800008f6a638 x19: ffff8000092bd538 x18: 000000000004e9c7
    [    0.280921] x17: 6d202c6666666666 x16: 6666667830203a73 x15: 0000000000000000
    [    0.288212] x14: 0000000000000001 x13: 0000000000000002 x12: ffff8000092654b8
    [    0.295502] x11: ffff800009265498 x10: 0000000000000000 x9 : ffff800009265478
    [    0.302793] x8 : fffffc0020b07401 x7 : 0000000000001bb8 x6 : ffff8008769ac000
    [    0.310084] x5 : ffff8000092fbcc0 x4 : 0000000000000000 x3 : ffff00082c0e0000
    [    0.317374] x2 : 0000000000000000 x1 : ffff00082c0e0000 x0 : 0000000000000000
    [    0.324665] Call trace:
    [    0.327157]  cma_init_reserved_areas+0x68/0x20c
    [    0.331782]  do_one_initcall+0x54/0x1d0
    [    0.335698]  kernel_init_freeable+0x218/0x284
    [    0.340145]  kernel_init+0x24/0x130
    [    0.343709]  ret_from_fork+0x10/0x20
    [    0.347357] ---[ end trace 0000000000000000 ]---
    [    0.352083] Unable to handle kernel paging request at virtual address fffffc0024000000
    [    0.360174] Mem abort info:
    [    0.363019]   ESR = 0x0000000096000006
    [    0.366849]   EC = 0x25: DABT (current EL), IL = 32 bits
    [    0.372274]   SET = 0, FnV = 0
    [    0.375387]   EA = 0, S1PTW = 0
    [    0.378588]   FSC = 0x06: level 2 translation fault
    [    0.383569] Data abort info:
    [    0.386503]   ISV = 0, ISS = 0x00000006
    [    0.390416]   CM = 0, WnR = 0
    [    0.393439] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000082f40000
    [    0.400286] [fffffc0024000000] pgd=10000008ff9c4003, p4d=10000008ff9c4003, pud=10000008ff9c3003, pmd=0000000000000000
    [    0.411136] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
    [    0.417537] Modules linked in:
    [    0.420650] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.1.80-dirty #1
    [    0.428738] Hardware name: Texas Instruments J721S2 EVM (DT)
    [    0.434515] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [    0.441626] pc : cma_init_reserved_areas+0x98/0x20c
    [    0.446606] lr : cma_init_reserved_areas+0x78/0x20c
    [    0.451585] sp : ffff8000092fbd50
    [    0.454963] x29: ffff8000092fbd50 x28: 0000000000000640 x27: ffff800008ed2e18
    [    0.462254] x26: ffff800008fd6038 x25: ffff8000092bd538 x24: 0000000000000000
    [    0.469545] x23: ffff800008ed2000 x22: fffffc0000000000 x21: 0000000000980000
    [    0.476836] x20: 0000000000980001 x19: ffff8000092bd538 x18: 000000000004e9c7
    [    0.484127] x17: 6d202c6666666666 x16: 6666667830203a73 x15: 0000000000000000
    [    0.491417] x14: 0000000000000001 x13: 0000000000000002 x12: ffff8000092654b8
    [    0.498707] x11: ffff800009265498 x10: 0000000000000000 x9 : ffff800009265478
    [    0.505998] x8 : fffffc0020b07401 x7 : 0000000000001bb8 x6 : ffff8008769ac000
    [    0.513288] x5 : ffff8000092fbcc0 x4 : 0000000000000000 x3 : ffff00082c0e0000
    [    0.520579] x2 : 0000000000000000 x1 : ffff00082c0e0000 x0 : 0000000024000000
    [    0.527870] Call trace:
    [    0.530359]  cma_init_reserved_areas+0x98/0x20c
    [    0.534983]  do_one_initcall+0x54/0x1d0
    [    0.538896]  kernel_init_freeable+0x218/0x284
    [    0.543341]  kernel_init+0x24/0x130
    [    0.546901]  ret_from_fork+0x10/0x20
    [    0.550549] Code: 913862fb 910006b4 cb8032a0 d37ae400 (f876681a) 
    [    0.556772] ---[ end trace 0000000000000000 ]---
    [    0.561491] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [    0.569312] SMP: stopping secondary CPUs
    [    0.573315] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
    

  • Hi,

    This is because, in the linux, there a linux-cma region in k3-j721s2-rtos-memory-map.dtsi, which is exceeding this 4GB, causing the kernel crash.

    You would have to either bring this below 4GB or if you are not using this region, you could remove the same from the reserved_memory region in k3-j721s2-rtos-memory-map.dtsi and build the linux device tree using "make linux-dtbs"

    After this copy k3-j721s2-vision-apps.dtbo to the SD Card in rootfs/boot/dts/ti folder.

    This should solve your issue.

    Regards,

    Nikhil

  • Hello Hikhil,

    1.

    How can I bring the CMA area below 4GB?

    Is there no relation to other memory areas with the upper 4GB memory area?

    2.

    There is a similar file in the Linux kernel. Do I need to modify this file too?

    Regards,

    JK

    	vision_apps_shared_region: vision_apps_shared-memories {
    		compatible = "dma-heap-carveout";
    		reg = <0x09 0x00000000 0x00 0x20000000>;
    	};
    	linux,cma {
                    status = "disabled";
            };
    	linux_cma_region: linux-cma-buffers@980000000 {
    		compatible = "shared-dma-pool";
                    reusable;
                    reg = <0x09 0x80000000 0x00 0x38000000>;
                    linux,cma-default;
    	};
    	vision_apps_core_heaps_lo: vision-apps-core-heap-memory-lo@b8000000 {
    		compatible = "shared-dma-pool";
    		reg = <0x00 0xb8000000 0x00 0x04000000>;
    		no-map;
    	};
    	vision_apps_core_heaps_hi: vision-apps-core-heap-memory-hi@880000000 {
    		compatible = "shared-dma-pool";
    		reg = <0x08 0x80000000 0x00 0x2c000000>;
    		no-map;
    	};

  • Hi,

    There is a similar file in the Linux kernel. Do I need to modify this file too?

    This is not needed for SPL boot flow as u-boot is configuring the DDR.

    How can I bring the CMA area below 4GB?

    Is there no relation to other memory areas with the upper 4GB memory area?

    You would have to reduce the size other regions in the upper DDR region and push the CMA region above to accomodate itself in 4GB.

    But if you are not using this region, I suggest remove the  below from the device tree,

    linux_cma_region: linux-cma-buffers@980000000 {
    compatible = "shared-dma-pool";
    reusable;
    reg = <0x09 0x80000000 0x00 0x38000000>;
    linux,cma-default;
    };

    Regards,

    Nikhil

  • Hello. Nikhil.

    I am deeply grateful for your response.

    I don't know whether that area is used or not. I guess it could be used for other DMA allocations.
    Please guide me in detail on how to reduce other upper memory areas and accommodate them in 4GB.

    Regards,

    JK

  • Hi JK,

    The above memories are vision_apps memories. To modify this, you can refer the below documentation and use the python script mentioned in the documentation to generate the reseved_memory region

    9.9. Understanding and updating SDK memory map for J721S2 — Processor SDK RTOS J721S2

    Regards,

    Nikhil