Ethernet crash LS1021A TWR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ethernet crash LS1021A TWR

1,044 Views
amolshrotri
Contributor II

Hello,

I am trying customized bootload to boot linux on LS1021A rev2 board. We could boot the board and launch the Linux kernel. But I am facing issue while accessing ethernet interface, it gives kernel crash.

1. When i execute command #> udhcp eth2 

2. Instead of dhcp i tried to set staic IP and ping localhost it works fine but when try to ping remote IP gets same kernel crash.

udhcpc: started, v1.25.1
udhcpc: sending discover
udhcpc: sending discover
fsl-gianfar soc:ethernet@2d90000 eth2: Link is Up - 1Gbps/Full - flow control rx/tx
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:318 dev_watchdog+0x159/0x1bc()
NETDEV WATCHDOG: eth2 (fsl-gianfar): transmit queue 0 timed out
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.8-rt8 #24
Hardware name: Freescale LS1021A
[<8001b74d>] (unwind_backtrace) from [<80018d5d>] (show_stack+0x11/0x12)
[<80018d5d>] (show_stack) from [<803acb1d>] (dump_stack+0x51/0x64)
[<803acb1d>] (dump_stack) from [<80025f37>] (warn_slowpath_common+0x63/0x88)
[<80025f37>] (warn_slowpath_common) from [<80025f7d>] (warn_slowpath_fmt+0x21/0x2a)
[<80025f7d>] (warn_slowpath_fmt) from [<8033e9ad>] (dev_watchdog+0x159/0x1bc)
[<8033e9ad>] (dev_watchdog) from [<800583e9>] (call_timer_fn+0x43/0xb2)
[<800583e9>] (call_timer_fn) from [<800588db>] (run_timer_softirq+0x16f/0x1a4)
[<800588db>] (run_timer_softirq) from [<8002889d>] (__do_softirq+0xd1/0x1c8)
[<8002889d>] (__do_softirq) from [<80028de9>] (irq_exit+0x51/0xa0)
[<80028de9>] (irq_exit) from [<8004e215>] (__handle_domain_irq+0x5d/0x7c)
[<8004e215>] (__handle_domain_irq) from [<80009281>] (gic_handle_irq+0x2d/0x44)
[<80009281>] (gic_handle_irq) from [<803b005b>] (__irq_svc+0x3b/0x5c)
Exception stack(0x80bddf58 to 0x80bddfa0)
df40:                                                       00000001 00000000
df60: 00000000 80022041 80bdc000 00000000 80bddfa8 803b5abc 00000000 00000001
df80: 805f3410 00000000 80bde180 80bddfa0 80016deb 80016dec 400d0033 ffffffff
[<803b005b>] (__irq_svc) from [<80016dec>] (arch_cpu_idle+0x1a/0x26)
[<80016dec>] (arch_cpu_idle) from [<800487d3>] (cpu_startup_entry+0x1db/0x218)
[<800487d3>] (cpu_startup_entry) from [<805bf91f>] (start_kernel+0x27b/0x2e4)
---[ end trace 7ca9e3f44035910c ]---
fsl-gianfar soc:ethernet@2d90000 eth2: Link is Up - 1Gbps/Full - flow control rx/tx
udhcpc: no lease, failing
FAIL
From bootloader, I even configuring below registers as
1. SCFG_ETSECDMAMCR = 0xf800120f
2. SCFG_ETSECCMCR = 0x4000000

Do I need to add any additional configuration in bootloader before launching kernel?

Thanks & Regards,

Amol M Shrotri

0 Kudos
4 Replies

775 Views
amolshrotri
Contributor II

Just want to add I am using SDK2.0 kernel.

0 Kudos

775 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello AMOL SHROTRI,

Would you please provide your modified file in u-boot?

Have you verified whether this Ethernet port can work under u-boot?

In addition, have you modified Linux Kernel Kernel or dts file?


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

775 Views
amolshrotri
Contributor II

Hello Yiping,

Thanks for the response. 

Yes when booting the kernel with u-boot it works fine.

Regarding DTS I am using the same SDK dts with updates for MAC addresses and clock settings etc, as I am not using uboot dtb updates are not happening at run time. 

Here are different scenarios , i tried to debug and find root cause,

1. With customized boot-loader we were trying to boot in Secure SVC mode. (My understanding if we are booting in secure mode boot-loader do not need to configure GIC registers e.g. setting GIC group registers to 1 and priority mask registers etc).

2. When I checked CPU mode after booting with u-boot, it was SVC non-secure, so with customizes boot-loader I tried to set all above GIC registers and switch the CPU mode to non-secure before jumping to zImage, still same issue. Kernel boots but while executing dhcp command gets same queue timeout issue.

3. Also one more observation, when booting seeing error message as "error: Could not get TBI device", even MDIO device gets probed. But when I boot the same kernel image and dtb with u-boot, it just works fine.

4. One more thing I tried with u-boot, I wanted to boot in SVC secure mode, So I modified the function boot_jump_linux() from arch/arm/lib/bootm.c as calling kernel entry directly as kernel_entry(0, machid, r2); instead as secure_ram_addr(_do_nonsec_entry)(kernel_entry, 0, machid, r2);  For this I commented all code that sets GIC registers in functions armv7_init_nonsec() and _nonsec_init(), with this kernel boots but gives same queue timeout error.

I am not able to exactly pin point what am I missing to configure before launching kernel.

Before launching kernel we are making sure to disable MMU, caches and interrupts,

Thanks & Regards,

Amol M Shrotri

0 Kudos

775 Views
amolshrotri
Contributor II

Hello Yiping,

 

Want to add one more observation,

Without any change in u-boot, I set the environment variable bootm_boot_mode to 'sec', so it directly launch the kernel in secure mode. With this setting i am observing the same queue timeout issue.

Thanks & Regards,

Amol M Shrotri

0 Kudos