aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/public
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2013-03-12 15:48:36 +0000
committerIan Campbell <ian.campbell@citrix.com>2013-04-11 10:05:01 +0100
commitd1efb7702b0d112cf6e2f561aa60dc184642d525 (patch)
tree5078f490a7ee538fc8e64bf1294c6d2a4d419327 /xen/include/public
parent1f749f78224078a3a1d7ae5d9bee45aea64b1e57 (diff)
downloadxen-d1efb7702b0d112cf6e2f561aa60dc184642d525.tar.gz
xen-d1efb7702b0d112cf6e2f561aa60dc184642d525.tar.bz2
xen-d1efb7702b0d112cf6e2f561aa60dc184642d525.zip
xen: arm: define 64-bit guest hypercall calling convention.
As well as using x<N> rather than r<N> registers for passing arguments/results as mandate the use of x16 as the hypercall number. Add some pedantry about struct alignment layout referencing the ARM Procedure Calling Standard to avoid confusion with the previous "OABI" convention. While at it also mandate that hypercall argument structs are always little endian. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/include/public')
-rw-r--r--xen/include/public/arch-arm.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 3333399622..e44e90f7bc 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -33,20 +33,31 @@
* A hypercall is issued using the ARM HVC instruction.
*
* A hypercall can take up to 5 arguments. These are passed in
- * registers, the first argument in r0, the second argument in r1, the
- * third in r2, the forth in r3 and the fifth in r4.
+ * registers, the first argument in x0/r0 (for arm64/arm32 guests
+ * respectively irrespective of whether the underlying hypervisor is
+ * 32- or 64-bit), the second argument in x1/r1, the third in x2/r2,
+ * the forth in x3/r3 and the fifth in x4/r4.
*
- * The hypercall number is passed in r12.
+ * The hypercall number is passed in r12 (arm) or x16 (arm64). In both
+ * cases the relevant ARM procedure calling convention specifies this
+ * is an inter-procedure-call scratch register (e.g. for use in linker
+ * stubs). This use does not conflict with use during a hypercall.
*
* The HVC ISS must contain a Xen specific TAG: XEN_HYPERCALL_TAG.
*
- * The return value is in r0.
+ * The return value is in x0/r0.
*
- * The hypercall will clobber r12 and the argument registers used by
- * that hypercall (except r0 which is the return value) i.e. a 2
- * argument hypercall will clobber r1 and a 4 argument hypercall will
- * clobber r1, r2 and r3.
+ * The hypercall will clobber x16/r12 and the argument registers used
+ * by that hypercall (except r0 which is the return value) i.e. in
+ * addition to x16/r12 a 2 argument hypercall will clobber x1/r1 and a
+ * 4 argument hypercall will clobber x1/r1, x2/r2 and x3/r3.
*
+ * Parameter structs passed to hypercalls are laid out according to
+ * the Procedure Call Standard for the ARM Architecture (AAPCS, AKA
+ * EABI) and Procedure Call Standard for the ARM 64-bit Architecture
+ * (AAPCS64). Where there is a conflict the 64-bit standard should be
+ * used regardless of guest type. Structures which are passed as
+ * hypercall arguments are always little endian.
*/
#define XEN_HYPERCALL_TAG 0XEA1