1 /** @file 2 * 3 * Copyright (c) 2012-2014, ARM Limited. All rights reserved. 4 * 5 * This program and the accompanying materials 6 * are licensed and made available under the terms and conditions of the BSD License 7 * which accompanies this distribution. The full text of the license may be found at 8 * http://opensource.org/licenses/bsd-license.php 9 * 10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 * 13 **/ 14 15 #ifndef __ARM_SMC_LIB__ 16 #define __ARM_SMC_LIB__ 17 18 /** 19 * The size of the SMC arguments are different between AArch64 and AArch32. 20 * The native size is used for the arguments. 21 */ 22 typedef struct { 23 UINTN Arg0; 24 UINTN Arg1; 25 UINTN Arg2; 26 UINTN Arg3; 27 UINTN Arg4; 28 UINTN Arg5; 29 UINTN Arg6; 30 UINTN Arg7; 31 } ARM_SMC_ARGS; 32 33 /** 34 Trigger an SMC call 35 36 SMC calls can take up to 7 arguments and return up to 4 return values. 37 Therefore, the 4 first fields in the ARM_SMC_ARGS structure are used 38 for both input and output values. 39 40 **/ 41 VOID 42 ArmCallSmc ( 43 IN OUT ARM_SMC_ARGS *Args 44 ); 45 46 #endif 47