setup_arch()函数中的内核恐慌问题

时间:2017-01-23 11:58:36

标签: linux linux-kernel arm linux-device-driver

在使用linux-3.0 kernel启动 armv7 电路板时,我遇到了内核恐慌问题。错误消息如下: Memory policy: ECC disabled, Data cache writealloc <0>Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x0.

我认为这个问题与menuconfig中的某些配置有关,但无法确定哪个配置确实存在问题。当我试图跟踪引起这种情况的函数时,我得到了以下调用跟踪。

paging_init -> early_alloc.clone.2 -> memblock_alloc -> memblock_alloc_base -> __memblock_alloc_base -> memblock_align_up -> memblock_find_base -> __memblock_alloc_base -> panic

通过uboot启动参数:

bootargs=console=ttyS1,115200n8 root=/dev/nfs ip=1.2.3.4 nfsroot=10.22.33.27:/tftpboot/arm/ rootwait rw

1 个答案:

答案 0 :(得分:2)

看起来你的内核试图加载的地址高于实际分配的地址。因此,您需要查看DTS文件(如果使用设备树)或从u-boot提示符传递的引导参数。

您可以从内核menuconfig检查内存分配, 内核特征---&gt;记忆分裂---&gt; 3G / 1G用户/内核拆分。

另请告知处理器您遇到此错误。

P.S。:假设LOADADDR用于编译内核映像(uImage / bZimage)和DDR配置是正确的。