how to write an svc handler in C to call SMC(monitor mode) instruction to switch to monitor mode for arm cortex a9? i.e from supervisor mode to monitor mode what all needs to be done in svc handler,how to write the same in C. Detailed answers appreciated...
Examples can be found in the Linux source tree for the OMAP2 platform.
See also: LWN's KS2012: ARM: Secure monitor API Kernel summit 2012 notes on ARM SMC modes.
Basically, what ever interface people dream up for an SWI
or SVC
interface can be used by the SMC
interface. Otherwise, this question is impossible to answer specifically.
SMC calling conventions is an advisory from ARM to allow secure world software vendors to make something that is compatible/inter-operable. NOTE: No one has to follow this advice.
This was published after the original question was asked. Some software does follow this advice such as ARM Trusted Firmware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With