summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/include/armv6-m
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-21 00:25:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-21 00:25:17 +0000
commit55a46f0500f36567ce352048454534135aff92f2 (patch)
tree8b08f2ca6a982e81e2f644e07f52525ff9a35053 /nuttx/arch/arm/include/armv6-m
parentae6758d5518a0e92f10476592dc156af38f36244 (diff)
downloadpx4-nuttx-55a46f0500f36567ce352048454534135aff92f2.tar.gz
px4-nuttx-55a46f0500f36567ce352048454534135aff92f2.tar.bz2
px4-nuttx-55a46f0500f36567ce352048454534135aff92f2.zip
Fix syscall parameter passing for the case where the number of parameters is >4
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5767 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/include/armv6-m')
-rw-r--r--nuttx/arch/arm/include/armv6-m/syscall.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/nuttx/arch/arm/include/armv6-m/syscall.h b/nuttx/arch/arm/include/armv6-m/syscall.h
index 9548ae494..863a7afec 100644
--- a/nuttx/arch/arm/include/armv6-m/syscall.h
+++ b/nuttx/arch/arm/include/armv6-m/syscall.h
@@ -156,7 +156,10 @@ static inline uintptr_t sys_call3(unsigned int nbr, uintptr_t parm1,
return reg0;
}
-/* SVC call with SYS_ call number and four parameters */
+/* SVC call with SYS_ call number and four parameters.
+ *
+ * NOTE the nonstandard parameter passing: parm4 is in R4
+ */
static inline uintptr_t sys_call4(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,
@@ -180,7 +183,10 @@ static inline uintptr_t sys_call4(unsigned int nbr, uintptr_t parm1,
return reg0;
}
-/* SVC call with SYS_ call number and five parameters */
+/* SVC call with SYS_ call number and five parameters.
+ *
+ * NOTE the nonstandard parameter passing: parm4 and parm5 are in R4 and R5
+ */
static inline uintptr_t sys_call5(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,
@@ -205,7 +211,10 @@ static inline uintptr_t sys_call5(unsigned int nbr, uintptr_t parm1,
return reg0;
}
-/* SVC call with SYS_ call number and six parameters */
+/* SVC call with SYS_ call number and six parameters.
+ *
+ * NOTE the nonstandard parameter passing: parm4-parm6 are in R4-R6
+ */
static inline uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,