Thanks for the search pattern for finding that manual. It needed the exact wording ("MCIMX53" and not "i.MX53") to get a match.
Yes, the form demands "NXP Salesperson/FAE Name:". I don't have one of these. We're using the i.MX53 on a small board supplied by another company, so we're one removed from NXP.
NXP happily supplied me with the "Security Reference Manual for i.MX 6Dual, 6Quad, 6Solo, and 6DualLite Families of Applications Processors" without requiring that. So why is the i.MX53 more "secret" than the i.MX6?
> I thought there might be a caching issue
From your description it does sound like it. Have you tried fully flushing the caches (all of them) before switching modes rather than just disabling them? And somehow waiting for the flush to complete, as the CPU may be able to continue to execute ahead for many microseconds while the cache flush is proceeding.
Could the "Branch Target" or "Global History" parts of the "Program Flow Prediction" hardware be causing your problems? You can disable it.
Maybe you're actually getting an interrupt, and they're not set up to work properly in the "Normal World".
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344i/Cacgacec.html
> I switch to the Normal World by setting the NS bit to 1 in the Secure Configuration Register.
What is the advantage in an embedded product to switching to "Normal Mode"? Who or what are you trying to defend against? Can you say or is this answered by "if I told you I'd have to ..."?
"Secure Configuration Register" and "NS" don't appear in the 5100 page "i.MX53 Multimedia Applications Processor Reference Manual Rev 2.1". I'm guessing this information must only be in the Security Reference Manual..
I'm wrong again. The "Security Configuration Register" is in CP15 in the ARM Core. That's in the "Technical Reference Manual". It says to read the "Architecture Reference Manual" to find out how it works. I'm reading that manual, and can't find anything that simply details how this works or how to use it.
> Secure Mode, but after configuring u-boot to switch to Normal Mode
Is that what NXP/Freescale call "TrustZone (Secure) Privilege (Supervisor) Mode" and "Non-TrustZone (Regular) Privilege (Supervisor) Mode"? No, I see you're using the ARM Core security stuff. There might be some overlap with TrustZone.
I see you're using the same words as in this article. Have you read it as it details what they had to do to a Linux Kernel to get it booting in the "non-secure world":
https://genode.org/documentation/articles/trustzone
It says they have to boot securely to a "Hypervisor" and have that switch and load the operating system. Might you need to do that?
Interestingly TrustZone doesn't allow them to trap and emulate accesses as the CPU doesn't seem to provide "Precise" exceptions in this case. But the i.MX53 implementation does allow this. That's good, but doesn't allow a "generic" solution to run on multiple ARM cores.They couldn't partition memory (with the "General" platform) either, as that isn't covered by the "Security" system. But they could do this on the i.MX53. Likewise the Interrupts can't be divided up. And the IPU/GPU are married and can't be assigned properly.
You need Kernel 4 or greater.
The last supported kernel (last supported software) for this chip is 2.6.35.
As you have found, the "Community" dropped support for this chip a year or more ago.
Why are you using this chip? There are more powerful members of the i.MX6 family, and they're cheaper too.
Tom