This is more a Linux than bios issue, so reposting here. Using Syslink 2.00.00.78 and PSP 4.00.00.10 (EZSDK 5.01.01.80), I am occasionally getting a failure assertion on the host side (ARM) from SharedRegion_getEntry():
shared region 0:
base addr = 418ed000
length = 4000000
owner = 3
Is Valid = 1
name = (null)
shared region 1:
base addr = 45983000
length = 10000000
oAssertion at Line no: 456 in /home/lholeva/ti-ezsdk_dm816x-evm_5_01_01_80/sysli
nk_2_00_00_78/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/sysl
ink/ipc/hlos/knl/Linux/GateMPDrv.c: (cargs->args.create.handle != NULL) : failed
wner = 3
Is Valid = 1
name = (null)
Shared regions 0 and 1 are setup in the .cfg file on the DSP:
var sr0MemSection = Program.cpu.memoryMap['SR0'];
var SHAREDREG_0_MEM = sr0MemSection.base;
var SHAREDREG_0_MEMSIZE = sr0MemSection.len;
var SHAREDREG_0_ENTRYID = 0;
var SHAREDREG_0_OWNERPROCID = Ipc.hostProcId;
var sr1MemSection = Program.cpu.memoryMap['SR1'];
var SHAREDREG_1_MEM = sr1MemSection.base;
var SHAREDREG_1_MEMSIZE = sr1MemSection.len;
var SHAREDREG_1_ENTRYID = 1;
var SHAREDREG_1_OWNERPROCID = Ipc.hostProcId;
SharedRegion.setEntryMeta(SHAREDREG_0_ENTRYID,
{
base: SHAREDREG_0_MEM,
len: SHAREDREG_0_MEMSIZE,
ownerProcId: SHAREDREG_0_OWNERPROCID,
isValid: true,
cacheEnable: true,
name: "shared_region_0",
createHeap: true
});
SharedRegion.setEntryMeta(SHAREDREG_1_ENTRYID,
{
base: SHAREDREG_1_MEM,
len: SHAREDREG_1_MEMSIZE,
ownerProcId: SHAREDREG_1_OWNERPROCID,
isValid: true,
cacheEnable: true,
name: "shared_region_1",
createHeap: true
});
With the Platform defined according to the EZSDK FAQ:
["EXT_RAM",
{name: "EXT_RAM", base: 0x80000000, len: 0x10000000, space: "code/data",access: "RWX"}],
["DDR2",
{name: "DDR2", base: 0x94A00000, len: 0x02000000, space: "code/data",access: "RWX"}],
["SR0",
{name: "SR0", base: 0x90000000, len: 0x04000000, space: "code/data",access: "RWX"}],
["SR1",
{name: "SR1", base: 0xB0000000, len: 0x10000000, space: "code/data",access: "RWX"}],
],
l1DMode:"8k",
l1PMode:"32k",
l2Mode:"256k",
The failure assertion occrus randomly. At other times I get the expected behavior:
shared region 0:
base addr = 41968000
length = 4000000
owner = 3
Is Valid = 1
name = (null)
shared region 1:
base addr = 45a1e000
length = 10000000
owner = 3
Is Valid = 1
name = (null)
Anoter (related?) issue ias the occasional failure Memory_alloc() in shared region 1. According to the FAQ, there is 256Mbytes available there, and though I am only allocating a bit more than 5Mbytes I get an occasional failure of Memory_alloc(), even if the assertion does not happen.
I tried moving all allocations to region 0, but I still get the occasional failure of Memory_alloc().
I put a call to HeapMemMP_getStats() in the allocation function. Memory_alloc() works ok for the first few image allocations, but then it blows-up:
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xfffff00 bytes,
largestfreesize = 0xfffff00 bytes
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xffa7d00 bytes,
largestfreesize = 0xffa7d00 bytes
Ro: Allocating 160800 bytes in region 1
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xff4fb00 bytes,
largestfreesize = 0xff4fb00 bytes
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xfe9f700 bytes,
largestfreesize = 0xfe9f700 bytes
HCONV: Allocating b0400 bytes in region 1
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xfdef300 bytes,
largestfreesize = 0xfdef300 bytes
HNC: Allocating b0400 bytes in region 1
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xfd3ef00 bytes,
largestfreesize = 0xfd3ef00 bytes
VCONV: Allocating b0400 bytes in region 1
Before alloc: Heap totalsize = 0xfffff80 bytes, totalfreesize = 0xfc8eb00 bytes,
largestfreesize = 0xfc8eb00 bytes
VNC: Allocating Unable to handle kernel paging request at virtual address f5afeb
80
b0400 bytes in rpgd = cb6ec000
egion 1
[f5afeb80] *pgd=00000000
Internal error: Oops: 805 [#1] <--What is this?
last sysfs file: /sys/devices/platform/musb-ti81xx.0/musb-hdrc.0/usb1/1-1/devnum
Modules linked in: bufferclass_ti pvrsrvkm TI81xx_hdmi ti81xxfb vpss syslink ipv
6
CPU: 0 Not tainted (2.6.37 #1)
PC is at v7_dma_inv_range+0x20/0x48
LR is at Cache_inv+0x50/0x78 [syslink]
pc : [<c0048dc8>] lr : [<bf072408>] psr: 00000013
sp : cb795e40 ip : 00000000 fp : cb795e6c
r10: 00000000 r9 : cb794000 r8 : 56333d18
r7 : 00000000 r6 : bf145cd0 r5 : f5afebb8 r4 : 00000008
r3 : 0000003f r2 : 00000040 r1 : f5afebc0 r0 : f5afeb80
Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 8b6ec019 DAC: 00000015
Process track (pid: 1078, stack limit = 0xcb7942e8)
Stack: (0xcb795e40 to 0xcb796000)
5e40: 00000008 0000ffff 00000001 bf0726c8 bf096c44 f5afebb8 d568f000 cb795ec0
5e60: cb795e94 cb795e70 bf09b2cc bf0723c4 cb795ec0 c01cf35c cb794000 cb795ec0
5e80: 56333d18 00000017 cb795ef4 cb795e98 bf0d1b34 bf09b118 c01cf35c 56333d18
5ea0: 00000000 d568c000 56333d54 00060000 00000000 56333d4c 00000000 00000000
5ec0: 0fffff80 1fafebb8 1fafebb8 cb795ed8 c01b2fb4 d568c000 00000000 00000000
5ee0: cac9b080 00000017 cb795f04 cb795ef8 c00c49b8 bf0d1558 cb795f74 cb795f08
5f00: c00c50c8 c00c499c 40113000 cbc4ea80 00000000 00000000 fffffffd 00000000
5f20: cb795f54 cb795f30 c0357ccc c003b170 cc86201c cb412000 00000017 cc829600
5f40: cb794000 00000000 00000001 00000000 56333d18 c01cf35c 00000017 cac9b080
5f60: cb794000 00000000 cb795fa4 cb795f78 c00c5160 c00c4bd4 cb795fac 00000001
5f80: c0354434 56333d98 56334490 40122550 00000036 c003ff48 00000000 cb795fa8
5fa0: c003fda0 c00c5114 56333d98 56334490 00000017 c01cf35c 56333d18 00000017
5fc0: 56333d98 56334490 40122550 00000036 003d0f00 4012e3d8 00000000 56333d04
5fe0: 00000152 56333ce8 000397d4 4041faec 20000010 00000017 3d414042 3f3f4040
Backtrace:
[<bf0723b8>] (Cache_inv+0x0/0x78 [syslink]) from [<bf09b2cc>] (HeapMemMP_getStat
s+0x1c0/0x25c [syslink])
r6:cb795ec0 r5:d568f000 r4:f5afebb8
[<bf09b10c>] (HeapMemMP_getStats+0x0/0x25c [syslink]) from [<bf0d1b34>] (HeapMem
MPDrv_ioctl+0x5e8/0x77c [syslink])
r7:00000017 r6:56333d18 r5:cb795ec0 r4:cb794000
[<bf0d154c>] (HeapMemMPDrv_ioctl+0x0/0x77c [syslink]) from [<c00c49b8>] (vfs_ioc
tl+0x28/0x44)
r6:00000017 r5:cac9b080 r4:00000000
[<c00c4990>] (vfs_ioctl+0x0/0x44) from [<c00c50c8>] (do_vfs_ioctl+0x500/0x540)
[<c00c4bc8>] (do_vfs_ioctl+0x0/0x540) from [<c00c5160>] (sys_ioctl+0x58/0x7c)
[<c00c5108>] (sys_ioctl+0x0/0x7c) from [<c003fda0>] (ret_fast_syscall+0x0/0x30)
r8:c003ff48 r7:00000036 r6:40122550 r5:56334490 r4:56333d98
Code: e1a02312 e2423001 e1100003 e1c00003 (1e070f3e)
---[ end trace 3046cc3a9ab46ef9 ]---
Any ideas?
Lee Holeva