__smc keyword declares an SMC (Secure Monitor Call) function.
Is a 4-bit immediate value used in the
The value of
is ignored by the ARM processor, but can be used by the SMC exception handler to determine what service is being requested.
A call to the SMC function inserts an
SMC instruction into the instruction
stream generated by the compiler at the point of function invocation.
SMCinstruction replaces the
SMIinstruction used in previous versions of the ARM assembly language.
__smc is a function qualifier. It affects the type of a function.
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 */