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.

TDA4VE-Q1: OSPI mode sbl boot linux Startup exception

Part Number: TDA4VE-Q1

HW TDA4ECO  SDK8.6

sbl_cust_img_mcu1_0_release.tiimage----->sbl_boot_app_ospi_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage--->atf_optee.appimage ----->tidtb_linux.appimage/tikernelimage_linux.appimage---->rootfs

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
[    0.000000] Linux version 5.10.162-g76b3e88d56 (jun@jun) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Tue Dec 19 15:15:07 CST 2023
[    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] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!

.....

[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node

...

[    0.075030] smp: Bringing up secondary CPUs ...
ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
[    0.093976] Detected PIPT I-cache on CPU1
[    0.094005] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
[    0.094018] GICv3: CPU1: using allocated LPI pending table @0x0000000081450000
[    0.094057] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
[    0.094119] smp: Brought up 1 node, 2 CPUs
[    0.123467] SMP: Total of 2 processors activated.
[    0.128273] CPU features: detected: 32-bit EL0 Support
[    0.133529] CPU features: detected: CRC32 instructions
[    0.148427] CPU: All CPU(s) started at EL2
[    0.152632] alternatives: patching kernel code
[    0.157801] devtmpfs: initialized
[    0.166160] KASLR disabled due to lack of seed
[    0.170831] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.180797] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.187826] ------------[ cut here ]------------
[    0.192549] WARNING: CPU: 0 PID: 1 at mm/cma.c:106 cma_init_reserved_areas+0x7c/0x170
[    0.200547] Modules linked in:
[    0.203667] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.162-g76b3e88d56 #1
[    0.210954] Hardware name: Texas Instruments J721S2 EVM (DT)
[    0.216732] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)

