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.

TMS320C6678: MCSM adn SRIO memory protection

Part Number: TMS320C6678


Hi,

I have activated SRIO user write memory protection by means of the MPAX registers in MSMC (srugw7a), using SRIO PRIV ID = 9. It seems to work as expected but when the SRIO Source Node ID is equal 0.

There is way to forbid access even with SRIO Node ID = 0?

#define SRIO_PRIVID	9

//Protect all memory from user write
CSL_MSMC_SMSMPAXL mpaxl;
CSL_MSMC_getSMSMPAXL(SRIO_PRIVID, 0, &mpaxl);
mpaxl.uw=0;
mpaxl.ux=0;
CSL_MSMC_setSMSMPAXL(SRIO_PRIVID, 0, &mpaxl);

//Grant access to first DDR 32MB:
CSL_MSMC_SESMPAXH mpaxh;
CSL_MSMC_getSESMPAXH(SRIO_PRIVID, 0, &mpaxh);
mpaxh.baddr=(0x80000000>>12;
mpaxl.uw=1;
CSL_MSMC_setSESMPAXL(SRIO_PRIVID, 1, &mpaxl);
CSL_MSMC_setSESMPAXH(SRIO_PRIVID, 1, &mpaxh);

  • Hi Alberto,

    I am held up with another task, I will resume to looking into this after 2-3 days.

    Thanks,

    Rajarajan U

  • Thanks, meanwhile as maybe you have already notice, there is an error in code cut&paste. The mpaxl used when settings Grant to memory have  SESMPAXL. Prior to changes, I read it from SESMPAXH 0.

  • Hi Alberto,

    //Grant access to first DDR 32MB:
    CSL_MSMC_SESMPAXH mpaxh;
    CSL_MSMC_getSESMPAXH(SRIO_PRIVID, 0, &mpaxh);          
    mpaxh.baddr=(0x80000000>>12;                                                <-- value set at MPAXH read from 0.
    mpaxl.uw=1;                                                                                 
    CSL_MSMC_setSESMPAXL(SRIO_PRIVID, 1, &mpaxl);           
    CSL_MSMC_setSESMPAXH(SRIO_PRIVID, 1, &mpaxh);          <--  whole reg config set at MAPXH at 1

    Thanks, meanwhile as maybe you have already notice, there is an error in code cut&paste. The mpaxl used when settings Grant to memory have  SESMPAXL. Prior to changes, I read it from SESMPAXH 0.

    I understand your reply here. MPAXH gets the config for privid "0" and sets it for privid "1".

    If the error is resolved, that's fine by me. As I looked into the MSMC API examples, they have used an "unsigned integer" for "privid". either you can typecast the integer values which are hardcoded in 

    CSL_MSMC_getSESMPAXH(SRIO_PRIVID, 0, &mpaxh);   (see bold)

    or 

    use the uint32 variable, though that may throw warnings. It won't have any effect on its configuration, I am suggesting for safer usage.

    It seems that you have been working on this part for quite a long time, that's really a nice thing to know.

    Thanks,

    Rajarajan U