LPC55S69 : cmse_nonsecure_entry privileges

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC55S69 : cmse_nonsecure_entry privileges

129 Views
Senior Contributor I

Hello !

I have FreeRTOS tasks on non secure side what running with user privileges.

Sometimes the should use cmse_nonsecure_entry calls to secure side and it is not so clear with what privilege this call appears on secure side.

I think call with user privilege on nonsecure side should be with user privilege on secure side as well.

Or some escalation of privileges can happens or can be done ?

Regards,

Eugene

Labels (1)
0 Kudos
4 Replies

5 Views
NXP Employee
NXP Employee

Hi, 

Please check the following link and let me know if this helps,

https://community.nxp.com/community/general-purpose-mcus/lpc/blog/2019/05/05/trustzone-with-armv8-m-... 


Have a great day,
Sol

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

5 Views
Senior Contributor I

Hi soledad‌ !

It is non clear set anywhere. But let's assume MPU configured on secure side and some code/data privileged and some are not.

Does privilege on nonsecure side call have effect for privileges protection on secure side ?

Or any call via NSC ares are privileged automatically ?

Regards,

Eugene

0 Kudos

5 Views
NXP Employee
NXP Employee

I think you can do something like:

#include <arm_cmse.h> void __attribute__((cmse_nonsecure_entry)) entry_func(int val) {   int state = cmse_nonsecure_caller();    if (state)   { // called from non-secure     // do non-secure work     ...   } else   { // called from within secure     // do secure work     ...   } }
0 Kudos

5 Views
Senior Contributor I

Hi !

I mean if NS side call CMSE functions with user or privileged rights.

I can't call NS printf from rtos task with user privileges.

So what is caller rights for call function via NSC ?

Should caller on NS side be privileged or nonprivileged is also OK ?

Regards,

Eugene

0 Kudos