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.

关于cmem的一个错误



大家好!

    我用的是rdk3.8版本,芯片是8127, 我的DDR是2G的,关于我的config.bld中的内存配置如下:

var LINUX_SIZE                 = 148*MB
var SR1_SIZE                   = 100*MB;
var VIDEO_M3_CODE_SIZE         = 6*MB;
var VIDEO_M3_DATA_SIZE         = 24*MB;
var DSS_M3_CODE_SIZE           = 6*MB;
var DSS_M3_DATA_SIZE           = 24*MB;
var DSP_CODE_SIZE              = 4*MB;
var DSP_DATA_SIZE              = 200*MB
var TILER_SIZE                 = 10*MB; /* Reducing this to fix Vid Frame Alloc failures. Need to fix */ /* MUST be aligned on 128MB boundary */
var SR2_FRAME_BUFFER_SIZE      = 465*MB;
var SR0_SIZE                   = 30*MB;
var HDVPSS_DESC_SIZE           = 2*MB;
var HDVPSS_SHARED_SIZE         = 2*MB;
var NOTIFY_SHARED_SIZE         = 2*MB;
var REMOTE_DEBUG_SIZE          = 1*MB;
/* 3rd and 4th 512MB(specific items) */
var LINUX_EXT_SIZE             = 512*MB;
var CMEM_SIZE                  = 512*MB;

当我启动链路后,在开始调用CMEM_alloc()在cmem中申请内存会报错,错误日志如下:

CMEMK Error: ioctl: failed to allocate heap buffer of size 0x330000

CMEMK Error: get_phys: Unable to find phys addr for 0x00000000

CMEMK Error: get_phys: get_user_pages() failed: -14

...

CMEM Debug: alloc: entered w/ size 0x198000, params - type HEAP, flags NONCACHED, align 0x80
CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAP failed: -1
CMEM Debug: getPhys: entered w/ addr (nil)
CMEM Error: getPhys: Failed to get physical address of 0

哪位高手能指导下吗?

我的bootargs配置如下:

setenv bootargs 'console=ttyO0,115200n8 lpj=4997120 root=/dev/mtdblock4 rootfstype=jffs2 ro mem=148M mem=512M@0xC0000000 vmalloc=856M vram=20M notifyk.vpssm3_sva=0xbfd00000 cmemk.phys_start=0xE0000000 cmemk.phys_end=0xFFFFFFFF cmemk.allowOverlap=1 earlyprintk'

....另我在调试时发现貌似跟vmalloc这个设置参数有关系,这个值不知道是怎样去计算得到呢?恳请高手指导下.