We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a samsung exynos 4412(Cortex-A9) development board. There is a simple secure os that can run on it. The normal os is Android. Now I am trying to select linux as the secure os. The linux kernel is from the Android OS for the development board. The kernel version is 3.0.15. It can run pretty well when it is in normal world. When I switch to the secure world(clear the NS bit), the kernel will stop at the calibrate_delay() function in init/main.c. That is to say, the kernel uncompressed code is executed correctly and the first C function of the kernel, start_kernel(), is also executed. Almost all the initialization functions run well except running to calibrate_delay(). This function will wait for the jiffies changed:
/* wait for "start of" clock tick */
ticks = jiffies;
while (ticks == jiffies);
I guess the reason is no clock interrupt is raised(I print logs in clock interrupt callback functions, they are never gotten in). I have checked the CPSR state before and after the local_irq_enable() function. The IRQ and FIQ bit are set correctly. I also print some logs in the Linux kernel's IRQ handler defined in the interrupt vectors table. Nothing logged.
I am definitely a newbie in linux kernel and trustzone. Can anybody tell me what the problem is? Or more important thing is can a linux kernel run as the trustzone secure os? Are there any reference manual to do this? Thank you.
Hi,
If I understand correctly you are trying to run Linux in secure mode.
Firstly it's highly discouraged to do so. Secondly if you want to do that
you need to make sure interrupts are configure properly. The interrupts
are grouped( Group 0 interrupts are Secure interrupts, and Group 1
interrupts are Non-secure interrupts). May be the interrupt is configured
and getting raised in non-secure and now you are running Linux in secure.
Regards,
Sudeep