public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
	Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	Achin Gupta <achin.gupta@arm.com>
Subject: [Patch v2 3/3] ArmPkg/Include: Add ArmSvcLib header file.
Date: Wed, 20 Sep 2017 20:48:13 +0100	[thread overview]
Message-ID: <20170920194813.43665-4-supreeth.venkatesh@arm.com> (raw)
In-Reply-To: <20170920194813.43665-1-supreeth.venkatesh@arm.com>

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>
---
 ArmPkg/Include/Library/ArmSvcLib.h | 46 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 ArmPkg/Include/Library/ArmSvcLib.h

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
-- 
2.14.1



      parent reply	other threads:[~2017-09-20 19:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 19:48 [Patch v2 0/3] *** Add ArmSvc Library *** Supreeth Venkatesh
2017-09-20 19:48 ` [Patch v2 1/3] ArmPkg/ArmSvcLib: Add ArmSvcLib implementation Supreeth Venkatesh
2017-09-20 19:48 ` [Patch v2 2/3] ArmPkg: Modify description file to build ArmSvcLib Supreeth Venkatesh
2017-09-20 19:48 ` Supreeth Venkatesh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170920194813.43665-4-supreeth.venkatesh@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox