错误解决方案:FATAL: Error inserting cmemk (/lib/modules/2.6.37/kernel/drivers/dsp/cmemk.ko): Bad address

参考了文章:https://e2e.ti.com/support/embedded/linux/f/354/t/196258

------------------------------------------------------------------------

加载cmemk.ko dsplinkk.ko sdmak.ko 驱动打印 以下错误
[  263.640869] CMEMK module: built on Jan 17 2016 at 19:46:18
[  263.649291]   Reference Linux version 2.6.32
[  263.653930]   File /home/bbxm/dvsdk4109/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[  263.666137] CMEM Range Overlaps Kernel Physical - allowing overlap
[  263.672363] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x9c400000)
[  263.685760] CMEMK Error: Failed to request_mem_region(0x83700000, 35651584)
FATAL: Error inserting cmemk (/lib/modules/2.6.32/kernel/drivers/dsp/cmemk.ko): Bad address
[  263.779815] DSPLINK Module (1.65.00.02) created on Date: Jan 17 2016 Time: 20:56:01
[  263.836608] SDMAK module: built on Jan 17 2016 at 19:46:21
[  263.845031]   Reference Linux version 2.6.32
[  263.849670]   File /home/bbxm/dvsdk4109/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c

修改BOOT启动变量 

setenv boardmodel SBC37X-B2-3990-LUAC0

setenv mmcargs 'setenv bootargs console=${console} vram=${vram} omapfb.vram=0:4M,1:4M omapdss.def_disp=${defaultdisplay} root=${mmcroot} init=/init mpurate=${mpurate} boardmodel=${boardmodel}  mem=68M@0x80000000 mem=384M@0x88000000 rootfstype=${mmcrootfstype} no_console_suspend'

setenv mmcargs 'setenv bootargs console=${console} vram=${vram} omapfb.vram=0:4M,1:4M omapdss.def_disp=${defaultdisplay} root=${mmcroot} init=/init mpurate=${mpurate} boardmodel=${boardmodel}  mem=55M@0x80000000 mem=384M@0x88000000 rootfstype=${mmcrootfstype} no_console_suspend'
setenv dvimode
setenv defaultdisplay lcd070
save
boot

修改打印信息正常 不再出现adrress error,看来真的是物理地址配置错了 我还得需要看看DM3730的内核空间分布了
[   26.910675] CMEMK module: built on Jan 17 2016 at 19:46:18
[   26.919067]   Reference Linux version 2.6.32
[   26.923706]   File /home/bbxm/dvsdk4109/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[   26.935821] CMEM Range Overlaps Kernel Physical - allowing overlap
[   26.947570] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x9b700000)
[   26.957183] allocated heap buffer 0xe2000000 of size 0x2200000
[   26.963500] heap fallback enabled - will try heap if pool buffer is not available
[   26.971221] cmemk initialized
[   27.052124] DSPLINK Module (1.65.00.02) created on Date: Jan 17 2016 Time: 20:56:01
[   27.109161] SDMAK module: built on Jan 17 2016 at 19:46:21
[   27.114685]   Reference Linux version 2.6.32
[   27.121917]   File /home/bbxm/dvsdk4109/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c

修改boot arg 可以避免这个错误

setenv boardmodel SBC37X-B2-3990-LUAC0
setenv mmcargs 'setenv bootargs console=${console} vram=${vram} omapfb.vram=0:4M,1:4M omapdss.def_disp=${defaultdisplay} root=${mmcroot} init=/init mpurate=${mpurate} boardmodel=${boardmodel}  mem=68M@0x80000000 mem=384M@0x88000000 rootfstype=${mmcrootfstype} no_console_suspend'
setenv mmcargs 'setenv bootargs console=${console} vram=${vram} omapfb.vram=0:4M,1:4M omapdss.def_disp=${defaultdisplay} root=${mmcroot} init=/init mpurate=${mpurate} boardmodel=${boardmodel}  mem=55M@0x80000000 mem=384M@0x88000000 rootfstype=${mmcrootfstype} no_console_suspend'
setenv dvimode
setenv defaultdisplay lcd070
save
boot

  • 13760
    Robert Tivy

    Kenji Kondoh
    [ 125.213562] CMEM Range Overlaps Kernel Physical - allowing overlap
    [ 125.220062] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8fc00000)

    As shown by this message, you're insmod'ing (or modprobe'ing) cmemk.ko to use physical memory starting at 0x83700000 (phys_start=0x83700000 cmemk.ko param), but the kernel already owns this memory, hence the failed request_mem_region().  You need to either:
        - prevent the Linux kernel from "owning" that memory, or
        - move cmemk.ko's phys_start/end away from kernel memory.

    It's possible to "punch" a hole in kernel memory with 2 "mem=" specifications in the Linux bootargs variable.  If you'd like to keep CMEM's memory starting at 0x83700000 you would want something like:
        u-boot-prompt# setenv bootargs 'console=... mem=55M@0x80000000 mem=163M@0x85900000'
    This would grant memory to the kernel from 0x80000000 -> 0x83700000 and 0x85900000 -> 0x8fc00000, allowing CMEM to use 0x83700000 -> 0x85900000.

    Since cmemk.ko reports your kernel memory being 0x80000000 -> 0x8fc00000 you probably have mem=252M in your bootargs.  If you'd like your 34 MB of CMEM memory to come after the kernel, you would use mem=218M with bootargs and have cmemk.ko's phys_start=0x8da00000 (and phys_end=0x8fc00000).

    Regards,

    - Rob

     

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值