AnsweredAssumed Answered

Central Security Unit: non-secure writes doesn't abort

Question asked by stefankalkowski on Nov 19, 2012
Latest reply on Jul 24, 2017 by Rijurekha Sen
Branched to a new discussion

Hi,

 

I've successfully run Linux in the non-secure world on top of an experimental kernel running on the i.MX53. For the first steps, I've configured the CSU (Central Security Unit) to enable secure and non-secure world to access all peripherals (using CSL registers). Moreover, I've configured the TZIC to route most interrupts as normal interrupts (non FIQ) to the non-secure world. Given that, the Linux guest successfully boots until I can enter a console via serial line.

 

After that, I've taken away all peripheral access rights from Linux. Step by step, I gave access rights for certain devices to Linux, or emulate others, Linux shouldn't access directly, by using hypervisor calls from the non-secure side. First, everything worked as expected. Reads from registers, Linux isn't allowed to access, result in a data-abort caught by the hypervisor. But now I detected some strange behaviour: When the non-secure Linux tries to write to e.g. the CCM registers, which it isn't allowed to access at all, no data-abort gets raised. A read leads to a data-abort, a write doesn't. The write has no effect on the CCM registers. Its value doesn't get changed. But it also doesn't trigger an exception nor alarm. I've even configured the CSU to forbid access to the CCM at all, whether it is secure or not. Then, when writing from the secure side to the CCM registers I get a data-abort. When doing it from the non-secure side nothing happens. To me this seems to be an odd behaviour, which isn't intended, or is it? Is there any other way I can detect violations of the CSL configuration in the CSU?

 

Regards

Stefan Kalkowski

Outcomes