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.

Linux/PROCESSOR-SDK-TDAX: Processor SDK 3.02.00.03 kexec

Part Number: PROCESSOR-SDK-TDAX

Tool/software: Linux

Hi Expert:

How to run kexec with Processor SDK 3.02.00.03 on J6 EVM RevG?

I have the following steps but it cannot work.

-1-

using Yocto to build kexec-tools and generate the binary kexec in "/ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03/yocto-layers/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/kexec-tools/2.0.12+2.0.13pre-r1/build/build/sbin"

-2-

CONFIG_KEXEC=y

CONFIG_CRASH_DUMP=y

rebuild zImage

-3-

update zImage and copy kexec binary to folder /mnt in SD card

-4-

cat /proc/cmdline

console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M rootfstype=ext4 snd.slots_reserved=1,1

root@dra7xx-evm:/mnt# ./kexec -d --type zImage -p /boot/zImage --command-line="console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M rootfstype=ext4 snd.slots_reserved=1,1"


Memory for crashkernel is not reserved
Please reserve memory by passing"crashkernel=X@Y" parameter to kernel
Then try to loading kdump kernel
root@dra7xx-evm:/mnt#

how can I set the reserve memory for "crashkernel"?

Regards

Joe

  • Hi,

    If you can stop at the uboot autoboot, you can change the bootargs as follows:
    uboot#
    uboot# setenv bootargs 'console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M crashkernel=1M rootfstype=ext4 snd.slots_reserved=1,1'
    uboot# saveenv

    Note: Above is just an example reserving 1M. If boot args are parsed from a script, you need to change the script
  • Hi,

    I have update the "crashkernel=32M" to uenv.txt file in boot partition.

    check the kernel boot log
    "console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M crashkernel=32M rootfstype=ext4 snd.slots_reserved=1,1"

    but after press

    root@dra7xx-evm:/mnt# ./kexec -d --type zImage -p /boot/zImage --command-line="console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M crashkernel=32M rootfstype=ext4 snd.slots_reserved=1,1"
    Memory for crashkernel is not reserved
    Please reserve memory by passing"crashkernel=X@Y" parameter to kernel
    Then try to loading kdump kernel
    root@dra7xx-evm:/mnt#

    it still say "Memory for crashkernel is not reserved".

    Did you meet this issue before?
    do you have guide how to make kexec to work on ProcessSDK?

    Joe
  • Hi,

    after execute kexec command there is memory oom-killer. could you please have a check?

    root@dra7xx-evm:~# cd /mnt
    root@dra7xx-evm:/mnt# ./kexec -d -l /boot/zImage --dtb=/boot/dra7-evm-infoadas.dtb --command-line="console=ttyO0,115200n8 elevator=noop root=PARTUUID=64dcd133-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=3 consoleblank=0 cma=64M crashkernel=32M rootfstype=ext4 snd.slots_reserved=1,1"
    Try gzip decompression.
    Try LZMA decompression.
    lzma_decompress_file: read on /boot/zImage of 65536 bytes failed
    kernel: 0xb6ab2008 kernel_size: 0x3789d0
    MEMORY RANGES
    0000000080000000-00000000a7ffffff (0)
    00000000aa000000-00000000dfcfffff (0)
    kexec_load: entry = 0x80008000 flags = 0x280000
    nr_segments = 2
    segment[0].buf = 0xb6ab2008
    segment[0].bufsz = 0x3789d0
    segment[0].mem = 0x80008000
    segment[0].memsz = 0x379000
    segment[1].buf = 0x53e80
    segment[1].bufsz = 0x1b3f7
    segment[1].mem = 0x81165000
    segment[1].memsz = 0x1c000
    [ 41.892488] kexec invoked oom-killer: gfp_mask=0x24000c0, order=0, oom_score_adj=0
    [ 41.900147] kexec cpuset=/ mems_allowed=0
    [ 41.904197] CPU: 0 PID: 1186 Comm: kexec Tainted: G W 4.4.45-dirty #7
    [ 41.911799] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 41.917917] Backtrace:
    [ 41.920396] [<c00131b8>] (dump_backtrace) from [<c00133b4>] (show_stack+0x18/0x1c)
    [ 41.927996] r7:ed9ff678 r6:60070013 r5:00000000 r4:c0974f4c
    [ 41.933721] [<c001339c>] (show_stack) from [<c02b7c8c>] (dump_stack+0x8c/0xa0)
    [ 41.940980] [<c02b7c00>] (dump_stack) from [<c011fdcc>] (dump_header+0x5c/0x1ac)
    [ 41.948406] r7:ed9ff678 r6:00000000 r5:edbdfe74 r4:ed9ff200
    [ 41.954127] [<c011fd70>] (dump_header) from [<c00d57ac>] (oom_kill_process+0x2fc/0x448)
    [ 41.962162] r10:c094d878 r9:000005af r8:00000005 r7:ed9ff678 r6:00046877 r5:edbdfe74
    [ 41.970066] r4:ed9ff200
    [ 41.972620] [<c00d54b0>] (oom_kill_process) from [<c00d5c58>] (out_of_memory+0x2f0/0x32c)
    [ 41.980830] r10:c094d878 r9:000005af r8:c094d878 r7:c094daf8 r6:00046877 r5:edbdfe74
    [ 41.988733] r4:ed9ff200
    [ 41.991287] [<c00d5968>] (out_of_memory) from [<c00dab2c>] (__alloc_pages_nodemask+0x924/0x964)
    [ 42.000021] r10:c09a3740 r9:024000c0 r8:00000000 r7:c09a3750 r6:edbde000 r5:00000000
    [ 42.007925] r4:00000000
    [ 42.010482] [<c00da208>] (__alloc_pages_nodemask) from [<c00ae660>] (kimage_alloc_pages+0x1c/0x68)
    [ 42.019477] r10:ff92cf1b r9:ef863fa8 r8:c09d68c0 r7:c094d590 r6:024000c0 r5:00000000
    [ 42.027380] r4:eda9d800
    [ 42.029935] [<c00ae644>] (kimage_alloc_pages) from [<c00af16c>] (kimage_alloc_control_pages+0x1a0/0x2a8)
    [ 42.039453] r7:c094d590 r6:024000c0 r5:00000000 r4:eda9d800
    [ 42.045172] [<c00aefcc>] (kimage_alloc_control_pages) from [<c00afde8>] (kimage_alloc_init+0xd8/0x1ec)
    [ 42.054515] r10:00000000 r9:edbdff74 r8:0004bce0 r7:80008000 r6:eda9d800 r5:80008000
    [ 42.062416] r4:00000000
    [ 42.064969] [<c00afd10>] (kimage_alloc_init) from [<c00b001c>] (SyS_kexec_load+0x120/0x1fc)
    [ 42.073353] r10:0000066c r9:00000000 r8:0004bce0 r7:80008000 r6:00000002 r5:00280000
    [ 42.081254] r4:00000000 r3:0004bce0
    [ 42.084863] [<c00afefc>] (SyS_kexec_load) from [<c000fae0>] (ret_fast_syscall+0x0/0x34)
    [ 42.092898] r10:00000000 r9:edbde000 r8:c000fc84 r7:0000015b r6:b6f7e604 r5:beb8c870
    [ 42.100798] r4:00000000
    [ 42.104138] Mem-Info:
    [ 42.106747] active_anon:4385 inactive_anon:3452 isolated_anon:0
    [ 42.106747] active_file:1288 inactive_file:3866 isolated_file:0
    [ 42.106747] unevictable:0 dirty:8 writeback:39 unstable:0
    [ 42.106747] slab_reclaimable:1151 slab_unreclaimable:2763
    [ 42.106747] mapped:3331 shmem:3816 pagetables:147 bounce:0
    [ 42.106747] free:234464 free_pcp:29 free_cma:65210
    [ 42.140240] DMA free:198584kB min:1672kB low:2088kB high:2508kB active_anon:2180kB inactive_anon:7800kB active_file:88kB inactive_file:132kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:753664kB managed:372188kB mlocked:0kB dirty:32kB writeback:156kB mapped:168kB shmem:7968kB slab_reclaimable:4604kB slab_unreclaimable:11052kB kernel_stack:1072kB pagetables:60kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:196608kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    [ 42.184787] lowmem_reserve[]: 0 0 701 701
    [ 42.188953] HighMem free:739272kB min:512kB low:2224kB high:3936kB active_anon:15360kB inactive_anon:6008kB active_file:5064kB inactive_file:15332kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:783360kB managed:783360kB mlocked:0kB dirty:0kB writeback:0kB mapped:13156kB shmem:7296kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:528kB unstable:0kB bounce:0kB free_pcp:116kB local_pcp:116kB free_cma:64232kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    [ 42.233554] lowmem_reserve[]: 0 0 0 0
    [ 42.237313] DMA: 168*4kB (UME) 99*8kB (UME) 28*16kB (UME) 3*32kB (ME) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 48*4096kB (C) = 198616kB
    [ 42.250355] HighMem: 743*4kB (UMC) 308*8kB (UMC) 121*16kB (UMC) 65*32kB (UMC) 40*64kB (UMC) 18*128kB (UMC) 6*256kB (UMC) 3*512kB (M) 3*1024kB (M) 7*2048kB (UMC) 172*4096kB (MC) = 739308kB
    [ 42.267299] 8980 total pagecache pages
    [ 42.271190] 0 pages in swap cache
    [ 42.274515] Swap cache stats: add 0, delete 0, find 0/0
    [ 42.279772] Free swap = 0kB
    [ 42.282677] Total swap = 0kB
    [ 42.285594] 384256 pages RAM
    [ 42.288492] 195840 pages HighMem/MovableOnly
    [ 42.292790] 95369 pages reserved
    [ 42.296055] 65536 pages cma reserved
    [ 42.299651] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
    [ 42.308275] [ 123] 0 123 2320 658 6 2 0 0 systemd-journal
    [ 42.317823] [ 192] 0 192 2652 670 7 2 0 -1000 systemd-udevd
    [ 42.327183] [ 282] 998 282 3035 365 6 2 0 0 systemd-timesyn
    [ 42.336713] [ 586] 999 586 1081 546 5 2 0 -900 dbus-daemon
    [ 42.345882] [ 704] 997 704 670 479 4 2 0 0 systemd-network
    [ 42.355409] [ 734] 0 734 651 384 5 2 0 0 systemd-logind
    [ 42.364851] [ 758] 994 758 1166 528 6 2 0 0 avahi-daemon
    [ 42.374121] [ 788] 0 788 2188 1491 6 2 0 0 ofonod
    [ 42.382862] [ 818] 994 818 1166 386 5 2 0 0 avahi-daemon
    [ 42.392128] [ 845] 0 845 495 299 4 2 0 0 syslogd
    [ 42.400957] [ 851] 0 851 479 335 5 2 0 0 starter
    [ 42.409790] [ 855] 0 855 491 298 4 2 0 0 klogd
    [ 42.418447] [ 961] 0 961 35760 1095 25 2 0 0 charon
    [ 42.427192] [ 993] 0 993 1217 515 5 2 0 0 login
    [ 42.435837] [ 994] 0 994 447 287 4 2 0 0 agetty
    [ 42.444604] [ 995] 996 995 747 465 5 2 0 0 systemd-resolve
    [ 42.454133] [ 1006] 0 1006 1125 518 6 2 0 0 lighttpd
    [ 42.463052] [ 1033] 0 1033 491 202 3 2 0 0 telnetd
    [ 42.471881] [ 1036] 0 1036 2441 234 3 2 0 0 lad_dra7xx
    [ 42.480974] [ 1042] 65534 1042 614 404 4 2 0 0 thttpd
    [ 42.489714] [ 1047] 0 1047 574 226 4 2 0 0 rngd
    [ 42.498297] [ 1170] 0 1170 1340 995 5 2 0 0 systemd
    [ 42.507132] [ 1174] 0 1174 1851 517 6 2 0 0 (sd-pam)
    [ 42.516039] [ 1181] 0 1181 669 483 5 2 0 0 sh
    [ 42.524431] [ 1186] 0 1186 1404 1223 5 2 0 0 kexec
    [ 42.533083] Out of memory: Kill process 788 (ofonod) score 5 or sacrifice child
    [ 42.540438] Killed process 788 (ofonod) total-vm:8752kB, anon-rss:3060kB, file-rss:2904kB
    [ 42.560820] kexec invoked oom-killer: gfp_mask=0x24000c0, order=0, oom_score_adj=0
    [ 42.568459] kexec cpuset=/ mems_allowed=0
    [ 42.572500] CPU: 1 PID: 1186 Comm: kexec Tainted: G W 4.4.45-dirty #7
    [ 42.580097] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 42.586212] Backtrace:
    [ 42.588679] [<c00131b8>] (dump_backtrace) from [<c00133b4>] (show_stack+0x18/0x1c)
    [ 42.596275] r7:eda1ae78 r6:60060113 r5:00000000 r4:c0974f4c
    [ 42.601987] [<c001339c>] (show_stack) from [<c02b7c8c>] (dump_stack+0x8c/0xa0)
    [ 42.609242] [<c02b7c00>] (dump_stack) from [<c011fdcc>] (dump_header+0x5c/0x1ac)
    [ 42.616664] r7:eda1ae78 r6:00000000 r5:edbdfe74 r4:eda1aa00
    [ 42.622373] [<c011fd70>] (dump_header) from [<c00d57ac>] (oom_kill_process+0x2fc/0x448)
    [ 42.630406] r10:c094d878 r9:000004aa r8:00000004 r7:eda1ae78 r6:00046877 r5:edbdfe74
    [ 42.638297] r4:eda1aa00
    [ 42.640845] [<c00d54b0>] (oom_kill_process) from [<c00d5c58>] (out_of_memory+0x2f0/0x32c)
    [ 42.649051] r10:c094d878 r9:000004aa r8:c094d878 r7:c094daf8 r6:00046877 r5:edbdfe74
    [ 42.656941] r4:eda1aa00
    [ 42.659489] [<c00d5968>] (out_of_memory) from [<c00dab2c>] (__alloc_pages_nodemask+0x924/0x964)
    [ 42.668219] r10:c09a3740 r9:024000c0 r8:00000000 r7:c09a3750 r6:edbde000 r5:00000000
    [ 42.676108] r4:00000000
    [ 42.678656] [<c00da208>] (__alloc_pages_nodemask) from [<c00ae660>] (kimage_alloc_pages+0x1c/0x68)
    [ 42.687648] r10:ff92ce85 r9:ef862a90 r8:c09d68c0 r7:c094d590 r6:024000c0 r5:00000000
    [ 42.695537] r4:eda9d800
    [ 42.698085] [<c00ae644>] (kimage_alloc_pages) from [<c00af16c>] (kimage_alloc_control_pages+0x1a0/0x2a8)
    [ 42.707599] r7:c094d590 r6:024000c0 r5:00000000 r4:eda9d800
    [ 42.713306] [<c00aefcc>] (kimage_alloc_control_pages) from [<c00afde8>] (kimage_alloc_init+0xd8/0x1ec)
    [ 42.722645] r10:00000000 r9:edbdff74 r8:0004bce0 r7:80008000 r6:eda9d800 r5:80008000
    [ 42.730535] r4:00000000
    [ 42.733082] [<c00afd10>] (kimage_alloc_init) from [<c00b001c>] (SyS_kexec_load+0x120/0x1fc)
    [ 42.741463] r10:0000066c r9:00000000 r8:0004bce0 r7:80008000 r6:00000002 r5:00280000
    [ 42.749354] r4:00000000 r3:0004bce0
    [ 42.752955] [<c00afefc>] (SyS_kexec_load) from [<c000fae0>] (ret_fast_syscall+0x0/0x34)
    [ 42.760986] r10:00000000 r9:edbde000 r8:c000fc84 r7:0000015b r6:b6f7e604 r5:beb8c870
    [ 42.768875] r4:00000000
    [ 42.771542] Mem-Info:
    [ 42.773827] active_anon:3632 inactive_anon:3452 isolated_anon:0
    [ 42.773827] active_file:1284 inactive_file:3459 isolated_file:0
    [ 42.773827] unevictable:0 dirty:0 writeback:20 unstable:0
    [ 42.773827] slab_reclaimable:1141 slab_unreclaimable:2747
    [ 42.773827] mapped:2924 shmem:3816 pagetables:148 bounce:0
    [ 42.773827] free:235474 free_pcp:32 free_cma:65211
    [ 42.807302] DMA free:198300kB min:1672kB low:2088kB high:2508kB active_anon:1804kB inactive_anon:7800kB active_file:108kB inactive_file:92kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:753664kB managed:372188kB mlocked:0kB dirty:0kB writeback:80kB mapped:140kB shmem:7968kB slab_reclaimable:4564kB slab_unreclaimable:10988kB kernel_stack:1072kB pagetables:60kB unstable:0kB bounce:0kB free_pcp:20kB local_pcp:0kB free_cma:196608kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    [ 42.851727] lowmem_reserve[]: 0 0 701 701
    [ 42.855790] HighMem free:743596kB min:512kB low:2224kB high:3936kB active_anon:12724kB inactive_anon:6008kB active_file:5028kB inactive_file:13744kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:783360kB managed:783360kB mlocked:0kB dirty:0kB writeback:0kB mapped:11556kB shmem:7296kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:532kB unstable:0kB bounce:0kB free_pcp:112kB local_pcp:108kB free_cma:64236kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    [ 42.900378] lowmem_reserve[]: 0 0 0 0
    [ 42.904081] DMA: 141*4kB (UME) 90*8kB (UME) 22*16kB (UME) 3*32kB (UM) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 48*4096kB (C) = 198340kB
    [ 42.917130] HighMem: 844*4kB (UMC) 417*8kB (UMC) 179*16kB (UMC) 99*32kB (UMC) 52*64kB (UMC) 18*128kB (UMC) 7*256kB (UMC) 3*512kB (M) 3*1024kB (M) 7*2048kB (UMC) 172*4096kB (MC) = 743624kB
    [ 42.934043] 8557 total pagecache pages
    [ 42.937814] 0 pages in swap cache
    [ 42.941137] Swap cache stats: add 0, delete 0, find 0/0
    [ 42.946378] Free swap = 0kB
    [ 42.949274] Total swap = 0kB
    [ 42.952162] 384256 pages RAM
    [ 42.955048] 195840 pages HighMem/MovableOnly
    [ 42.959342] 95369 pages reserved
    [ 42.962578] 65536 pages cma reserved
    [ 42.966162] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
    [ 42.974734] [ 123] 0 123 2320 658 6 2 0 0 systemd-journal
    [ 42.984261] [ 192] 0 192 2652 670 7 2 0 -1000 systemd-udevd
    [ 42.993640] [ 282] 998 282 3035 365 6 2 0 0 systemd-timesyn
    [ 43.003169] [ 586] 999 586 1081 546 5 2 0 -900 dbus-daemon
    [ 43.012351] [ 704] 997 704 670 479 4 2 0 0 systemd-network
    [ 43.021877] [ 734] 0 734 651 384 5 2 0 0 systemd-logind
    [ 43.031323] [ 758] 994 758 1166 528 6 2 0 0 avahi-daemon
    [ 43.040589] [ 818] 994 818 1166 386 5 2 0 0 avahi-daemon
    [ 43.049852] [ 845] 0 845 495 299 4 2 0 0 syslogd
    [ 43.058684] [ 851] 0 851 479 335 5 2 0 0 starter
    [ 43.067515] [ 855] 0 855 491 298 4 2 0 0 klogd
    [ 43.076161] [ 961] 0 961 35760 1095 25 2 0 0 charon
    [ 43.084902] [ 993] 0 993 1217 515 5 2 0 0 login
    [ 43.093556] [ 994] 0 994 447 287 4 2 0 0 agetty
    [ 43.102297] [ 995] 996 995 747 465 5 2 0 0 systemd-resolve
    [ 43.111825] [ 1006] 0 1006 1125 518 6 2 0 0 lighttpd
    [ 43.120743] [ 1033] 0 1033 491 202 3 2 0 0 telnetd
    [ 43.129574] [ 1036] 0 1036 2441 234 3 2 0 0 lad_dra7xx
    [ 43.138663] [ 1042] 65534 1042 614 404 4 2 0 0 thttpd
    [ 43.147404] [ 1047] 0 1047 574 226 4 2 0 0 rngd
    [ 43.155963] [ 1170] 0 1170 1340 995 5 2 0 0 systemd
    [ 43.164798] [ 1174] 0 1174 1851 517 6 2 0 0 (sd-pam)
    [ 43.173713] [ 1181] 0 1181 669 483 5 2 0 0 sh
    [ 43.182106] [ 1186] 0 1186 1404 1223 5 2 0 0 kexec
    [ 43.190759] Out of memory: Kill process 1186 (kexec) score 4 or sacrifice child
    [ 43.198110] Killed process 1186 (kexec) total-vm:5616kB, anon-rss:3816kB, file-rss:1076kB
    [ 43.206953] kexec: page allocation failure: order:0, mode:0x24000c0
    [ 43.213246] CPU: 1 PID: 1186 Comm: kexec Tainted: G W 4.4.45-dirty #7
    [ 43.220844] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 43.226958] Backtrace:
    [ 43.229423] [<c00131b8>] (dump_backtrace) from [<c00133b4>] (show_stack+0x18/0x1c)
    [ 43.237020] r7:c094a660 r6:60060113 r5:00000000 r4:c0974f4c
    [ 43.242728] [<c001339c>] (show_stack) from [<c02b7c8c>] (dump_stack+0x8c/0xa0)
    [ 43.249980] [<c02b7c00>] (dump_stack) from [<c00d7854>] (warn_alloc_failed+0xe4/0x124)
    [ 43.257926] r7:c094a660 r6:00000000 r5:00000000 r4:024000c0
    [ 43.263632] [<c00d7774>] (warn_alloc_failed) from [<c00da3cc>] (__alloc_pages_nodemask+0x1c4/0x964)
    [ 43.272711] r3:00040001 r2:00000000
    [ 43.276308] r6:edbde000 r5:00000000 r4:00000000
    [ 43.280963] [<c00da208>] (__alloc_pages_nodemask) from [<c00ae660>] (kimage_alloc_pages+0x1c/0x68)
    [ 43.289954] r10:ff92c7f9 r9:ef853ee0 r8:c09d68c0 r7:c094d590 r6:024000c0 r5:00000000
    [ 43.297844] r4:eda9d800
    [ 43.300392] [<c00ae644>] (kimage_alloc_pages) from [<c00af16c>] (kimage_alloc_control_pages+0x1a0/0x2a8)
    [ 43.309906] r7:c094d590 r6:024000c0 r5:00000000 r4:eda9d800
    [ 43.315612] [<c00aefcc>] (kimage_alloc_control_pages) from [<c00afde8>] (kimage_alloc_init+0xd8/0x1ec)
    [ 43.324952] r10:00000000 r9:edbdff74 r8:0004bce0 r7:80008000 r6:eda9d800 r5:80008000
    [ 43.332841] r4:00000000
    [ 43.335388] [<c00afd10>] (kimage_alloc_init) from [<c00b001c>] (SyS_kexec_load+0x120/0x1fc)
    [ 43.343769] r10:0000066c r9:00000000 r8:0004bce0 r7:80008000 r6:00000002 r5:00280000
    [ 43.351658] r4:00000000 r3:0004bce0
    [ 43.355259] [<c00afefc>] (SyS_kexec_load) from [<c000fae0>] (ret_fast_syscall+0x0/0x34)
    [ 43.363291] r10:00000000 r9:edbde000 r8:c000fc84 r7:0000015b r6:b6f7e604 r5:beb8c870
    [ 43.371180] r4:00000000
    [ 43.373741] Mem-Info:
    [ 43.376024] active_anon:3632 inactive_anon:3452 isolated_anon:0
    [ 43.376024] active_file:1284 inactive_file:3459 isolated_file:0
    [ 43.376024] unevictable:0 dirty:0 writeback:7 unstable:0
    [ 43.376024] slab_reclaimable:1141 slab_unreclaimable:2747
    [ 43.376024] mapped:2924 shmem:3816 pagetables:148 bounce:0
    [ 43.376024] free:235053 free_pcp:38 free_cma:65211
    [ 43.416949] DMA free:196676kB min:1672kB low:2088kB high:2508kB active_anon:1804kB inactive_anon:7800kB active_file:84kB inactive_file:60kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:753664kB managed:372188kB mlocked:0kB dirty:0kB writeback:28kB mapped:140kB shmem:7968kB slab_reclaimable:4564kB slab_unreclaimable:10988kB kernel_stack:1072kB pagetables:60kB unstable:0kB bounce:0kB free_pcp:24kB local_pcp:24kB free_cma:196608kB writeback_tmp:0kB pages_scanned:868 all_unreclaimable? yes
    [ 43.508556] lowmem_reserve[]: 0 0 701 701
    [ 43.512626] HighMem free:743272kB min:512kB low:2224kB high:3936kB active_anon:12716kB inactive_anon:6008kB active_file:5036kB inactive_file:14036kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:783360kB managed:783360kB mlocked:0kB dirty:0kB writeback:0kB mapped:12100kB shmem:7296kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:508kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:64236kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    [ 43.557046] lowmem_reserve[]: 0 0 0 0
    [ 43.560922] DMA: 10*4kB (UE) 10*8kB (ME) 2*16kB (E) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 48*4096kB (C) = 196760kB
    [ 43.573245] HighMem: 752*4kB (UMC) 417*8kB (UMC) 179*16kB (UMC) 99*32kB (UMC) 52*64kB (UMC) 18*128kB (UMC) 7*256kB (UMC) 3*512kB (M) 3*1024kB (M) 7*2048kB (UMC) 172*4096kB (MC) = 743256kB
    [ 43.590940] 8682 total pagecache pages
    [ 43.594870] 0 pages in swap cache
    [ 43.598328] Swap cache stats: add 0, delete 0, find 0/0
    [ 43.603639] Free swap = 0kB
    [ 43.606531] Total swap = 0kB
    [ 43.616643] 384256 pages RAM
    [ 43.619531] 195840 pages HighMem/MovableOnly
    [ 43.623818] 95369 pages reserved
    [ 43.627308] 65536 pages cma reserved
    [ 43.649091] kexec: Could not allocate control_code_buffer
    Killed
    root@dra7xx-evm:/mnt#
  • Hello, You are getting OOM because you are running out of lowmem. Especially with infoadas DTB, you have less lowmem. You can increase the lowmem by reducing the highmem. Use the vmalloc=128M as one of the bootargs and you shall see the lowmem increased in cat /proc/meminfo This should solve the OOM killer issue. Regards, NIkhil D
  • Hi Nikhil,

    thanks for your reply, I have used vmalloc=128M in bootargs and the lowmemory increased.

    root@dra7xx-evm:~# cat /proc/meminfo
    MemTotal: 1539312 kB
    MemFree: 1481044 kB
    MemAvailable: 1486448 kB
    Buffers: 900 kB
    Cached: 26336 kB
    SwapCached: 0 kB
    Active: 15624 kB
    Inactive: 20884 kB
    Active(anon): 10708 kB
    Inactive(anon): 11464 kB
    Active(file): 4916 kB
    Inactive(file): 9420 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    HighTotal: 659456 kB
    HighFree: 634080 kB
    LowTotal: 879856 kB
    LowFree: 846964 kB
    SwapTotal: 0 kB
    SwapFree: 0 kB
    Dirty: 0 kB
    Writeback: 0 kB
    AnonPages: 9272 kB
    Mapped: 10560 kB
    Shmem: 12900 kB
    Slab: 15376 kB
    SReclaimable: 4388 kB
    SUnreclaim: 10988 kB
    KernelStack: 1024 kB
    PageTables: 564 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 769656 kB
    Committed_AS: 176524 kB
    VmallocTotal: 122880 kB
    VmallocUsed: 0 kB
    VmallocChunk: 0 kB
    CmaTotal: 229376 kB
    CmaFree: 227796 kB

    Bur after press kexec -l /boot/zImage it is still notice OOM killer

    root@dra7xx-evm:~# kexec -l /boot/zImage
    [ 305.524997] kexec invoked oom-killer: gfp_mask=0x24000c0, order=0, oom_score_adj=0
    [ 305.532715] kexec cpuset=/ mems_allowed=0
    [ 305.536817] CPU: 0 PID: 1187 Comm: kexec Not tainted 4.4.45-dirty #9
    [ 305.543197] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 305.549316] Backtrace:

    Could you please help to check?

    Regards

    Joe

  • Hi Nikhil,

    I refer to steps in Jira (jira.itg.ti.com/.../LCPD-5417) to retest it again. it still cannot work.
    -1-
    add "crashkernel=33M@0x810000000" into uenv.txt in SD card boot partition
    -2-
    CONFIG_KEXEC=y
    CONFIG_CRASH_DUMP=y
    rebuild zImage
    -3-
    enter the following command:

    root@dra7xx-evm:~# kexec -d -p /boot/zImage --dtb=/boot/dra7-evm-lcd-lg.dtb --command-line="console=ttyO0,115200n8 elevator=noop root=PARTUUID=a1a13757-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0 cma=64M rootfstype=ext4 snd.slots_reserved=1,1"

    kernel: 0xb6b6a008 kernel_size: 0x378958
    MEMORY RANGES
    0000000080000000-00000000953fffff (0)
    0000000095800000-00000000bfafffff (0)
    00000000bfc00000-00000000dfcfffff (0)
    zImage header: 0x016f2818 0x00000000 0x00378958
    zImage size 0x378958, file size 0x378958
    Reserved memory ranges
    0000000081000000-00000000830fffff (0)
    Coredump memory ranges
    0000000080000000-0000000080ffffff (0)
    0000000083100000-00000000953fffff (0)
    0000000095800000-00000000bfafffff (0)
    00000000bfc00000-00000000dfcfffff (0)
    kernel symbol _stext vaddr = 0xc0008380
    phys offset = 0x80000000, page offset = c0000000
    Using 32-bit ELF core format
    get_crash_notes_per_cpu: crash_notes addr = af1b2200, size = 180
    Elf header: p_type = 4, p_offset = 0xaf1b2200 p_paddr = 0xaf1b2200 p_vaddr = 0x0 p_filesz = 0xb4 p_memsz = 0xb4
    get_crash_notes_per_cpu: crash_notes addr = af1bd200, size = 180
    Elf header: p_type = 4, p_offset = 0xaf1bd200 p_paddr = 0xaf1bd200 p_vaddr = 0x0 p_filesz = 0xb4 p_memsz = 0xb4
    vmcoreinfo header: p_type = 4, p_offset = 0x809cf640 p_paddr = 0x809cf640 p_vaddr = 0x0 p_filesz = 0x1024 p_memsz = 0x1024
    Elf header: p_type = 1, p_offset = 0x80000000 p_paddr = 0x80000000 p_vaddr = 0xc0000000 p_filesz = 0x1000000 p_memsz = 0x1000000
    Elf header: p_type = 1, p_offset = 0x83100000 p_paddr = 0x83100000 p_vaddr = 0xc3100000 p_filesz = 0x12300000 p_memsz = 0x12300000
    Elf header: p_type = 1, p_offset = 0x95800000 p_paddr = 0x95800000 p_vaddr = 0xd5800000 p_filesz = 0x2a300000 p_memsz = 0x2a300000
    Elf header: p_type = 1, p_offset = 0xbfc00000 p_paddr = 0xbfc00000 p_vaddr = 0xffc00000 p_filesz = 0x20100000 p_memsz = 0x20100000
    elfcorehdr: 0x83000000
    crashkernel: [0x81000000 - 0x830fffff] (33M)
    memory range: [0x80000000 - 0x80ffffff] (16M)
    memory range: [0x83100000 - 0x953fffff] (291M)
    memory range: [0x95800000 - 0xbfafffff] (675M)
    memory range: [0xbfc00000 - 0xdfcfffff] (513M)
    kernel command line: "console=ttyO0,115200n8 elevator=noop root=PARTUUID=a1a13757-02 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0 cma=64M rootfstype=ext4 snd.slots_reserved=1,1 elfcorehdr=0x83000000 mem=32768K"
    kexec_load: entry = 0x81008000 flags = 0x280001
    nr_segments = 3
    segment[0].buf = 0xb6b6a008
    segment[0].bufsz = 0x378958
    segment[0].mem = 0x81008000
    segment[0].memsz = 0x379000
    segment[1].buf = 0x57590
    segment[1].bufsz = 0x1ae40
    segment[1].mem = 0x824dd000
    segment[1].memsz = 0x1b000
    segment[2].buf = 0x57170
    segment[2].bufsz = 0x400
    segment[2].mem = 0x83000000
    segment[2].memsz = 0x1000
    kexec_load failed: Invalid argument
    entry = 0x81008000 flags = 0x280001
    nr_segments = 3
    segment[0].buf = 0xb6b6a008
    segment[0].bufsz = 0x378958
    segment[0].mem = 0x81008000
    segment[0].memsz = 0x379000
    segment[1].buf = 0x57590
    segment[1].bufsz = 0x1ae40
    segment[1].mem = 0x824dd000
    segment[1].memsz = 0x1b000
    segment[2].buf = 0x57170
    segment[2].bufsz = 0x400
    segment[2].mem = 0x83000000
    segment[2].memsz = 0x1000
    root@dra7xx-evm:~#

    there is error information:
    kexec_load failed: Invalid argument

    entry = 0x81008000 flags = 0x280001
    nr_segments = 3
    segment[0].buf = 0xb6b6a008
    segment[0].bufsz = 0x378958
    segment[0].mem = 0x81008000
    segment[0].memsz = 0x379000
    segment[1].buf = 0x57590
    segment[1].bufsz = 0x1ae40
    segment[1].mem = 0x824dd000
    segment[1].memsz = 0x1b000
    segment[2].buf = 0x57170
    segment[2].bufsz = 0x400
    segment[2].mem = 0x83000000
    segment[2].memsz = 0x1000
    -4-
    echo c > /proc/sysrq-trigger to generate a kernel panic.
    it can not reboot with zImage.
  • Hi Joe, This looks like too generic issue. We never verified kexec as part of the release testing. This might be some generic issue. If you need some help for specific component that TI has touched, I would be happy to help. Regards, Nikhil D
  • Hi Nikhil,

    Many thanks for your comments.

    Regards

    Joe