[U-Boot] Odroid n1- booting hangs if we add memtest=4 to kernel command line.
Anand Moon
linux.amoon at gmail.com
Wed Sep 18 10:15:04 UTC 2019
Hi Kevrer,
On Wed, 18 Sep 2019 at 12:02, Kever Yang <kever.yang at rock-chips.com> wrote:
>
> Hi Anand,
>
>
> On 2019/9/16 下午7:03, Anand Moon wrote:
>
> Hi Jagan / Kever,
>
> I have with me Odroid - N1 per-released development board,
> It's almost same form factor to "Firefly-RK3399 Board" with
> rk3399-sdram-ddr3-1600.dtsi ram configuration.
>
> I have configure Odroid - N1 board to boot using TPL / SPL configuration
> using latest kernel and latest u-boot, but I am facing some issue with not
> able to upgrade my distro packages, It's literally hangs on heavy I/O
> operations.
>
> So I would like to check if the memory is working correctly, but below
> command failed.
>
> # sudo memtester 1024 5
> memtester version 4.3.0 (64-bit)
> Copyright (C) 2001-2012 Charles Cazabon.
> Licensed under the GNU General Public License version 2 (only).
>
> pagesize is 4096
> pagesizemask is 0xfffffffffffff000
> want 1024MB (1073741824 bytes)
> got 1024MB (1073741824 bytes), trying mlock ...
>
> Then I would like to enable *memtest=4* via bootargs ie kernel command
> line and it failed to boot up.
>
>
> I'm not able to understand well about your issue, does it:
> - boots fine with odroid-N1 but hang at memtester ?
> - hang at "Starting kernel..." with kernel command like update
> Since it boots OK, the DRAM should works OK, you can replace the TPL with rockchip binary ddr[0]
> to double check if they have the same output.
> I have no idea about the bootargs "memtest=4", but I suppose this should not affect the kernel
> boot process, maybe you have do something wrong and not update the bootargs as what you
> expect, you can print it in U-Boot to check the actually bootargs.
>
> Thanks,
> - Kever
> [0] https://github.com/rockchip-linux/rkbin/blob/master/bin/rk33/rk3399_ddr_800MHz_v1.23.bin
>
Ok thanks for your input. I will give this a try.
Here is the scenario I faced I am using Archlinux using latest u-boot
and 5.13 kernel.
First issue that during upgrade on distro packages it suddenly stop
with not kernel panic.
So I could not understand the root caused.
1 > Then I tried some fio test with large file mapping it also failed
with no kernel panic.
2 > Then I tired memtester it also failed with no kernel panic.
3 > Finally I tried the memtest kernel memory testing feature at boot
time, but it hangs.
So I could only conclude that it's not able to map large file, because
memory is not tuned correctly.
Well I have tried to rebuild the u-boot using below image
[0] https://github.com/rockchip-linux/rkbin/blob/master/bin/rk33/rk3399_ddr_800MHz_v1.23.bin
Here is the boot log of above and kernel panic using fio command below.
[1] https://pastebin.com/Qe0Lpqss
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1
--name=test --filename=test --bs=4k --iodepth=64 --size=4G
--readwrite=randrw --rwmixread=75
Again memtester is not able to test memory, it's not able to map large file map.
[root at alarm ~]# memtester 4GB
memtester version 4.3.0 (64-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 4096MB (4294967296 bytes)
got 3866MB (4054790144 bytes), trying mlock ...[ 110.647775] SError
Interrupt on CPU5, code 0xbf000000 -- SError
[ 110.647776] CPU: 5 PID: 372 Comm: memtester Not tainted 5.3.0-xn1ml1 #2
[ 110.647777] Hardware name: Hardkernel ODROID-N1 (DT)
[ 110.647778] pstate: 00000005 (nzcv daif -PAN -UAO)
[ 110.647779] pc : clear_page+0x10/0x24
[ 110.647780] lr : __cpu_clear_user_page+0xc/0x18
[ 110.647781] sp : ffff000011bcbaf0
[ 110.647781] x29: ffff000011bcbaf0 x28: ffff8000eda6ccc0
[ 110.647783] x27: ffff8000e5620000 x26: ffff8000e562c3c0
[ 110.647785] x25: ffff7e0003971dc0 x24: 0000000000000000
[ 110.647786] x23: ffff7e0000270000 x22: 0000000000001000
[ 110.647788] x21: 0000ffff66000000 x20: 0000000000000000
[ 110.647790] x19: ffff8000e5620000 x18: 0000000000000000
[ 110.647791] x17: 0000000000000010 x16: 0000000000000010
[ 110.647793] x15: 0000000000000000 x14: 000000000000009e
[ 110.647795] x13: ffff7e0000270000 x12: ffff7e0003ba8500
[ 110.647796] x11: 0000000000000000 x10: ffff000011bcb9c0
[ 110.647798] x9 : 0000000000000001 x8 : ffff8000efafc230
[ 110.647799] x7 : 0000000000001665 x6 : 0000000000000000
[ 110.647801] x5 : 0ffff00000000000 x4 : 0000000000000001
[ 110.647803] x3 : 0000000000007fc0 x2 : 0000000000000004
[ 110.647804] x1 : 0000000000000040 x0 : ffff800009dff4c0
[ 110.647806] Kernel panic - not syncing: Asynchronous SError Interrupt
[ 110.647807] CPU: 5 PID: 372 Comm: memtester Not tainted 5.3.0-xn1ml1 #2
[ 110.647808] Hardware name: Hardkernel ODROID-N1 (DT)
[ 110.647809] Call trace:
[ 110.647809] dump_backtrace+0x0/0x140
[ 110.647810] show_stack+0x14/0x20
[ 110.647811] dump_stack+0x98/0xbc
[ 110.647811] panic+0x130/0x2fc
[ 110.647812] __stack_chk_fail+0x0/0x18
[ 110.647813] arm64_serror_panic+0x74/0x80
[ 110.647814] is_valid_bugaddr+0x0/0x8
[ 110.647814] el1_error+0x84/0xf8
[ 110.647815] clear_page+0x10/0x24
[ 110.647815] clear_subpage+0x4c/0x88
[ 110.647816] clear_huge_page+0x74/0x220
[ 110.647817] do_huge_pmd_anonymous_page+0x2c8/0x6f0
[ 110.647818] __handle_mm_fault+0xb90/0x1090
[ 110.647818] handle_mm_fault+0x100/0x1c0
[ 110.647819] __get_user_pages+0x248/0x410
[ 110.647820] populate_vma_page_range+0x64/0x70
[ 110.647821] __mm_populate+0xb8/0x170
[ 110.647821] do_mlock+0xb4/0x220
[ 110.647822] __arm64_sys_mlock+0x14/0x20
[ 110.647823] el0_svc_common.constprop.0+0x68/0x160
[ 110.647823] el0_svc_handler+0x28/0x78
[ 110.647824] el0_svc+0x8/0xc
[ 110.647950] SMP: stopping secondary CPUs
[ 110.647950] Kernel Offset: disabled
[ 110.647951] CPU features: 0x0002,2000600c
[ 110.647952] Memory Limit: none
So what possible I could be doing wrong.
Is this kernel bug or memory tuning failed I do not understand.
Best Regards
-Anand
More information about the U-Boot
mailing list