Hi Dongxu,


Sorry for the late response. I did some tests and was able to switch between non-secure svc and secure mon via smc instruction on SabreLite. I enabled the monitor-mode hook and configured the elfloader to load seL4 in non-secure supervisor mode for my tests.

Note that VECTOR_BASE and MON_VECTOR_START are physical memory addresses, so if you enable MMU in the secure world, the code will not work. I guess this is the problem you have since if you load seL4 in secure supervisor mode, the MMU for secure world is enabled. If this is your situation, You might include the arm_monitor_vector code and data into the seL4 binary and set the MVBAR to the virtual address of the arm_monitor_vector.


I hope this will help.​


Regards,
Yanyan



From: Devel <devel-bounces@sel4.systems> on behalf of ¼½¶«Šń <ji_dongxv@163.com>
Sent: Saturday, August 25, 2018 12:38 AM
To: devel@sel4.systems
Subject: [seL4] SMC in seL4
 
Hello,
I'm porting sel4 to imx6q sabrelite as the trusted OS in trustzone.  I initialize the monitor mode directly using the functions "install_monitor_hook()" and ”°switch_to_mon_mode()”±. Is the sp in monitor mode appropriate? After calling smc in SVC mode, it hangs(do nothing in smc_handle()).  What's wrong with it? Do you have any ideas?
Thank you!
Dongxu Ji