9.14 __smc

The __smc keyword declares an SMC (Secure Monitor Call) function.


__smc(int smc_num) return-type function-name([argument-list]);
Is a 4-bit immediate value used in the SMC instruction.
The value of smc_num 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.


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


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


__smc(5) void mycall(void); /* declare a name by which SMC #5 can be called */
mycall();                   /* invoke the function */
Related reference
7.29 --cpu=name compiler option
Related information
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.