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.

memory conflict between codec engine and omx in DM8168

Dear expert,

I'm trying to run simultaneously a codec engine example (universal_copy) and a omx example (capture_encode and encode) on DM8168. Using the original configuration of universal_copy example is not possible to run it if HDVICP2 and HDVPSS firmware are loaded.

Following the useful indications in this post

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/149505.aspx

I successfully edit the universal_copy example configuration in order to run the example also if HDVICP2 and HDVPSS firmware are loaded.

The problem comes if I want to run such example toghether with one of the example in the omx package, for example the capture_encode or the encode example. In particular seems that the problem is a memory conflict with HDVPSS, since the only coding (encode) omx example and the universal_copy example can run toghether. But if I launch the capture_encode example and than the universal_copy example I receive the following error on serial console

**** Platform_loadCallback: owner of slave region does not match host entry

 Error [0xffffffff] at Line no: 2616 in file xxxxxx/ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/family/hlos/knl/ti81xx/Platform.c
*** Ipc_control: Platform_loadCallback failed!
        Error [0xffffffff] at Line no: 840 in file xxxxxxxx/ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Ipc.c

Can someone help me to solve this apparently memory map conflict?

Thank you

LL



  • Hi Livio,

    Are you using EZSDK 5.05.02.00?

    BR

    Pavel

  • Hi Pavel,

    yes, I'm using EZSDK 5.05.02.00

    Thanks 

    LL

  • It seems that the error is in the syslink module.

    ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/family/hlos/knl/ti81xx/Platform.c :

    /* add new shared region entries to table */
        for (i = 0; i < handle->slaveCfg.numSRs; i++) {
            GT_2trace(curTrace, GT_1CLASS, "handle->slaveSRCfg[%d].entryBase %p\n",
                i, handle->slaveSRCfg[i].entryBase);

            /* get entry from table */
            status = SharedRegion_getEntry(handle->slaveSRCfg[i].id, &entry);

            if (status < 0) {
                status = Platform_E_FAIL;
                GT_setFailureReason(curTrace, GT_4CLASS, "Platform_loadCallback",
                    status, "SharedRegion_getEntry failed");
                goto leave;
            }

            /* if entry already started, validate properties on new entry */
            if (entry.isValid) {
                if (entry.len != handle->slaveSRCfg[i].entryLen) {
                    status = -1;
                    GT_setFailureReason(curTrace, GT_4CLASS,
                        "Platform_loadCallback", status,
                        "length of slave region does not match host entry");
                    goto leave;
                }
                if (entry.ownerProcId != handle->slaveSRCfg[i].ownerProcId) {
                    status = -1;
                    GT_setFailureReason(curTrace, GT_4CLASS,
                        "Platform_loadCallback", status,
                        "owner of slave region does not match host entry");
                    goto leave;
                }

    .............

    leave:
        /* if error, release resources in reverse order of acquisition */
        if (status < 0) {
            /* TODO: release map entries acquired in for loop */
            /* TODO: if Ipc_start failed, slave already running, what now? */
            if (handle->bslaveAdditionalReg != NULL) {
                Memory_free(NULL, handle->bslaveAdditionalReg,
                    handle->slaveCfg.numSRs * sizeof(UInt8));
                handle->bslaveAdditionalReg = NULL;
            }
            if (handle->slaveSRCfg != NULL) {
                Memory_free(NULL, handle->slaveSRCfg,
                    handle->slaveCfg.numSRs * sizeof(Platform_SlaveSRConfig));
                handle->slaveSRCfg = NULL;
            }
        }
        GT_1trace(curTrace, GT_LEAVE, "Platform_loadCallback: [0x%08x]", status);

        return (status);
    }

    The validation of the properties of the new entry fails. I will check with the Syslink/BIOS team for any clues on why the validation fails.

    Meanwhile you can refer to the syslink documentation in ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/docs for information on how to change the memory map. 

    Here is some documentation from the EZSDK which you might want to take a look for some information for a particular supported configuration and additional information about how to make changes to the memory map:

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

    Regards,

    Pavel

  • Hi Pavel,

    thank you for the reply. I'll wait for any updates from TI about the issue. 

    In the meanwhile you propose to change the memory map. I red some documentation even if I've never tried to do it since I use the default map.

    By the way is not completely clear for me how to modify the memory map, in particular which areas have to be modified in order to solve my original problem.

    thanks

    LL 

  • Lima:

       Tracing through the code, the error says that the SharedRegion owner ID for some SharedRegion entry, read from the slave memory configuration after loading the DSP (the universal_copy load?), does not match the owner ID already set by a previous call to SharedRegion_setEntry() from a previous Platform_loadCallback() call (from the capture_encode example?).   These threads give some clues as to which files to look at for the mismatch:

    http://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/t/226819.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/149505.aspx

    http://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/p/226819/801152.aspx

       From component-sources/codec_engine_3_22_01_06/examples/ti/sdo/ce/examples/servers/all_codecs/ti_platforms_evmTI816X.cfg:

    ti_platforms_evmTI816X.cfg:entry.ownerProcId = MultiProc.getIdMeta("HOST");
    ti_platforms_evmTI816X.cfg:entry2.ownerProcId = MultiProc.getIdMeta("HOST");

      Looking at the MulitProc config table in ipc Settings.xs,

        'TMS320TI816X'      : ["DSP", "VIDEO-M3", "VPSS-M3", "HOST"],

       that appears to set ownerProcId to '3'.

       The next question is where this OMX capture example set's it's Shared Regions, and owner Ids.  

       The link at http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#DSP_for_OMX gives some hints, though digging through the code, I see multiple places where an ownerId could be set.  

       But, looking at board-support/media-controller-utils_3_00_00_05/src/ldrmemcfg/src/ldr_memcfg.c,

       #ifdef LDR_DUMPMEMSEGINFO
        ldr_dumpMemSegInfo (pMemSeg);
        #endif

       it appears that if you #define LDR_DUMPMEMSEGINFO, and rebuild the mm_host_util, it will dump for you the memory segments that get configured into the bin file which is fed to the firmware loader.

       You could also directly put some trace in the Platform_loadCallback() and print the differing values of the SharedRegion owner procId, and the Region ID.

       See if that helps at all, and we can keep digging on the next post.

    Regards,
    - Gil