This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set the CPU affinity of Secure OS for Juno r1?

Hi experts,

 

I'm using  the Juno r1 board with Linaro OPTEE released normal OS + secure OS.

After some tests, I find that every time when the Client Application (CA) calls the function of a Trusted Application (TA), the secure OS is just running on the same core as the CA.

So it's like when CA is on core 0 and it's calling secure function via smc, then the TA would run core 0  too.

 

I'm wondering is there anyway to set CPU affinity of the secure OS so no matter on which core the smc is generated, the secure OS could always be fixed on the core I need like core 2?

I think this issue should be related to the trusted firmware design such as the function opteed_smc_handler. However, after reading some documents and code, I cannot find the place the set this affinity.

 

Thank you in advance.

Simon

Parents
  • Hi, different approaches are theoretically possible. But, (as you've found) the one used in the SW stacks we supply here is that Secure OS runs on a single "calling" core - this approach generally has various efficiencies. (The calling core may have relevant data in caches, is not interrupted from an unrelated task, etc).

    I'm not sure (without spending time digging around) how much flexibility OP-TEE (or the secure OS handler) allows in this regard, or whether this behaviour is simply hardwired. You can ask the people who'd know, here: github.com/.../issues

Reply
  • Hi, different approaches are theoretically possible. But, (as you've found) the one used in the SW stacks we supply here is that Secure OS runs on a single "calling" core - this approach generally has various efficiencies. (The calling core may have relevant data in caches, is not interrupted from an unrelated task, etc).

    I'm not sure (without spending time digging around) how much flexibility OP-TEE (or the secure OS handler) allows in this regard, or whether this behaviour is simply hardwired. You can ask the people who'd know, here: github.com/.../issues

Children
No data