boot log.

 NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE:  BL31: Built : 17:56:46, Mar  1 2023
ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
I/TC: 
I/TC: OP-TEE version: 3.20.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Wed Mar  1 17:56:56 UTC 2023 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: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.3--v08.06.03 (Chill Capybar')
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
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
[    0.000000] Linux version 5.10.162-g76b3e88d56 (jun@jun) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Tue Dec 19 15:15:07 CST 2023
[    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] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
[    0.000000] Reserved memory: created DMA memory pool at 0x0000000097000000, size 16 MiB
[    0.000000] OF: reserved mem: initialized node r5f-dma-memory@97000000, compatible id shared-dma-pool
[    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] OF: reserved mem: initialized node vision_apps_shared-memories, compatible id dma-heap-carveout
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000d8000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-lo@d8000000, 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] Reserved memory: created CMA memory pool at 0x00000008ac000000, size 896 MiB
[    0.000000] OF: reserved mem: initialized node linux-cma-buffers@8ac000000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
[    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 0x0000000080000000-0x0000000096ffffff]
[    0.000000]   node   0: [mem 0x0000000097000000-0x0000000097ffffff]
[    0.000000]   node   0: [mem 0x0000000098000000-0x000000009e7fffff]
[    0.000000]   node   0: [mem 0x000000009e800000-0x00000000b7ffffff]
[    0.000000]   node   0: [mem 0x00000000b8000000-0x00000000d7ffffff]
[    0.000000]   node   0: [mem 0x00000000d8000000-0x00000000dbffffff]
[    0.000000]   node   0: [mem 0x00000000dc000000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
[    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.2
[    0.000000] percpu: Embedded 22 pages/cpu s50392 r8192 d31528 u90112
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: EL2 vector hardening
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x2880000 root=/dev/mmcblk0p2  rw rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1014412K/2097152K available (11200K kernel code, 1162K rwdata, 4300K rodata, 1856K init, 431K bss, 165236K 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] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    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 @81c00000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000081430000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000081440000
[    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[    0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[    0.008393] Console: colour dummy device 80x25
[    0.012959] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[    0.023631] pid_max: default: 32768 minimum: 301
[    0.028391] LSM: Security Framework initializing
[    0.033143] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.040710] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.049670] rcu: Hierarchical SRCU implementation.
[    0.054759] Platform MSI: msi-controller@1820000 domain created
[    0.060981] PCI/MSI: /bus@100000/interrupt-controller@1800000/msi-controller@1820000 domain created
[    0.070292] EFI services will not be available.
[    0.075030] smp: Bringing up secondary CPUs ...
ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
[    0.093976] Detected PIPT I-cache on CPU1
[    0.094005] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
[    0.094018] GICv3: CPU1: using allocated LPI pending table @0x0000000081450000
[    0.094057] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
[    0.094119] smp: Brought up 1 node, 2 CPUs
[    0.123467] SMP: Total of 2 processors activated.
[    0.128273] CPU features: detected: 32-bit EL0 Support
[    0.133529] CPU features: detected: CRC32 instructions
[    0.148427] CPU: All CPU(s) started at EL2
[    0.152632] alternatives: patching kernel code
[    0.157801] devtmpfs: initialized
[    0.166160] KASLR disabled due to lack of seed
[    0.170831] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.180797] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.187826] ------------[ cut here ]------------
[    0.192549] WARNING: CPU: 0 PID: 1 at mm/cma.c:106 cma_init_reserved_areas+0x7c/0x170
[    0.200547] Modules linked in:
[    0.203667] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.162-g76b3e88d56 #1
[    0.210954] Hardware name: Texas Instruments J721S2 EVM (DT)
[    0.216732] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
[    0.222866] pc : cma_init_reserved_areas+0x7c/0x170
[    0.227845] lr : cma_init_reserved_areas+0x78/0x170
[    0.232822] sp : ffff80001002bd30
[    0.236200] x29: ffff80001002bd30 x28: 0000000000000000 
[    0.241624] x27: ffff8000112ef400 x26: ffff800010e5a9f0 
[    0.247048] x25: 0000000000000000 x24: fffffdffffe00000 
[    0.252472] x23: ffff800010f01cb8 x22: ffff0000014c0000 
[    0.257897] x21: 0000000000038000 x20: 00000000008ac000 
[    0.263321] x19: ffff8000112ef400 x18: 0000000000000002 
[    0.268745] x17: 00000000ccabb18d x16: 00000000457a5043 
[    0.274169] x15: 0000000000000001 x14: 000000000003d777 
[    0.279593] x13: 0000000000000000 x12: 00000000000000c0 
[    0.285017] x11: 0000000000000068 x10: dead000000000122 
[    0.290440] x9 : fffffdffffe5ba00 x8 : 0000000000000002 
[    0.295865] x7 : ffff800011199330 x6 : ffff80006ec1f000 
[    0.301288] x5 : ffff80001002bca0 x4 : ffff00007fc93ae0 
[    0.306712] x3 : ffff00007fc938c0 x2 : 0000000000000000 
[    0.312137] x1 : 00000000008ac000 x0 : 0000000000000000 
[    0.317561] Call trace:
[    0.320053]  cma_init_reserved_areas+0x7c/0x170
[    0.324681]  do_one_initcall+0x54/0x1b8
[    0.328595]  kernel_init_freeable+0x220/0x2a0
[    0.333042]  kernel_init+0x14/0x114
[    0.336598]  ret_from_fork+0x10/0x34
[    0.340249] ---[ end trace b9a779f175b112e8 ]---
[    0.344977] Unable to handle kernel paging request at virtual address fffffe0020900000
[    0.353066] Mem abort info:
[    0.355912]   ESR = 0x96000006
[    0.359027]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.364451]   SET = 0, FnV = 0
[    0.367562]   EA = 0, S1PTW = 0
[    0.370765] Data abort info:
[    0.373699]   ISV = 0, ISS = 0x00000006
[    0.377613]   CM = 0, WnR = 0
[    0.380637] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000080fb8000
[    0.387483] [fffffe0020900000] pgd=00000000ffc92003, p4d=00000000ffc92003, pud=00000000ffc91003, pmd=0000000000000000
[    0.398333] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[    0.404022] Modules linked in:
[    0.407137] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.10.162-g76b3e88d56 #1
[    0.415846] Hardware name: Texas Instruments J721S2 EVM (DT)
[    0.421623] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
[    0.427757] pc : cma_init_reserved_areas+0x98/0x170
[    0.432735] lr : cma_init_reserved_areas+0x78/0x170
[    0.437712] sp : ffff80001002bd30
[    0.441090] x29: ffff80001002bd30 x28: 0000000000000640 
[    0.446514] x27: ffff8000112ef400 x26: ffff800010e5a9f0 
[    0.451939] x25: 0000000000000000 x24: fffffdffffe00000 
[    0.457363] x23: ffff800010f01cb8 x22: ffff0000014c0000 
[    0.462787] x21: 00000000000001c0 x20: 00000000008ac000 
[    0.468210] x19: ffff8000112ef400 x18: 0000000000000002 
[    0.473634] x17: 00000000ccabb18d x16: 00000000457a5043 
[    0.479058] x15: 0000000000000001 x14: 000000000003d777 
[    0.484481] x13: 0000000000000000 x12: 00000000000000c0 
[    0.489906] x11: 0000000000000068 x10: dead000000000122 
[    0.495329] x9 : fffffdffffe5ba00 x8 : 0000000000000002 
[    0.500753] x7 : ffff800011199330 x6 : ffff80006ec1f000 
[    0.506177] x5 : ffff80001002bca0 x4 : ffff00007fc93ae0 
[    0.511601] x3 : ffff00007fc938c0 x2 : 0000000000000000 
[    0.517026] x1 : 0000000000000640 x0 : 0000000020b00000 
[    0.522449] Call trace:
[    0.524940]  cma_init_reserved_areas+0x98/0x170
[    0.529562]  do_one_initcall+0x54/0x1b8
[    0.533474]  kernel_init_freeable+0x220/0x2a0
[    0.537918]  kernel_init+0x14/0x114
[    0.541475]  ret_from_fork+0x10/0x34
[    0.545125] Code: d349a2b5 aa0103fc cb803280 d37ae400 (f8786816) 
[    0.551353] ---[ end trace b9a779f175b112e9 ]---
[    0.556072] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.563895] SMP: stopping secondary CPUs
[    0.567902] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--

