__smc keyword declares an SMC (Secure Monitor Call) function.
A call to the SMC function inserts an
SMC instruction into the instruction
stream generated by the compiler at the point of function invocation.
SMC instruction replaces the
SMI instruction used
in previous versions of the ARM assembly language.
__smc is a function qualifier. It affects the type of a function.
Is a 4-bit immediate value used in the
The value of
smc_numis ignored by the ARM processor, but can be used by the SMC exception handler to determine what service is being requested.
SMC instruction is available for selected ARM architecture-based
processors, if they have the Security Extensions.
The compiler generates an error if you compile source code containing the
__smc keyword for an architecture that does not support the
__smc(5) void mycall(void); /* declare a name by which SMC #5 can be called */ ... mycall(); /* invoke the function */