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.

The size of systemHeap lead to ramdisk load failed.

Other Parts Discussed in Thread: SYSBIOS

I use DVRRDK4.0 package, the total ddr size is 2GB, I use config_2G.bld. The ddr memory map is as following,

/* FIRST + SECOND 512MB */

var SR1_SIZE                   = 220 * MB;//220 * MB;

var VIDEO_M3_CODE_SIZE         = 3   * MB;

var VIDEO_M3_BSS_SIZE         = 23 * MB;

var VIDEO_M3_DATA_SIZE         = 3   * MB;

var DSS_M3_CODE_SIZE           = 2   * MB;

var DSS_M3_BSS_SIZE           = 20 * MB;

var DSS_M3_DATA_SIZE           = 6   * MB;

var DSP_CODE_SIZE             = 5   * MB;

var DSP_DATA_SIZE             = 160 * MB;//160 * MB;//110 * MB;

var SR2_FRAME_BUFFER_SIZE     = 550 * MB;//550 * MB;//600 * MB;

var VIDEO_M3_EXCEPTION_CTX_SIZE = 128*KB;

var VPSS_M3_EXCEPTION_CTX_SIZE = 128*KB;

var SR0_SIZE                   = 22 * MB + 768 * KB;

var HDVPSS_DESC_SIZE            = 2 * MB;

var HDVPSS_SHARED_SIZE         = 2 * MB;

var NOTIFY_SHARED_SIZE         = 2 * MB;

var REMOTE_DEBUG_SIZE           = 1 * MB;

var SHARED_MEMORY_SIZE         = 2 * MB;

 

/* THIRD 512MB */

var TILER_SIZE                 = 256 * MB;

var SR3_FRAME_BUFFER_EXTRA_SIZE = 256 * MB;

 

/* LAST 512MB */

var LINUX_SIZE                 = 512 * MB;

My systemHeap is 120M, if I decrease the size, the dsp run error, its print information is DSKT2_createAlg failed.

var HeapMem                     = xdc.useModule('ti.sysbios.heaps.HeapMem');

var heapMemParams               = new HeapMem.Params;

heapMemParams.size             = 0x07800000;

 

heapMemParams.size             = heapMemParams.size;

heapMemParams.sectionName       = ".systemHeap";

var heap0                       = HeapMem.create(heapMemParams);

Memory.defaultHeapInstance     = heap0;

 My boot parameter is as following,

mw.b 0xC1000000 0xFF 0x2000000

tftp 0xC1000000 ramdisk.gz

nand erase 0x009c0000 0xc820000

nand write 0xC1000000 0x009c0000 0x2000000

 the first group,

setenv bootcmd 'nand read.i 0xC1000000 0x00580000 0x300000;nand read.i 0xC2000000 0x009c0000 0x2000000;bootm C1000000'

setenv bootargs 'mem=512M console=ttyO2,115200n8 earlyprintk root=/dev/ram0 rw initrd=0xC2000000,40M ramdisk_size=450000 ip=192.168.1.181:192.168.1.33:192.168.1.1:255.255.255.0::eth0:on notifyk.vpssm3_sva=0xbfb00000 vmalloc=500M ddr_mem=2048M debug'

 

the second group,

setenv bootcmd 'nand read.i 0xC1000000 0x00580000 0x300000;nand read.i 0xC2000000 0x009c0000 0x2000000;bootm C1000000'

setenv bootargs 'mem=512M console=ttyO2,115200n8 earlyprintk root=/dev/ram0 rw initrd=0xC2000000,40M ramdisk_size=450000 ip=192.168.1.181:192.168.1.33:192.168.1.1:255.255.255.0::eth0:on notifyk.vpssm3_sva=0xbfb00000 vmalloc=476M ddr_mem=2048M debug'

When I use the first group boot parameter, when load dsp firmware, it will run error.

Attached to slave procId 0.

[   17.580000] vmap allocation for size 129396736 failed: use vmalloc=<size> to increase size.

[   17.590000] Unable to handle kernel NULL pointer dereference at virtual address 00000000

[   17.600000] pgd = d975c000

[   17.600000] [00000000] *pgd=d948e031, *pte=00000000, *ppte=00000000

[   17.610000] Internal error: Oops: 817 [#1]

[   17.610000] last sysfs file: /sys/devices/virtual/syslinkipc/syslinkipc_ClientNotifyMgr/uevent

[   17.610000] Modules linked in: syslink spi_uart [last unloaded: syslink]

[   17.610000] CPU: 0   Not tainted (2.6.37 #1)

[   17.610000] PC is at __memzero+0x24/0x80

[   17.610000] LR is at 0x0

[   17.610000] pc : [<c01a42e4>]   lr : [<00000000>]  psr: 20000013

[   17.610000] sp : d94edcb4 ip : 00000000 fp : d94edd24

[   17.610000] r10: 00000000 r9 : de63f000 r8 : d94edd50

[   17.610000] r7 : 00000012 r6 : 06a85000 r5 : bf1b6564 r4 : 07b654b8

[   17.610000] r3 : 00000000 r2 : 00000000 r1 : 07b65478 r0 : 00000000

[   17.610000] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user

[   17.610000] Control: 10c5387d Table: d975c019 DAC: 00000015

[   17.610000] Process fw_load.out (pid: 620, stack limit = 0xd94ec2e8)

[   17.610000] Stack: (0xd94edcb4 to 0xd94ee000)

When I use the second boot parameter, the system seem run normal, but load firmware has the following error.

[m3vpss ] 401: SYSTEM: IPC init DONE !!!

[c6xdsp ] 14: MEM: Shared Region 2: Base = 0x9ba00000, Length = 0x22600000 (550 MB)

[c6xdsp ] 14: MEM: ERROR: SharedRegion_setEntry (2, 0x995fd3fc) FAILED !!! (status=-1)

[m3video] 407: MEM: Shared Region 2: Base = 0x9ba00000, Length = 0x22600000 (550 MB)

[m3vpss ] 407: MEM: Shared Region 2: Base = 0x9ba00000, Length = 0x22600000 (550 MB)

[m3video] 407: MEM: Shared Region 1: Base = 0x80000000, Length = 0x0dc00000 (220 MB)

[m3vpss ] 407: MEM: Shared Region 1: Base = 0x80000000, Length = 0x0dc00000 (220 MB)