2012-03-26 12:59:50 +02:00
|
|
|
/** @file
|
|
|
|
*
|
2014-08-04 16:18:13 +02:00
|
|
|
* Copyright (c) 2012-2014, ARM Limited. All rights reserved.
|
2012-03-26 12:59:50 +02:00
|
|
|
*
|
2019-04-04 01:03:18 +02:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
2012-03-26 12:59:50 +02:00
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
2021-04-20 13:00:23 +02:00
|
|
|
#ifndef ARM_SMC_LIB_H_
|
|
|
|
#define ARM_SMC_LIB_H_
|
2012-03-26 12:59:50 +02:00
|
|
|
|
2014-08-04 16:18:13 +02:00
|
|
|
/**
|
|
|
|
* The size of the SMC arguments are different between AArch64 and AArch32.
|
|
|
|
* The native size is used for the arguments.
|
|
|
|
*/
|
|
|
|
typedef struct {
|
2021-12-05 23:53:50 +01:00
|
|
|
UINTN Arg0;
|
|
|
|
UINTN Arg1;
|
|
|
|
UINTN Arg2;
|
|
|
|
UINTN Arg3;
|
|
|
|
UINTN Arg4;
|
|
|
|
UINTN Arg5;
|
|
|
|
UINTN Arg6;
|
|
|
|
UINTN Arg7;
|
2014-08-04 16:18:13 +02:00
|
|
|
} ARM_SMC_ARGS;
|
2012-03-26 12:59:50 +02:00
|
|
|
|
2014-08-04 16:18:13 +02:00
|
|
|
/**
|
|
|
|
Trigger an SMC call
|
2012-03-26 12:59:50 +02:00
|
|
|
|
2014-08-04 16:18:13 +02:00
|
|
|
SMC calls can take up to 7 arguments and return up to 4 return values.
|
|
|
|
Therefore, the 4 first fields in the ARM_SMC_ARGS structure are used
|
|
|
|
for both input and output values.
|
2012-03-26 12:59:50 +02:00
|
|
|
|
2014-08-04 16:18:13 +02:00
|
|
|
**/
|
2012-03-26 12:59:50 +02:00
|
|
|
VOID
|
2014-08-04 16:18:13 +02:00
|
|
|
ArmCallSmc (
|
2021-12-05 23:53:50 +01:00
|
|
|
IN OUT ARM_SMC_ARGS *Args
|
2012-03-26 12:59:50 +02:00
|
|
|
);
|
|
|
|
|
2021-04-20 13:00:23 +02:00
|
|
|
#endif // ARM_SMC_LIB_H_
|