你好,
我使用VIM3+ Khadas的Anroid SDK, 修改成arm64 kernel, Kernel启动时处理Reserved memory不会报错误,但是VIM3+Amlogic的Android SDK, 同样的方法修改成arm64 kernel, VIM3 Kernel启动时处理Reserved memory报错:
请帮忙看一下,你们的SDK修改了什么,arm64 kernel可以不报错,谢谢。
uboot time: 3789962 us
[ 0.000000@0] Booting Linux on physical CPU 0x0
[ 0.000000@0] Linux version 4.9.113-g20ef3bcb3596-dirty (ylee@ylpc) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #6 SMP PREEMPT Fri Jun 25 12:05:15 CST 2021
[ 0.000000@0] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000@0] earlycon: aml-uart0 at MMIO 0x00000000ff803000 (options '')
[ 0.000000@0] bootconsole [aml-uart0] enabled
[ 0.000000@0] efi: Getting EFI parameters from FDT:
[ 0.000000@0] efi: UEFI not found.
[ 0.000000@0] 07400000 - 07500000, 1024 KB, ramoops@0x07400000
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] __reserved_mem_alloc_size, start:0x0000000005000000, end:0x0000000005400000, len:4 MiB
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=400000, aligh=400000, end=5400000) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,secmon, size:4 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] __reserved_mem_alloc_size, start:0x000000007f800000, end:0x0000000080000000, len:8 MiB
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=800000, aligh=400000, end=80000000) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,meson-fb, size:8 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=8000000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,ion-dev, size:128 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=2800000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,di_cma, size:40 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=0, aligh=0, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,ppmgr, size:0 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=13400000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,codec_mm_cma, size:308 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=0, aligh=100000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,codec_mm_reserved, size:0 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=4000000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,vdin0_cma, size:64 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=4000000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,vdin1_cma, size:64 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=1000000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,galcore, size:16 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=8000000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,isp_cma, size:128 MB
[ 0.000000@0] ===>>> nomap is 0
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] ===>>> __memblock_alloc_base( size=1800000, aligh=400000, end=ffffffffffffffff) ==> base = 0
[ 0.000000@0] failed to allocate memory for node linux,adapt_cma, size:24 MB
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] cma: Failed to reserve 8 MiB
[ 0.000000@0] ===>>>> kernel_end = 2caa000
[ 0.000000@0] ++++>>>> __next_mem_range_rev memblock_region[0] range [0 - 0][ 0.000000@0] ====>>>>> ret = 0
[ 0.000000@0] Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x0.
[ 0.000000@0]
[ 0.000000@0] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.113 #6
[ 0.000000@0] Hardware name: Amlogic (DT)
[ 0.000000@0] Call trace:
[ 0.000000@0] [ffffff800a933ca0+ 112][<ffffff800908b6e0>] dump_backtrace+0x0/0x258
[ 0.000000@0] [ffffff800a933d10+ 32][<ffffff800908b9bc>] show_stack+0x24/0x30
[ 0.000000@0] [ffffff800a933d30+ 64][<ffffff80094678e8>] dump_stack+0xc8/0x110
[ 0.000000@0] [ffffff800a933d70+ 224][<ffffff80091b6f74>] panic+0x138/0x29c
[ 0.000000@0] [ffffff800a933e50+ 32][<ffffff800a40de08>] memblock_alloc_base+0x30/0x3c
[ 0.000000@0] [ffffff800a933e70+ 16][<ffffff800a40de24>] memblock_alloc+0x10/0x18
[ 0.000000@0] [ffffff800a933e80+ 32][<ffffff800a3f69cc>] early_pgtable_alloc+0x18/0x70
[ 0.000000@0] [ffffff800a933ea0+ 128][<ffffff800a3f6b3c>] paging_init+0x30/0x700
[ 0.000000@0] [ffffff800a933f20+ 128][<ffffff800a3f3de8>] setup_arch+0x1e8/0x570
[ 0.000000@0] [ffffff800a933fa0+ 80][<ffffff800a3f086c>] start_kernel+0x7c/0x3ac
[ 0.000000@0] [ffffff800a933ff0+ 0][<ffffff800a3f0200>] __primary_switched+0x7c/0x90