I loaded cmemk, dsplinkk and lpm_omap3530.
root@beagleboard:~# modprobe cmemk phys_start=0x88000000
phys_end=0x8e000000 pools=20x4096,10x131072,2x1048576
ioremap_nocache(0x88000000, 100663296)=0xc9000000
allocated heap buffer 0xc9000000 of size 0x5cac000
cmem initialized 3 pools between 0x88000000 and 0x8e000000
root@beagleboard:~# modprobe dsplinkk
DSPLINK Module (1.60) created on Date: Feb 6 2009 Time: 01:40:30
root@beagleboard:~# cat /proc/devices | grep dsp
230 dsplink
root@beagleboard:~# mknod /dev/dsplink c 230 0
While loading lpm_omap3530 I get this error:
root@beagleboard:~# modprobe lpm_omap3530
lpm_omap3530: no symbol version for IPS_notify
lpm_omap3530: Unknown symbol IPS_notify
lpm_omap3530: no symbol version for IPS_register
lpm_omap3530: Unknown symbol IPS_register
lpm_omap3530: no symbol version for IPS_unregister
lpm_omap3530: Unknown symbol IPS_unregister
lpm_omap3530: no symbol version for LDRV_PROC_setState
lpm_omap3530: Unknown symbol LDRV_PROC_setState
lpm_omap3530: no symbol version for LDRV_PROC_getState
lpm_omap3530: Unknown symbol LDRV_PROC_getState
lpm_omap3530: no symbol version for PMGR_PROC_getSymbolAddress
lpm_omap3530: Unknown symbol PMGR_PROC_getSymbolAddress
FATAL: Error inserting lpm_omap3530 (/lib/modules/2.6.27-omap1/kernel/drivers/d)
Ok, ignoring this error, I proceeded to execute the app.out
# ./app.out in.dat out.dat
The output is:
App-> Application started.
@0x0008fe2b:[T:0x4095b490] ti.sdo.ce.ipc.Power - Power_on> Opening Local Power D
@0x0008ff1f:[T:0x4095b490] OP - Processor_create_d> Power_on failed.
@0x0008ff7b:[T:0x4001cf40] CE - rserverOpen: can't start 'video_copy.x64P'; Prod
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.
I have the x64P file (DSP server executable in the Codec-Engine
parlance) in the same directory as app.out.
This is my first ever attempt to work with Codec-Engine on
Beagleboard. I would appreciate if someone can help point out what I
am doing wrong.
--
Ramakrishnan
I get an oops mesage if I do a force load.
#modprobe -f lpm_omap3530
dsplinkk: no version for "struct_module" found: kernel tainted.
DSPLINK Module (1.60) created on Date: Feb 6 2009 Time: 01:40:30
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c79c4000
[00000000] *pgd=879a3031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in: lpm_omap3530(F+) dsplinkk(F)
CPU: 0 Tainted: GF (2.6.27-omap1 #1)
PC is at vsnprintf+0x57c/0x5bc
LR is at device_create_vargs+0x68/0xa0
pc : [<c017ddec>] lr : [<c01bd8e0>] psr: 80000013
sp : c6df9d30 ip : c6df9e60 fp : c6df9e5c
r10: bf021000 r9 : c79ac2a0 r8 : bf01f010
r7 : 00000000 r6 : c79ac28c r5 : c6df9eac r4 : c79ac200
r3 : 00000000 r2 : 00000000 r1 : 00000014 r0 : c79ac28c
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 00c5387f Table: 879c4018 DAC: 00000015
Process modprobe (pid: 1464, stack limit = 0xc6df82e8)
Stack: (0xc6df9d30 to 0xc6dfa000)
9d20: 00000001 a0000013 c7873780 c7873780
9d40: 00000014 c79ac28c 00000000 00000000 c7873780 00000000 00000000 00000000
9d60: 00000000 00000000 c6df9d94 c6df9d78 c004b7b8 c004b71c 00000000 c004bc48
9d80: c79cc000 c79cc000 c6df9ddc c6df9d98 c029a4c0 c004b79c c6df1000 00000000
9da0: c7806e00 00000000 00000001 00000000 c017de58 00000010 00000000 c7873780
9dc0: c6df1000 00000005 00000010 00000000 c6df9e34 c6df9de0 c01799b0 c009f554
9de0: 000000d0 00000000 00000000 c03e8961 c7892ab0 c7805080 c00e4478 c00e43ac
9e00: c0178e50 c6085bd0 c7873a88 00000000 c7873a88 00000000 c7873a88 c6c2e280
9e20: c6df9e4c c6df9e30 c0178d00 c0179af8 c6c2e280 c79ac200 c6c2e280 0fb00000
9e40: 00000000 bf01f010 00000000 bf021000 c6df9e84 c6df9e60 c01bd8e0 c017d87c
9e60: bf01ffc0 00000001 bf01fd1c 00000000 bf01fe80 00000000 c6df9ea4 c6df9e88
9e80: c01bd93c c01bd884 00000000 c6df9eac bf01fd1c c6df9eac c6df9efc c6df9ea8
9ea0: bf02115c c01bd924 00000000 c0097158 00000000 bf01e1f8 bf01e000 bf01e1e0
9ec0: bf01e194 bf01e134 bf01fd64 00000001 bf01fd7c bf01fd7c 00000009 000030a3
9ee0: bf01fe80 c046a7a0 00000000 c0033dc4 c6df9f7c c6df9f00 c0033298 bf02100c
9f00: 00000000 00000086 00000086 bf01f048 bf01f898 c00a4cb8 c6df8000 00000019
9f20: c886e0e0 c886e0e0 c886e0b8 0000001a 00000000 00000000 000030a3 c0449d2c
9f40: c6df9f6c 000030a3 bf01fe80 4001e000 00000000 000030a3 bf01fe80 4001e000
9f60: 00000000 c0033dc4 c6df8000 00016098 c6df9fa4 c6df9f80 c00761f4 c0033254
9f80: 00000003 00000000 0000972c 00000000 00000000 00000080 00000000 c6df9fa8
9fa0: c0033c40 c0076168 0000972c 00000000 4001e000 000030a3 000160e8 000160e8
9fc0: 0000972c 00000000 00000000 00000080 00000000 000160a4 00016098 00000000
9fe0: 00016130 be86e9e4 0000b190 400df044 60000010 4001e000 00000000 00000000
Backtrace:
[<c017d870>] (vsnprintf+0x0/0x5bc) from [<c01bd8e0>] (device_create_vargs+0x68/)
[<c01bd878>] (device_create_vargs+0x0/0xa0) from [<c01bd93c>] (device_create+0x)
r9:00000000 r8:bf01fe80 r7:00000000 r6:bf01fd1c r5:00000001
r4:bf01ffc0
[<c01bd918>] (device_create+0x0/0x2c) from [<bf02115c>] (lpm_init+0x15c/0x19c [)
[<bf021000>] (lpm_init+0x0/0x19c [lpm_omap3530]) from [<c0033298>] (__exception)
r8:c0033dc4 r7:00000000 r6:c046a7a0 r5:bf01fe80 r4:000030a3
[<c0033248>] (__exception_text_end+0x0/0x168) from [<c00761f4>] (sys_init_modul)
[<c007615c>] (sys_init_module+0x0/0x188) from [<c0033c40>] (ret_fast_syscall+0x)
r7:00000080 r6:00000000 r5:00000000 r4:0000972c
Code: e51b3110 e2833001 e50b3110 e51b3110 (e5d33000)
---[ end trace 1d04d98925e20d46 ]---
ramakrishnan
BTW, what does lpm module do? Is it needed for normal dsp loading and
running of programs?
--
Ramakrishnan
<http://groups.google.com/group/beagleboard/browse_thread/thread/b2b4734df82b81f9?pli=1>
ramakrishnan
Ramakrishnan,
Yes, that was my post. As mentioned in that post, I had to modify lpm_driver.c so
that it would work with 2.6.28-omap1 without crashing:
changed in lpm_init
device_create(lpm->lpm_class, NULL,
MKDEV(lpm->inst[i].major, lpm->inst[i].minor),
"lpm%d", lpm->inst[i].minor);
to
char temp_str[50];
...
sprintf(temp_str, "lpm%d", lpm->inst[i].minor);
device_create(lpm->lpm_class, NULL,
MKDEV(lpm->inst[i].major, lpm->inst[i].minor),
NULL, temp_str);
Not sure if that is the "correct" fix but it worked for me.
Also, I noticed you're loading cmemk.ko with the incorrect address values for the BeagleBoard (unless you have more than 128MB RAM). If you're using the BeagleBoard and CE 2.21, the OMAP3 MMU layout is described here at http://wiki.omap.com/index.php?title=OMAP3_DSP_MMU_Configuration. So this is what you need to do:
1) Modify u-boot environment to boot the kernel with RAM reserved to 80MB (the other 48MB is being used by CMEM, DDRALGHEAP, and DSPLINK), i.e. add "mem=80M" to the bootargs string.
2) modify your cmemk.ko loading script to:
insmod cmemk phys_start=0x85000000 phys_end=0x87e00000 pools=20x4096,10x131072,2x1048576
Hope this helps; this worked for me =)
Regards,
Andy
Andy,
Thanks for the post. I modified the boot parameter, modified the cmemk
addresses and also tried on a 2.6.26 kernel. Without the lpm
modifications you suggested, I could force load the module on 2.6.26.
I still get an error when I run the application, this time different.
root@beagleboard:~# ./app.out in.dat out.dat
App-> Application started.
Entry exists for address: [0x86000000] size: [0x1000000]
DSP_init status [0x80008050]
@0x0000bc59:[T:0x4095b490] OP - Processor_create_d> Loading and
starting DSP server 'video_copy.x64P' FAILED, status=[0x80008050]
(look for
@0x0000bd4d:[T:0x4095b490] OP - Processor_delete_d> Closing remote
transport FAILED, status=0x80008002.
@0x0000bd8a:[T:0x4095b490] OP - Processor_delete_d> Stopping DSP
FAILED, status=0x80008002
@0x0000bdc7:[T:0x4095b490] OP - Processor_delete_d> Closing pool
FAILED, status=0x80008000
@0x0000be05:[T:0x4095b490] OP - Processor_delete_d> Detaching from DSP
FAILED, status=0x80008000
@0x0000db95:[T:0x4001cf40] CE - rserverOpen: can't start
'video_copy.x64P'; Processor_create failed
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.
I tried your modification on 2.6.27 but I still get a crash when I
force-load the lpm_omap3530 module.
Let me try 2.6.28 with your modifications and report back.
thanks.
--
Ramakrishnan
Ramakrishnan,
I'm sorry but I gave you the wrong memory value when loading cmemk.ko. Please use this:
insmod cmemk.ko phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,10x131072,2x1048576
I gave you the wrong "phys_end" value. This should work now.
You can use the loadmodules.sh script located in codec_engine_2_21/examples/apps/system_files/OMAP3530 for all the examples compiled in CE 2.21.
Regards,
Andy
Andy,
Thanks a lot. It worked. I hope google harvests this thread and makes
it easier for others also to get it working.
Many thanks!
--
Ramakrishnan
I could load it only on 2.6.26, which is what I am using now.
--
Ramakrishnan