summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorSupreeth Venkatesh <supreeth.venkatesh@arm.com>2017-09-20 20:48:13 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-10-06 22:35:40 +0100
commit4d163696f23dc552b30c2a21cc5e5b7d201c7946 (patch)
tree6b78118d468eee90aebc6243f3e50ae2ec0b2e7f /ArmPkg
parentaed68ed6bec5432d531e68e825400907c4968cc3 (diff)
downloadedk2-4d163696f23dc552b30c2a21cc5e5b7d201c7946.tar.gz
edk2-4d163696f23dc552b30c2a21cc5e5b7d201c7946.tar.bz2
edk2-4d163696f23dc552b30c2a21cc5e5b7d201c7946.zip
ArmPkg/Include: Add ArmSvcLib header file.
ArmSvcLib header file to specify the SVC arguments structure and function prototype to trigger an SVC call. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/ArmPkg.dec1
-rw-r--r--ArmPkg/Include/Library/ArmSvcLib.h46
2 files changed, 47 insertions, 0 deletions
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index 084d7efb1d..f99054a7de 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -39,6 +39,7 @@
DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h
ArmDisassemblerLib|Include/Library/ArmDisassemblerLib.h
ArmGicArchLib|Include/Library/ArmGicArchLib.h
+ ArmSvcLib|Include/Library/ArmSvcLib.h
[Guids.common]
gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }
diff --git a/ArmPkg/Include/Library/ArmSvcLib.h b/ArmPkg/Include/Library/ArmSvcLib.h
new file mode 100644
index 0000000000..77a60b3679
--- /dev/null
+++ b/ArmPkg/Include/Library/ArmSvcLib.h
@@ -0,0 +1,46 @@
+/** @file
+*
+* Copyright (c) 2016 - 2017, ARM Limited. All rights reserved.
+*
+* This program and the accompanying materials
+* are licensed and made available under the terms and conditions of the BSD License
+* which accompanies this distribution. The full text of the license may be found at
+* http://opensource.org/licenses/bsd-license.php
+*
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#ifndef __ARM_SVC_LIB__
+#define __ARM_SVC_LIB__
+
+/**
+ * The size of the SVC arguments are different between AArch64 and AArch32.
+ * The native size is used for the arguments.
+ */
+typedef struct {
+ UINTN Arg0;
+ UINTN Arg1;
+ UINTN Arg2;
+ UINTN Arg3;
+ UINTN Arg4;
+ UINTN Arg5;
+ UINTN Arg6;
+ UINTN Arg7;
+} ARM_SVC_ARGS;
+
+/**
+ Trigger an SVC call
+
+ SVC calls can take up to 7 arguments and return up to 4 return values.
+ Therefore, the 4 first fields in the ARM_SVC_ARGS structure are used
+ for both input and output values.
+
+**/
+VOID
+ArmCallSvc (
+ IN OUT ARM_SVC_ARGS *Args
+ );
+
+#endif