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;
It might be a silly question, please advice me.
I should have answered the title question clearly too - the CCI-400, and all cache-coherent interconnects by ARM, do not assure coherency between the Secure and Non-Secure worlds because they are two separate physical address spaces.
You can think of the NS bit (which is a conjunction of SCR.NS, translation table entry NS, and whether you're not in Monitor mode) as a 33rd/41st/49th address bit (Short, LPAE, AArch64 physical addressing). In this sense, the NS+32-bit address 0x1_0000_8000 (NS) is not the same as NS+32-bit address 0x0_0000_8000 (S) and, obviously, two 'different' addresses need not be coherent.
The CCI-400 will, however, assure that all NS transactions are coherent in and of themselves, and all Secure transactions are coherent in and of themselves - so if you stay mapped as Non-Secure from Linux to your Secure OS, then the coherency is well-managed. Having the interconnect assume that the Secure and Non-Secure worlds have the same underlying memory map would be a violation of the Security Extensions.
Ta,
Matt