i.MX6SX boot Cortex M4 core from U-Boot

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6SX boot Cortex M4 core from U-Boot

Jump to solution
2,585 Views
LPs
Contributor III

Hi all,

   I'm working on a 6SX SABRE-SBD board. It mounts a i.MX6SX dual core CPU: Cortex A9 and Cortex M4.

I'm using U-Boot 2014.04.

I'm trying to boot M4 core from U-Boot and start linux on SD.

At the moment, following i.MX_Linux_User's_Guide.pdf  and chapter 53 of i.MX_6_Linux_Reference_Manual.pdf, I wrote the M4 mcc demo on the Cortex M4.

I know that it works beacause of running script m4boot I can see outputs on the Cortex M4 serial console.

So far I change the bootcmd U-Boot environment variable to add "run m4boot;" before the existant commands.

Actual bootcmd is: run m4boot; mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi;

What is not working is that with the new bootcmd the M4 core starts correctly, the linux kernel start but it stops with the following error:

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

Unable to handle kernel NULL pointer dereference at virtual address 00000018

pgd = 80004000

[00000018] *pgd=00000000

Internal error: Oops: 805 [#1] PREEMPT SMP ARM

Modules linked in:

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.53-1.1.0_ga+g496fbe0 #1

task: a806c000 ti: a806e000 task.ti: a806e000

PC is at imx_amp_power_init+0x8c/0xd8

LR is at __arm_ioremap+0x18/0x1c

pc : [<80c8a4e4>]    lr : [<80019128>]    psr: a0000113

sp : a806fef8  ip : 00000000  fp : 00000000

r10: 80caff6c  r9 : 80c8a458  r8 : 00000014

r7 : 00000001  r6 : 80d18838  r5 : 80d18838  r4 : 00000001

r3 : 00000000  r2 : 80d18838  r1 : 00000000  r0 : a800f180

Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 10c53c7d  Table: 8000404a  DAC: 00000015

Process swapper/0 (pid: 1, stack limit = 0xa806e238)

Stack: (0xa806fef8 to 0xa8070000)

fee0:                                                       80cbb1b8 00000007

ff00: 80d178c0 80d178c0 80d178c0 80008704 00000103 80047e94 80caff44 a806e010

ff20: 80b779d4 80c3c5e8 00000007 00000007 80047700 80047758 00000000 80cbb1b8

ff40: 00000007 80d178c0 80d178c0 80c724dc 00000103 80caff6c 80caff64 80c72be0

ff60: 00000007 00000007 80c724dc ce8fffe9 ebdeff7e fd4df71c a806ff9c 00000000

ff80: 80679540 00000000 00000000 00000000 00000000 00000000 00000000 80679548

ffa0: a806e000 00000000 80679540 8000e118 00000000 00000000 00000000 00000000

ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 bfdeef2d e9037f49

[<80c8a4e4>] (imx_amp_power_init+0x8c/0xd8) from [<80008704>] (do_one_initcall+0x108/0x158)

[<80008704>] (do_one_initcall+0x108/0x158) from [<80c72be0>] (kernel_init_freeable+0x138/0x1d8)

[<80c72be0>] (kernel_init_freeable+0x138/0x1d8) from [<80679548>] (kernel_init+0x8/0x158)

[<80679548>] (kernel_init+0x8/0x158) from [<8000e118>] (ret_from_fork+0x14/0x3c)

Code: e0233498 e2844001 e0862102 e5920004 (e5c37018)

---[ end trace d49a49147a58376d ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

If I restore the original bootcmd It returns to work well.

What I have to change in uboot environment to make the M4 and A9 running at the same time?

Tags (2)
1 Solution
901 Views
LPs
Contributor III

Finally I got it.

The key thing that is not wrote on the freescale guide is that the dtb file has to be changed.

All errors posted in previous post are related to the default uboot dtb file that doesn't map the M4 core.

To solve the issue just change the fdt_file uboot environment variable to imx6sx-sdb-m4.dtb

View solution in original post

3 Replies
902 Views
LPs
Contributor III

Finally I got it.

The key thing that is not wrote on the freescale guide is that the dtb file has to be changed.

All errors posted in previous post are related to the default uboot dtb file that doesn't map the M4 core.

To solve the issue just change the fdt_file uboot environment variable to imx6sx-sdb-m4.dtb

901 Views
CarlosCasillas
NXP Employee
NXP Employee

Hello,

Thanks for sharing your solution! We will check the missing step for adding it on the next revision of the documentation.

Best regards!
/Carlos

0 Kudos
901 Views
LPs
Contributor III

I found out something more.

The kernel panic is caused by the variable shared_mem_paddr that has value 0.

This variable is retrieved by the function imx6sx_clocks_init that obviously print the errors below:

clk: shared clk nodes exceed the max number!

clk: fsl,shared-mem-addr NOT found!

clk: fsl,shared-mem-size NOT found!

So far I think that the problem is at the top of the function imx6sx_clocks_init where the following code is executed:

np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");

  base = of_iomap(np, 0);

I guess that np is not retieved...

Have anyone  suggestions?