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.

cmemk insertion problem

Hi everyone!

I can't insert the cmemk.ko module, as it gets NULL pointer dereferences. I use the current dm814x-evm_5_02_01_59 EZSDK.
Ubuntu 10.04 min rootfs on DM8148.

When applying the predefined addresses (C6Run) phys_start=0x96C00000 phys_end=0x9A100000 it crashes. If I'm not mistaken this region should start at 364 MB. My kernel is set to 240MB and according to the syslink guide it uses further 6 or 8 MB.

Any suggestions?

Regards, Markus

  • Hi Markus,

    I ran the C6Run Hello World DSP Example as per the instructions in the Software Developer's Guide (http://processors.wiki.ti.com/index.php/DM814x_C6A814x_AM387x_EZ_5.02_Software_Developers_Guide#Running_the_C6Run_examples). Is the same procedure working for you? If so, the problem could be related to the memory map for which you would need to rebuild the C6Run tool and your application.

    --Sid

  • Hi Sid,

    Thanks, but the problem is I fail at the point of inserting the cmemk.ko module already with the given addresses, i.e. kernel crash. The addresses have been defined by the C6Run package, but afaik these shouldn't conflict with my setting, because they start at 364 MB, right?

    I haven't started any graphic examples and didn't load a firmware. So, they should be deactivated, I think. I don't know where to start looking for the problem.

    Regards, Markus

  • Hi,

    I took a look at the memory map of the ezsdk in the wiki it says that CMEM ends at 0x98000000. There are some further heap and DSP regions  until 0x9A100000. Is that really the part of cmem managed memory? Or are that regions defined used by "other" modules.

    Because I can install the module if I use 98... instead of 9a, just install it no test tried yet.

    EDIT: Furthermore what is the correct notifyk.ko and vpss addresses to use, because they are different from the memory map in the wiki.
    In my case the address for 512 MB (I have 2G board), lies right in the linux mem space. Since those memories are hardcoded into the xem files I need to know them.

    Regards, Markus

  • Hi Markus,

    The EZSDK Memory map is configurable for 512MB as well. Please have a look at http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map for more information on the memory map and how to modify/configure it.

    --Sid

  • Hi Sid,

    I found it, just didn't know if the vpss firmware included in the SDK uses that adress too or does the firmware loader supply the address to it. I'll try out some examples to see if it stil works.
    But still using no modules at all I can't insert cmemk using that command: sudo modprobe cmemk allowOverlap=1 phys_start=0x96c00000 phys_end=0x9a100000.

    Here is the kernel output: 7343.error.log
    Another (different) kernel output using the same command:6232.error2.log

    So the question is are the supplied addresses correct (default from C6Run) or were is the problem? Is the memory controller not configured right for 1G or 2G? u-boot detects 2G.

    UPDATE: If I use 0x98000000 as end address the module isntalls, but C6Run  (lib or app) fails tp run the dsp examples, because it can't init/alloc using cmem. The reason might be that C6Run requires the hole mem as specified (up to 0x9a1...).

    Any ideas how to get cmem working?

    Regards, Markus

  • Since I still haven't managed to get cmemk running, I thought I would try the new OMX in the SDK. As I don't have some sample video availablle and just wanted to check if it would possible work, I thought I try the audioenc dsp example.

    Here I can't load the DSP firmware(crash): 1462.error3.log

    So, now I'm stuck. Can't get cmem (C6run) nor OMX working.

    EDIT: Loading the other media controller firmwares works fine, I think. I could use my v4l2 test application to stream a video from a usb cam to hdmi. Just to make sure, the default configuration of the SDK is for 1 G. So, with leaving everything at default, except that I compiled inotify support into the kernel, using the addresses defined in the MemMap should work just fine? Just, to rule out I misconfigured something. Kernel mem=240M in my setting at the moment.

    Any suggestions?

    Regards, Markus

  • Markus,

            Memory map defined in below  link is upto date, the default EZSDK is released with 1G configuration as documented in this link.

            http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map

            you Can assign upto 364MB for Linux in 1G configuration, This link also guides on how to configure the system for 512M, You can also use the steps provided in this link to configure your system for 2G

            notifym must be assigned with the value of memory section MC_HDVPSS_NOTIFY_MEM

            Since the problem you are describing is very basic (cmem not functional), could you please run the Out of Box demos, (ie. if you boot the EVM with SDcard and NFS it should show Matrix Icons), and in the demos signal analyzer & bench mark demos uses the CMEM. If these demos works fine then you have working CMEM setups. You can run OMX demos also from Matrix launcher (But note that OMX demos do not use CMEM)

            Then you can navigate through scripts in \etc\rc5.d to get your own script for cmem. You can assign any memory to CMEM as long as it does not conflict to other modules. As a safer side you can also disable auto run of demos (disable scripts in \etc\rc5.d) which ensures other than linux mem no other memory is used in the system, so that your cmem runs fine.

           Let us know if you have any further issues.

    Best Regards

    Velan

     

  • Hi Velan,

    I'll try that tomorrow. It could be that the Ubuntu rootfs makes the problem, but I heard that a lot of others used it successfull with OMAP processors, so it might be that udev and syslink don't along very well , or not in that version, because that's the only thing omap processors don't have. But I think I tried to install cmem also without syslink and notifyk right somewhere behind the linux mem.

    But usually with no modules loaded (only syslink and notifyk) it should be possible in the default configuration to load cmem at any nc address or use the firmware_loader to load the pre-built DSP firmware as long it is not within the notifyk address range or in my case 240M linux mem range, right? Have validated cmem or anything else with a specific udev version?

    But for now I'll try your suggestion. Maybe I should add that I use the u-boot (nand) that came with PSP ...03. Did you change something, i.e. such that u-boot configures something different (e.g. mem ctl).

    Regards, Markus

  • It looks like it works with Arago Armstrong SDK, with all my settings (u-boot boot script, custom kernel Image, ...), because I have run some of the C6Run examples successful. But should it be possible to run a different C6Run example afterwards? Since I couldn't do that, because it resulted in segfaults or IPC or alloc errors.

    Back to the Ubuntu case. I could load cmemk at 1G, but I couldn't run any C6Run examples, because the system immediatly hang (tried it on a 11.04 rootfs, because I wanted to check if there was a problem with ther versions). If I inserted the module at the default C6Run addresses, I either got a kernel crash similiar to before or the system hang (no error).

    Also I observe a difference in the Output when inserting the modules: notifyk outputs some messages after successful installation on the Arago ROOTFS whereas on the Ubuntu it doesn't output a message. Same for cmemk. Syslink prints the version on both.

    Any ideas why cmem would fail on Ubuntu  (udev on Ubuntu 11.04  = version 167, on 10.04 = version 152 or so)? Or loading the DSP firmware?

    Thanks for your suggestion. For now I'll go wtih Arago, but I would really like to know what the issue is with it.

    Regards, Markus

  • Hi Markus

    Markus Hofstaetter said:

    Any ideas why cmem would fail on Ubuntu  (udev on Ubuntu 11.04  = version 167, on 10.04 = version 152 or so)? Or loading the DSP firmware?

    Thanks for your suggestion. For now I'll go wtih Arago, but I would really like to know what the issue is with it.

    I'm just guessing here (because we haven't tried running ubuntu on the target), is to look at the custom kernel. Did you pick up the 2.6.37 vanilla kernel and apply PSP patches on it to get it work on the board? One option would be to bisect on the kernel to see if it works. Like I said, I'm just guessing here.

    --Sid

  • Hi Sid,

    sry, my bad. With custom kernel in this case I meant not that much custom. Just other configuration of the provided PSP kernel (McBSP support, inotify, iommu debug, ... ).
    Altough later on there might be custom kernel drivers for attached HW, but not right now.

    Regards, Markus