Hi Sumit,
On Thu, Sep 17, 2015 at 4:41 AM, SUMIT GARG sumit.garg@freescale.com wrote:
Hi OP-TEE experts,
I am working on to integrate OP-TEE secure OS with u-boot on ARMv7 and came across following question
that I need to clarify:
It seems that optee-os doesn’t save u-boot context at its entry
point during its initialization.
o Like registers r0-r12, sp etc.
Is it the responsibility of boot-loader (u-boot in my case) to
save its context, pass
control to optee-os and then retrieve context after optee-os returns control back to boot-loader?
Before u-boot has entered OP-TEE it runs in secure mode (ns-bit = 0), but once OP-TEE has initialized and returns it returns to non-nsecure mode (ns-bit = 1). Preserving the context could potentially leak secrets to non-secure software.
At https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/generic_... which is what happens right before OP-TEE returns back, you can see that it's exiting to normal world via the secure monitor.
Regards, Jens