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.

LoggerSM alignement

Other Parts Discussed in Thread: SYSBIOS

Hello all,

(target C6678, CCSv6 1.40, SYSBIOS 6.40, UIA 2.0.1.34)

I recall that the LoggerSM buffer must aligned on a 4096 bytes boundary.

My understanding is that when I create it statically in the CFG, it is automatically taken care of by this :

/*
 *  ======== module$static$init ========
 */
function module$static$init(mod, params)
{
    /* Assign the default filtering levels based on the configuration. */
    mod.level1 = params.level1Mask;
    mod.level2 = params.level2Mask;
    mod.level3 = params.level3Mask;
    mod.sharedObj = null;
    mod.sharedBuffer.length = params.sharedMemorySize;
    mod.serial = 0;
    mod.partitionId = params.partitionId;
    mod.enabled = true;
    /* Need 4KB alignment */
    Memory.staticPlace(mod.sharedBuffer, 4096, params.bufSection);
}

Now my question are :

1) If I create the buffer dynamically (runtime) with LoggerSM_setSharedMemory, I should do the alignement myself, right ?

2) How do I do that ? (the section is created in the CFG) the start address of the section should be a multiple of 0x1000 ?

3) what are the consequences if I don't ? why is this restriction in place ? Does it really matter on a non-mixed architecture (i.e. not the evmTI816x family)?

Regards,

Clement

  • Hi Clement,

    The alignment requirement is needed for the Linux host utility that reads the LoggerSM buffer.  This is doing an 'mmap' on the buffer, so the buffer needs to be page-aligned.

    If you are running BIOS on all the cores then the alignment requirement doesn't apply.

    Best regards,

        Janet

  • Hi Janet,

    Thank you for your reply.

    To be clear:
    all cores writing logs in the LoggerSM buffer are on the same DSP.

    However another DSP on Linux will do the memory reads of the buffer content (by SRIO).

    Could you file a request that this alignement constraint be more accurately described with what you said in the System Analyzer User Guide ?


    Clement

  • Hi Clement,

    I filed a bug for LoggerSM to provide better documentation on alignment requirements.

    Thanks,

        Janet