LPC55S69 : cmse_nonsecure_entry privileges

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC55S69 : cmse_nonsecure_entry privileges

617 次查看
EugeneHiihtaja
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

标签 (1)
0 项奖励
4 回复数

493 次查看
soledad
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 项奖励

493 次查看
EugeneHiihtaja
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 项奖励

493 次查看
soledad
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 项奖励

493 次查看
EugeneHiihtaja
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 项奖励