I'm working with several flavor of imx6 boards (sabre sd from NXP, sabre_lite from boundary devices) and we are running a secure OS in Trustzone, alongside Linux in the normal world. Our current configuration does not configure the PL310 L2 cache controller and does not set the ACTLR.SMP bit at boot. We wait for Linux to start and requests these actions (the first one to the monitor, for secure access, the second one it can do by itself).
Now I am trying to activate the PL310 during our boot sequence. The whole boot sequence is as follows:
1) U-Boot SPL loads the secure kernel and U-Boot from an SD card, and copy them to RAM
2) execution is given to the secure kernel which configures the secure world (Secure MMU is activated)
3) at some point, we give back the execution to the normal world (to U-boot, I think it activates an MMU, but there is no PL310 related code executed)
4) U-boot loads Linux from the SD card and launch it
My current status is quite buggy and random, but it seems that activating the PL310 or the ACTLR bit before U-boot (the second one, in the normal world) prevent it to work (most of the time, it fails to configure the SD controller to load Linux).
Any idea why activating PL310 or ACTLR.SMP before uboot is started might introduce cache issue ?