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.

CSM module: secure code, unsecure data

Hi!

I have a question regarding the CSM module. It's stated in the documentation that code running in unsecure memory cannot read/write to memory that is secure or from flash. How can I know if I have code running in unsecure memory?

I've checked my *.cmd and sections .cinit, .pinit, .text are in flash. The section ramfuncs is loaded from flash and running in RAML0, so secured memory. Does this mean that my code is running in secured memory?

IQTABLES, FPUTABLES and .stack are in unsecure memory. The code running in secure memory can read/write to memory that is unsecure?

Thanks,

Monica

  • Monica,

    Anything that is placed in flash or L0 RAM when security is enabled will be secure.

    No just because ramfuncs is in L0 doesn't mean the reset of your code is running from secure memory.  This only means ramfuncs is running from secure memory.  If .text is in L0 or flash, then that means that your code is running from secure memory.

    Yes secure code can read or write anywhere in the device (including flash), so if you wanted to do a secure re-flash you would want to execute the flash API from secure RAM (L0).

    Trey

  • Thanks Trey!

    This means I can be sure the execution will not encounter any problems due to the impossibility to access some memory while locked.

    Regards,

    Monica