cancel
Showing results for 
Search instead for 
Did you mean: 

Calling secure function from non secure area in TF-M threadx

Nitin
Associate III

Hi, need support. send_msg() is a secure area message of TF-M and I am calling it in non secure area via secure_nsc API.

What I am observing here is that I am not able to call this function in _tx_initialize_kernel_enter() function after the call to TX_PORT_SPECIFIC_PRE_INITIALIZATION. Just to mention this experiment is happening from STM32U585 board. Below is the code snippet for this.

 

 

 

VOID _tx_initialize_kernel_enter(VOID)

{

 

/* Determine if the compiler has pre-initialized ThreadX. */

if (_tx_thread_system_state != TX_INITIALIZE_ALMOST_DONE)

{

/* No, the initialization still needs to take place. */

 

/* Ensure that the system state variable is set to indicate

initialization is in progress. Note that this variable is

later used to represent interrupt nesting. */

_tx_thread_system_state = TX_INITIALIZE_IN_PROGRESS;

/* Call any port specific preprocessing. */

TX_PORT_SPECIFIC_PRE_INITIALIZATION

send_msg();

.

.

.

.

.

}

1 ACCEPTED SOLUTION

Accepted Solutions
Jocelyn RICARD
ST Employee

Hello @Nitin,

In context of TFM you must use an secure service that is know by TFM.

So, please use TFM documentation to see how to create such secure service

Best regards

Jocelyn

View solution in original post

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @Nitin,

In context of TFM you must use an secure service that is know by TFM.

So, please use TFM documentation to see how to create such secure service

Best regards

Jocelyn