SD mode boot ,Normal startup.

  • 0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader

    This is not a fatal error.

    I have more questions to understand the issue better:

    1. What is boot flow?
    2. Is this a custom board or TI EVM?
    3. Is the error happening always or only certain iterations?
    4. Also paste the full failure logs.

    Best Regards,

    Keerthy 

  • 1.

    Booting Linux via OSPI
                goto <PDK>/packages/ti/boot/sbl/example/boot_app/scripts
                Run ./make_multicore_appimages.sh <board_name>
                Multicore images(lateapps) will be generated in <PDK>/packages/ti/boot/sbl/example/boot_app/binary/$BOARD/. Stage1 image corresponds to multicore_MCU2_0_MCU2_1_stage1.appimage, stage2 image corresponds to multicore_DSP_1_2_C7x_MCU3_0_MCU3_1_stage2.appimage and so on.

                sbl_cust_img_mcu1_0_release.tiimage at an offset of 0x0
                tifs.bin at an offset of 0x8000
                sbl_boot_app_ospi_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage at an offset of 0x100000
                multicore_MCU2_0_MCU2_1_stage1.appimage at an offset of 0x1fc0000
                multicore_DSP_1_2_C7x_MCU3_0_MCU3_1_stage2.appimageat an offset of 0x27c0000
                atf_optee.appimage at an offset of 0x1c0000
                tidtb_linux.appimage at an offset of 0x7c0000
                tikernelimage_linux.appimage at an offset of 0x1ec0000

    boot flow:  sbl_cust_img_mcu1_0_release.tiimage----->sbl_boot_app_ospi_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage--->atf_optee.appimage ----->tidtb_linux.appimage/tikernelimage_linux.appimage---->rootfs

    2. custom board.

    If changed to the following, start normal 

    sbl-->boot_app_ospi_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage--->atf_optee.appimage ----->ti_uboot_spl.appimage---->uboot.img--->kernel---->rootfs

    3. error happening always

    4. log:

    mcu domain log:

    Starting Sciserver..... PASSED

    MCU R5F App started at 22455 usecs
    OSPI RCLK running at 166666666 MHz.
    Loading BootImage
    Searching for X509 certificate ...not found
    Invalid magic number in Single image header
    Error parsing Main Domain appimage
    BootImage completed, status = -1
    Failure during image copy and parsing

    Loading BootImage
    Searching for X509 certificate ...not found
    Invalid magic number in Single image header
    Error parsing Main Domain appimage
    BootImage completed, status = -1
    Failure during image copy and parsing

    Loading BootImage
    parsing A72 appimage #1 addr 0x1c0000
    Searching for X509 certificate ...not found
    Sciclient_pmSetModuleState On, DevId 0x4...
    Copying 0xabc0 bytes to 0x70000000
    Copying 0x68880 bytes to 0x9e800000
    Setting entry point for core 0 @0x0
    parsing A72 appimage #2 addr 0x7c0000
    Searching for X509 certificate ...not found
    Sciclient_pmSetModuleState On, DevId 0x4...
    Copying 0x15c08 bytes to 0x82000000
    Setting entry point for core 0 @0x0
    parsing A72 appimage #3 addr 0x1ec0000
    Searching for X509 certificate ...not found
    Sciclient_pmSetModuleState On, DevId 0x4...
    Copying 0x1232a00 bytes to 0x80080000
    Setting entry point for core 0 @0x0
    BootImage completed, status = 0
    Calling Sciclient_procBootRequestProcessor, ProcId 0x20...
    Sciclient_procBootSetProcessorCfg, ProcId 0x20, EntryPoint 0x70000000...
    Sciclient_pmSetModuleClkFreq, DevId 0xca @ 2000000000Hz...
    Sciclient_pmSetModuleState Off, DevId 0xca...
    Sciclient_pmSetModuleState On, DevId 0xca...
    Sciclient_procBootReleaseProcessor, ProcId 0x20...
    SBL_SlaveCoreBoot completed for Core ID#0, Entry point is 0x70000000
    SBL_ospiClose called
    Board_flashOpen failed in SPI mode!!
    Boot App: Started at 30 usec
    Boot App: Total Num booted cores = 1
    Boot App: Booted Core ID #0 at 2229814 usecs

    MCU Boot Task started at 30 usecs and finished at 2242960 usecs

    main domain log:

    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 17:56:46, Mar  1 2023
    ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
    I/TC:
    I/TC: OP-TEE version: 3.20.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Wed Mar  1 17:56:56 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.3--v08.06.03 (Chill Capybar')
    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
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [    0.000000] Linux version 5.10.162-g76b3e88d56 (jun@jun) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Tue Dec 19 15:15:07 CST 2023
    [    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] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
    [    0.000000] Reserved memory: created DMA memory pool at 0x0000000097000000, size 16 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@97000000, compatible id shared-dma-pool
    [    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] OF: reserved mem: initialized node vision_apps_shared-memories, compatible id dma-heap-carveout
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000d8000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-lo@d8000000, 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] Reserved memory: created CMA memory pool at 0x00000008ac000000, size 896 MiB
    [    0.000000] OF: reserved mem: initialized node linux-cma-buffers@8ac000000, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
    [    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 0x0000000080000000-0x0000000096ffffff]
    [    0.000000]   node   0: [mem 0x0000000097000000-0x0000000097ffffff]
    [    0.000000]   node   0: [mem 0x0000000098000000-0x000000009e7fffff]
    [    0.000000]   node   0: [mem 0x000000009e800000-0x00000000b7ffffff]
    [    0.000000]   node   0: [mem 0x00000000b8000000-0x00000000d7ffffff]
    [    0.000000]   node   0: [mem 0x00000000d8000000-0x00000000dbffffff]
    [    0.000000]   node   0: [mem 0x00000000dc000000-0x00000000ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [    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.2
    [    0.000000] percpu: Embedded 22 pages/cpu s50392 r8192 d31528 u90112
    [    0.000000] Detected PIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: detected: EL2 vector hardening
    [    0.000000] CPU features: kernel page table isolation forced ON by KASLR
    [    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
    [    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
    [    0.000000] CPU features: detected: Spectre-BHB
    [    0.000000] CPU features: detected: ARM erratum 1742098
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
    [    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x2880000 root=/dev/mmcblk0p2  rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 1014412K/2097152K available (11200K kernel code, 1162K rwdata, 4300K rodata, 1856K init, 431K bss, 165236K 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] GICv3: Distributor has no Range Selector support
    [    0.000000] GICv3: 16 PPIs implemented
    [    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 @81c00000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x0000000081430000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000081440000
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.008392] Console: colour dummy device 80x25
    [    0.012961] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.023632] pid_max: default: 32768 minimum: 301
    [    0.028397] LSM: Security Framework initializing
    [    0.033150] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.040721] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.049677] rcu: Hierarchical SRCU implementation.
    [    0.054767] Platform MSI: msi-controller@1820000 domain created
    [    0.060992] PCI/MSI: /bus@100000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.070301] EFI services will not be available.
    [    0.075041] smp: Bringing up secondary CPUs ...
    ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
    I/TC: Secondary CPU 1 initializing
    I/TC: Secondary CPU 1 switching to normal world boot
    [    0.093979] Detected PIPT I-cache on CPU1
    [    0.094008] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
    [    0.094021] GICv3: CPU1: using allocated LPI pending table @0x0000000081450000
    [    0.094063] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
    [    0.094125] smp: Brought up 1 node, 2 CPUs
    [    0.123476] SMP: Total of 2 processors activated.
    [    0.128283] CPU features: detected: 32-bit EL0 Support
    [    0.133538] CPU features: detected: CRC32 instructions
    [    0.148459] CPU: All CPU(s) started at EL2
    [    0.152666] alternatives: patching kernel code
    [    0.157839] devtmpfs: initialized
    [    0.166194] KASLR disabled due to lack of seed
    [    0.170872] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.180839] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    [    0.187868] ------------[ cut here ]------------
    [    0.192593] WARNING: CPU: 0 PID: 1 at mm/cma.c:106 cma_init_reserved_areas+0x7c/0x170
    [    0.200591] Modules linked in:
    [    0.203712] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.162-g76b3e88d56 #1
    [    0.211000] Hardware name: Texas Instruments J721S2 EVM (DT)
    [    0.216778] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
    [    0.222912] pc : cma_init_reserved_areas+0x7c/0x170
    [    0.227890] lr : cma_init_reserved_areas+0x78/0x170
    [    0.232868] sp : ffff80001002bd30
    [    0.236246] x29: ffff80001002bd30 x28: 0000000000000000
    [    0.241671] x27: ffff8000112ef400 x26: ffff800010e5a9f0
    [    0.247096] x25: 0000000000000000 x24: fffffdffffe00000
    [    0.252519] x23: ffff800010f01cb8 x22: ffff0000014c0000
    [    0.257944] x21: 0000000000038000 x20: 00000000008ac000
    [    0.263367] x19: ffff8000112ef400 x18: 0000000000000002
    [    0.268791] x17: 000000003f08966c x16: 00000000214f489e
    [    0.274215] x15: 0000000000000001 x14: 000000000003d777
    [    0.279639] x13: 0000000000000000 x12: 00000000000000c0
    [    0.285062] x11: 0000000000000068 x10: dead000000000122
    [    0.290487] x9 : fffffdffffe5ba00 x8 : 0000000000000002
    [    0.295911] x7 : ffff800011199330 x6 : ffff80006ec1f000
    [    0.301334] x5 : ffff80001002bca0 x4 : ffff00007fc93ae0
    [    0.306758] x3 : ffff00007fc938c0 x2 : 0000000000000000
    [    0.312182] x1 : 00000000008ac000 x0 : 0000000000000000
    [    0.317607] Call trace:
    [    0.320098]  cma_init_reserved_areas+0x7c/0x170
    [    0.324725]  do_one_initcall+0x54/0x1b8
    [    0.328639]  kernel_init_freeable+0x220/0x2a0
    [    0.333086]  kernel_init+0x14/0x114
    [    0.336643]  ret_from_fork+0x10/0x34
    [    0.340296] ---[ end trace 978831a3587ab42e ]---
    [    0.345024] Unable to handle kernel paging request at virtual address fffffe0020900000
    [    0.353113] Mem abort info:
    [    0.355959]   ESR = 0x96000006
    [    0.359074]   EC = 0x25: DABT (current EL), IL = 32 bits
    [    0.364498]   SET = 0, FnV = 0
    [    0.367610]   EA = 0, S1PTW = 0
    [    0.370812] Data abort info:
    [    0.373746]   ISV = 0, ISS = 0x00000006
    [    0.377659]   CM = 0, WnR = 0
    [    0.380684] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000080fb8000
    [    0.387529] [fffffe0020900000] pgd=00000000ffc92003, p4d=00000000ffc92003, pud=00000000ffc91003, pmd=0000000000000000
    [    0.398379] Internal error: Oops: 96000006 [#1] PREEMPT SMP
    [    0.404069] Modules linked in:
    [    0.407184] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.10.162-g76b3e88d56 #1
    [    0.415892] Hardware name: Texas Instruments J721S2 EVM (DT)
    [    0.421670] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
    [    0.427803] pc : cma_init_reserved_areas+0x98/0x170
    [    0.432781] lr : cma_init_reserved_areas+0x78/0x170
    [    0.437758] sp : ffff80001002bd30
    [    0.441136] x29: ffff80001002bd30 x28: 0000000000000640
    [    0.446561] x27: ffff8000112ef400 x26: ffff800010e5a9f0
    [    0.451985] x25: 0000000000000000 x24: fffffdffffe00000
    [    0.457409] x23: ffff800010f01cb8 x22: ffff0000014c0000
    [    0.462834] x21: 00000000000001c0 x20: 00000000008ac000
    [    0.468257] x19: ffff8000112ef400 x18: 0000000000000002
    [    0.473681] x17: 000000003f08966c x16: 00000000214f489e
    [    0.479104] x15: 0000000000000001 x14: 000000000003d777
    [    0.484528] x13: 0000000000000000 x12: 00000000000000c0
    [    0.489952] x11: 0000000000000068 x10: dead000000000122
    [    0.495376] x9 : fffffdffffe5ba00 x8 : 0000000000000002
    [    0.500800] x7 : ffff800011199330 x6 : ffff80006ec1f000
    [    0.506225] x5 : ffff80001002bca0 x4 : ffff00007fc93ae0
    [    0.511649] x3 : ffff00007fc938c0 x2 : 0000000000000000
    [    0.517073] x1 : 0000000000000640 x0 : 0000000020b00000
    [    0.522496] Call trace:
    [    0.524987]  cma_init_reserved_areas+0x98/0x170
    [    0.529609]  do_one_initcall+0x54/0x1b8
    [    0.533522]  kernel_init_freeable+0x220/0x2a0
    [    0.537966]  kernel_init+0x14/0x114
    [    0.541523]  ret_from_fork+0x10/0x34
    [    0.545173] Code: d349a2b5 aa0103fc cb803280 d37ae400 (f8786816)
    [    0.551402] ---[ end trace 978831a3587ab42f ]---
    [    0.556122] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [    0.563943] SMP: stopping secondary CPUs
    [    0.567951] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---

  • cma_init_reserved_areas+0x7c/0x170

    The above is the main failing function. Have you made changes to the reserved memory section in the device tree?

    Best Regards,

    Keerthy

  • SD card mode, Boot in uboot normally,

    Then, converting the dtb Image to an appimage file and bootup it with mcu bootApp in OSPI mode will result in an exception.

  • When I modify dts to the following, the OSPI startup kernel will fail, while the modified SD card startup will not fail

    diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
    index 8730ca7a3..7315ec13b 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
    +++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
    @@ -19,9 +19,17 @@ / {
     
     	chosen {
     		stdout-path = "serial2:115200n8";
    -		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x2880000";
    +		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x2880000 root=/dev/mmcblk0p2  rw rootfstype=ext4 rootwait";
     	};
     
    +
    +
    +	dma_buf_phys {
    +				compatible = "ti,dma_buf_phys";
    +	};
    +	
    +
    +
     	aliases {
     		serial2 = &main_uart8;
     		mmc0 = &main_sdhci0;
    @@ -76,9 +84,8 @@ vdd_mmc1: fixedregulator-sd {
     		enable-active-high;
     		vin-supply = <&vsys_3v3>;
     		pinctrl-names = "default";
    
     
     	vdd_sd_dv: gpio-regulator-TLV71033 {
    @@ -246,7 +253,7 @@ J721S2_IOPAD(0x060, PIN_INPUT_PULLUP, 13) /* (AC27) MCASP2_AXR1.I2C3_SDA */
     	};
             sd_pwren_gpio_pins_default: sd-pwren-gpio-pins-default {
     		pinctrl-single,pins = <
    -			 J721S2_IOPAD(0x074, PIN_OUTPUT_PULLUP, 7) /* (R28) MCAN2_TX.GPIO0_29 */
    +			J721S2_IOPAD(0x050, PIN_OUTPUT_PULLUP, 7) /* (W27) MCASP1_AXR2.GPIO0_20 */
     		>;
     	};
     	main_mmc1_pins_default: main-mmc1-pins-default {
    @@ -836,7 +843,9 @@ &main_mcan14 {
     &main_mcan15 {
     	status = "disabled";
     };
    -
    +&main_mcan16 {
    +	status = "disabled";
    +};
     &main_mcan17 {
     	status = "disabled";
     };
    @@ -851,7 +860,6 @@ &main_cpsw_mdio {
     	phy1: ethernet-phy@4 {
     		reg = <4>;
     		reset-gpios = <&main_gpio0 54 GPIO_ACTIVE_LOW>;
    
     		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
     		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
     		ti,min-output-impedance;
    @@ -919,3 +927,4 @@ gpio {
     		};
     	};
     };
    +
    diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
    index 8b99f2da8..efd8190e3 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
    @@ -95,7 +95,13 @@ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a5000000 {
     			reg = <0x00 0xa5000000 0x00 0x100000>;
     			no-map;
     		};
    
    
     		main_r5fss1_core1_memory_region: r5f-memory@a5100000 {
     			compatible = "shared-dma-pool";
     			reg = <0x00 0xa5100000 0x00 0xf00000>;
    @@ -469,3 +475,226 @@ port@1 {
     		};
     	};
     };
    +&mcu_r5fss0_core0_memory_region {
    +	status = "disabled";
    +};
    +
    +&mcu_r5fss0_core0_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&mcu_r5fss0_core1_dma_memory_region {
    +status = "disabled";
    +};
    +
    +&mcu_r5fss0_core1_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss0_core0_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss0_core0_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss0_core1_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss0_core1_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss1_core0_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss1_core0_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss1_core1_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&main_r5fss1_core1_memory_region {
    +	status = "disabled";
    +};
    +
    +&c71_0_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&c71_0_memory_region {
    +	status = "disabled";
    +};
    +
    +&c71_1_dma_memory_region {
    +	status = "disabled";
    +};
    +
    +&c71_1_memory_region {
    +	status = "disabled";
    +};
    +
    +&rtos_ipc_memory_region {
    +	status = "disabled";
    +};
    +
    +&reserved_memory {
    +	#address-cells = <2>;
    +	#size-cells = <2>;
    +
    +	vision_apps_mcu_r5fss0_core0_dma_memory_region: vision-apps-r5f-dma-memory@a0000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa0000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_mcu_r5fss0_core0_memory_region: vision-apps-r5f-memory@a0100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa0100000 0x00 0x00f00000>;
    +		no-map;
    +	};
    +	vision_apps_mcu_r5fss0_core1_dma_memory_region: vision-apps-r5f-dma-memory@a1000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa1000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_mcu_r5fss0_core1_memory_region: vision-apps-r5f-memory@a1100000 {
    +	compatible = "shared-dma-pool";
    +		reg = <0x00 0xa1100000 0x00 0x00f00000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss0_core0_dma_memory_region: vision-apps-r5f-dma-memory@a2000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa2000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss0_core0_memory_region: vision-apps-r5f-memory@a2100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa2100000 0x00 0x01f00000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss0_core1_dma_memory_region: vision-apps-r5f-dma-memory@a4000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa4000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +       vision_apps_main_r5fss0_core1_memory_region: vision-apps-r5f-memory@a4100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa4100000 0x00 0x01f00000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss1_core0_dma_memory_region: vision-apps-r5f-dma-memory@a6000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa6000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss1_core0_memory_region: vision-apps-r5f-memory@a6100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa6100000 0x00 0x00f00000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss1_core1_dma_memory_region: vision-apps-r5f-dma-memory@a7000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa7000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_main_r5fss1_core1_memory_region: vision-apps-r5f-memory@a7100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa7100000 0x00 0x00f00000>;
    +		no-map;
    +	};
    +	vision_apps_rtos_ipc_memory_region: vision-apps-rtos-ipc-memory-region@a8000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xa8000000 0x00 0x02000000>;
    +		no-map;
    +	};
    +	vision_apps_memory_region: vision-apps-dma-memory@aa000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xaa000000 0x00 0x06000000>;
    +     	no-map;
    +	};
    +	vision_apps_c71_0_dma_memory_region: vision-apps-c71-dma-memory@b0000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xb0000000 0x00 0x00100000>;
    +	no-map;
    +	};
    +	vision_apps_c71_0_memory_region: vision-apps-c71_0-memory@b0100000 {
    +		compatible = "shared-dma-pool";
    +	reg = <0x00 0xb0100000 0x00 0x05f00000>;
    +		no-map;
    +	};
    +	vision_apps_c71_1_dma_memory_region: vision-apps-c71_1-dma-memory@b6000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xb6000000 0x00 0x00100000>;
    +		no-map;
    +	};
    +	vision_apps_c71_1_memory_region: vision-apps-c71_1-memory@b6100000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xb6100000 0x00 0x01f00000>;
    +		no-map;
    +	};
    +	vision_apps_shared_region: vision_apps_shared-memories {
    +		compatible = "dma-heap-carveout";
    +		reg = <0x00 0xb8000000 0x00 0x20000000>;
    +	};
    +	vision_apps_core_heaps_lo: vision-apps-core-heap-memory-lo@d8000000 {
    +		compatible = "shared-dma-pool";
    +		reg = <0x00 0xd8000000 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;
    +	};
    +	linux_cma_region: linux-cma-buffers@8ac000000 {
    +		compatible = "shared-dma-pool";
    +reusable;
    +		reg = <0x08 0xac000000 0x00 0x38000000>;
    +		linux,cma-default;
    +};
    +};
    +
    +&mcu_r5fss0_core0 {
    +        memory-region = <&vision_apps_mcu_r5fss0_core0_dma_memory_region>,
    +			<&vision_apps_mcu_r5fss0_core0_memory_region>;
    +};
    +
    +&mcu_r5fss0_core1 {
    +	memory-region = <&vision_apps_mcu_r5fss0_core1_dma_memory_region>,
    +			<&vision_apps_mcu_r5fss0_core1_memory_region>;
    +};
    +
    +&main_r5fss0_core0 {
    +	memory-region = <&vision_apps_main_r5fss0_core0_dma_memory_region>,
    +			<&vision_apps_main_r5fss0_core0_memory_region>;
    +};
    +
    +&main_r5fss0_core1 {
    +	memory-region = <&vision_apps_main_r5fss0_core1_dma_memory_region>,
    +			<&vision_apps_main_r5fss0_core1_memory_region>;
    +};
    +
    +&main_r5fss1_core0 {
    +	memory-region = <&vision_apps_main_r5fss1_core0_dma_memory_region>,
    +			<&vision_apps_main_r5fss1_core0_memory_region>;
    +};
    +
    +&main_r5fss1_core1 {
    +	memory-region = <&vision_apps_main_r5fss1_core1_dma_memory_region>,
    +			<&vision_apps_main_r5fss1_core1_memory_region>;
    +};
    +
    +&c71_0 {
    +	memory-region = <&vision_apps_c71_0_dma_memory_region>,
    +			<&vision_apps_c71_0_memory_region>;
    +};
    +

  • Hi,

    Can you make sure that dtbs are loading correctly when you boot from ospi?

    Just compare the phase where the Linux and dtbs are loaded.

    Also can you try with default SDK and check if ospi boot works well?

    Best Regards,

    Keerthy 

  • Hi.

    I can confirm that it is correct.

    You can also boot using the default one, as using OSPI to boot Linux requires adding k3-j721s2-vision apps. dtbo to k3-j721s2-common proc board.dtb, but there are also exceptions after adding it

  • changed to the following, start normal 

    sbl-->boot_app_ospi_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage--->atf_optee.appimage ----->ti_uboot_spl.appimage---->uboot.img---

    So if U-boot is part of the boot flow then boot is working fine. So could you check the log difference with and without U-Boot w.r.t cma regions?

    Regards,

    Keerthy