]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Include/Library/ArmSvcLib.h
ArmPkg/Include: Add ArmSvcLib header file.
[mirror_edk2.git] / ArmPkg / Include / Library / ArmSvcLib.h
diff --git a/ArmPkg/Include/Library/ArmSvcLib.h b/ArmPkg/Include/Library/ArmSvcLib.h
new file mode 100644 (file)
index 0000000..77a60b3
--- /dev/null
@@ -0,0 +1,46 @@
+/** @file\r
+*\r
+*  Copyright (c) 2016 - 2017, ARM Limited. All rights reserved.\r
+*\r
+*  This program and the accompanying materials\r
+*  are licensed and made available under the terms and conditions of the BSD License\r
+*  which accompanies this distribution.  The full text of the license may be found at\r
+*  http://opensource.org/licenses/bsd-license.php\r
+*\r
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*\r
+**/\r
+\r
+#ifndef __ARM_SVC_LIB__\r
+#define __ARM_SVC_LIB__\r
+\r
+/**\r
+ * The size of the SVC arguments are different between AArch64 and AArch32.\r
+ * The native size is used for the arguments.\r
+ */\r
+typedef struct {\r
+  UINTN  Arg0;\r
+  UINTN  Arg1;\r
+  UINTN  Arg2;\r
+  UINTN  Arg3;\r
+  UINTN  Arg4;\r
+  UINTN  Arg5;\r
+  UINTN  Arg6;\r
+  UINTN  Arg7;\r
+} ARM_SVC_ARGS;\r
+\r
+/**\r
+  Trigger an SVC call\r
+\r
+  SVC calls can take up to 7 arguments and return up to 4 return values.\r
+  Therefore, the 4 first fields in the ARM_SVC_ARGS structure are used\r
+  for both input and output values.\r
+\r
+**/\r
+VOID\r
+ArmCallSvc (\r
+  IN OUT ARM_SVC_ARGS *Args\r
+  );\r
+\r
+#endif\r