kexec and kdump in imx6ull with kernel 4.9.11

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

kexec and kdump in imx6ull with kernel 4.9.11

3,947 Views
arthur_rythm
Contributor III

Hi,

I tried to work with kexec and kdump on kernel rel_imx_4.1.15_2.1.0_ga without success:

https://community.nxp.com/message/982634?commentID=982634#comment-982634 

As sugested by FabioEstevam‌ on this comment. I start a new topic and run the test with 4.9.11 release instead.

Problem is that with this kernel I am not able to init crashkernel anymore :

# dmesg | grep -i crash
crashkernel reservation failed - memory is in use.

I was using the same kernel parameter than before : crashkernel=50M@0x81000000

A message on mailing list kernel is talking about CMA and crashkernel : Proposal for run time memory allocation for crash kernel . Its seems that we have to use memory block in CMA block ? I have a CMA in my kernel command (cma=96M). Message from kernel which show the cma :

# dmesg | grep -i cma
Reserved memory: created CMA memory pool at 0x8a000000, size 96 MiB

So I tried to init crashkernel with : crashkernel=50M@0x8a000000 but the result is the same.

Unfortunately I dont have anymore an imx6ull or imx6ul evk to run the test, my evk are broken. I will order a new one today. I will try to test kdump on evk with official release as soon as possible.

Thanks,

Arthur.

Labels (2)
Tags (4)
0 Kudos
Reply
9 Replies

3,190 Views
fabio_estevam
NXP Employee
NXP Employee

Could you try with kernel 4.16 and see if it works there?

0 Kudos
Reply

3,189 Views
arthur_rythm
Contributor III

I am able to load the kexec kernel correctly after the kernel panic now.

I need to check now if I am able to read the dump.

I am using the mainline kernel v4.16-rc7 +  imx_v6_v7 defconfig. it reminds me this nice topic : 

https://community.nxp.com/thread/385542 

I will try to align defconfig and perhaps kernel/kexec_core to find the issue ?

0 Kudos
Reply

3,189 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Arthur,

I'm not quite sure what the problem is with crashkernel on your system. Seems to work fine on my 4.1.15 kernel on an i.MX 6QP SDB.

 

root@imx6qpsabresd:~# dmesg | egrep -i crash
[    0.000000] Reserving 50MB of memory at 960MB for crashkernel (System RAM: 1024MB)


However, it doesn't seem to matter what I put in the cma= kernel parameter. It always sets it to 320 MiB at 0x3c000000. Below the size is ignored, but it seems to ignore addresses too.

 

root@imx6qpsabresd:~# dmesg | egrep -i cma
[    0.000000] Reserved memory: created CMA memory pool at 0x3c000000, size 320 MiB
[    0.000000] Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 psplash=false vt.global_cursor_default=0 cma=96M@0x3c000000 crashkernel=50M@0x3c000000
[    0.000000] Memory: 697660K/1048576K available (8616K kernel code, 526K rwdata, 3144K rodata, 436K init, 458K bss, 23236K reserved, 327680K cma-reserved, 0K highmem)

 

Looking forward to your EVK results.

Regards,

Carlos

2,448 Views
billchen
Contributor III

thanks for your reply , I confirm it has good result. I couldn't execute "kexec -p " successfully before that. 

0 Kudos
Reply

2,444 Views
billchen
Contributor III

but after I run "echo c >/proc/sysrq-trigger" 

It stopped at 

"Loading crashdump kernel...

Bye! " 

                                  "

0 Kudos
Reply

3,190 Views
arthur_rythm
Contributor III

Sorry for the delay I was out of office for few weeks. So I received my imx6ull evk. 

Test result are exactly the same on evk.

For both test :

device tree : imx6ull-14x14-evk

kernel defconfig : imx_v7

uboot git : git://git.freescale.com/imx/uboot-imx.git

uboot release : rel_imx_4.1.15_2.1.0_ga

git kernel : git://git.freescale.com/imx/linux-imx.git

tag release : rel_imx_4.1.15_2.0.0_ga

Result : load kernel with kexec. Simulate kernel panic then freeze after this output :

[<803476f8>] (sysrq_handle_crash) from [<00000000>] ( (null))
Code: e5c32000 e8bd8010 e3a03000 e3a02001 (e5c32000)
Loading crashdump kernel...
Bye

git kernel : git://git.freescale.com/imx/linux-imx.git

tag release : rel_imx_4.9.x_1.0.0_ga

Result : crashkernel init failed :

# dmesg | grep -i crash
crashkernel reservation failed - memory is in use.

0 Kudos
Reply

3,190 Views
arthur_rythm
Contributor III

Anyone to test on his own imx6ull evk to confirm my result ? 

0 Kudos
Reply

3,190 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Arthur,

Tested on a 4.9 NXP kernel and it worked fine:

# dmesg | grep crash
Reserving 50MB of memory at 2176MB for crashkernel (System RAM: 512MB)
Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw crashkernel=50M

Please note that I use 'crashkernel=50M' with no extra parameters.

0 Kudos
Reply

3,190 Views
arthur_rythm
Contributor III

Always KO.

Topic on linux arm mailing list :

issue with kexec/kdump on imx6ull - Patchwork 

I was able to fix an issue related to kexec thanks to Russel. ARM support is broken in official kexec repository. But my test always failed even after the fix. I have probably more issue on my evk.

I tried to enable earlyprintk to try to debug kernel hang but no output :

Loading crashdump kernel...
Bye!
Uncompressing Linux... done, booting the kernel.

Kexec is probably not able to find the kernel. 

0 Kudos
Reply