Svc handler to SMC call

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...

Upvotes: 5

Views: 6728

Answers (1)

artless-noise-bye-due2AI
artless-noise-bye-due2AI

Reputation: 22430

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.

Upvotes: 4

Related Questions