]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/Include: Add ArmSvcLib header file.
authorSupreeth Venkatesh <supreeth.venkatesh@arm.com>
Wed, 20 Sep 2017 19:48:13 +0000 (20:48 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 6 Oct 2017 21:35:40 +0000 (22:35 +0100)
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>
ArmPkg/ArmPkg.dec
ArmPkg/Include/Library/ArmSvcLib.h [new file with mode: 0644]

index 084d7efb1d8bbb0ce7d48a4610a6bfb427223f68..f99054a7de3e51410bbc63f7aba5fff1d75f3bbb 100644 (file)
@@ -39,6 +39,7 @@
   DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h\r
   ArmDisassemblerLib|Include/Library/ArmDisassemblerLib.h\r
   ArmGicArchLib|Include/Library/ArmGicArchLib.h\r
+  ArmSvcLib|Include/Library/ArmSvcLib.h\r
 \r
 [Guids.common]\r
   gArmTokenSpaceGuid       = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }\r
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