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

Does CCI-400 guarantees cache coherency between secure and non-secure worlds?

Hi Experts,

I'm developing some kind of Secure OS on A57/53 big.LITTLE SoC.

While multi-core testing, I'm facing some wired problem on my world shared memory mechanism.

When I run world shared memory test on a single core (using affinity), it works well for a hundred of thousand times.

But once multi-core enabled, it sometimes fails.

Meaning to say, in the secure there is no content on the memory which is shared by non-secure.

I'm now doubting everything.

I believe that the CCI-400 works well between the big and LITTLE cluster's for cache coherency in the non-secure world.

But when world change occurs from non-secure to secure, does CCI-400 still guarantee cache coherency between two worlds?

Or Should I use any cache maintenance instruction?


My world shared memory mechanism is like this;

  1. Allocate some amount of memory from the non-secure user space.
  2. Ask linux kernel driver passing these virtual address and size to share memory with the secure world.
  3. Kernel driver queries current TTBA, and issues smc call with these three parameters.
  4. Secure OS gets the TTBA, VA and size,
  5. and maps the TTBA into secure os' process, gets pagetable entries of the shared memory, and finally maps the shared memory

It might be a silly question, please advice me.

Parents
  • Hi Matt,

    Thanks for your answer and it really helps me. 


    I mapped NS address into secure world as _secure_ for sharing. 

    I guess it caused the problem. 

    Now I changed the table attributes as non-secure in that case then it works well. :)


    And your comments makes me understand how cache works berween two worlds clearly. 

Reply
  • Hi Matt,

    Thanks for your answer and it really helps me. 


    I mapped NS address into secure world as _secure_ for sharing. 

    I guess it caused the problem. 

    Now I changed the table attributes as non-secure in that case then it works well. :)


    And your comments makes me understand how cache works berween two worlds clearly. 

Children
No data