I am doing some research in the OP-TEE security and its implementation.I have started with implementing it in hikey960,and i was able to run a hello world sample app in hikey.
On the analysis is i came across the following questions
1.Is the ATF that loads trusted OS?,If yes to which memory the trusted os is loaded?
2.By default does the REE and TEE runs in same core?If it is running in same core will there be any performance impact on the Rich OS during context switching?
Yes, the ATF (now known as TF-A), specifically BL2, loads the trusted OS (BL32). Each platform has a different memory layout. Dram or sram can be used. Dram seems more common. E.g. https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/hisilicon/hikey960/include/platform_def.h#n45.
Yes. The process in the Rich OS will look like it has ben interrupted/rescheduled. For more details see https://optee.readthedocs.io/en/latest/faq/faq.html?highlight=scheduler#q-how-is-op-tee-being-scheduled.
Best to ask OP-TEE related questions @ https://github.com/OP-TEE/optee_os/issues/new since the maintainers are there and can give you better answers with more details.