Hello hackers,
I'm trying to run Fiasco.OC in secure world and Linux in non-secure world on i.MX6Q. For this I'm using the TrustZone example (pkg/examples/sys/vm-tz). To secure world I have given 128MB RAM starting from 0x10000000 and I modified the example to give NS world 256MB starting from 0x20000000. I've replaced atags with dtb of my board and it is copied to NS side like kernel and initrd.
At first I encountered runtime exception, which I fixed by implementing following to arm_em_tz builds Thread::arch_ext_vcpu_enabled() { return true; }
Now I'm having problems at early stages of NS boot, where Linux kernel is checking for the dtb magic. The code loads the dtb magic from the address I'm giving in r2 register (0x21000000), but the magic value usually have one byte or all of them incorrect.
I've used JDB to dump the area of dtb after hitting that error and it shows the dtb magic properly. So for some reason the NS-world gets mangled value. Any idea what might be causing this?
Thanks, Markku