[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170619155003.13218-5-ynorov@caviumnetworks.com>
Date: Mon, 19 Jun 2017 18:49:47 +0300
From: Yury Norov <ynorov@...iumnetworks.com>
To: Catalin Marinas <catalin.marinas@....com>,
Arnd Bergmann <arnd@...db.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Cc: Yury Norov <ynorov@...iumnetworks.com>,
Adam Borowski <kilobyte@...band.pl>,
Andreas Schwab <schwab@...e.de>,
Andrew Pinski <pinskia@...il.com>,
Bamvor Zhangjian <bamvor.zhangjian@...wei.com>,
Chris Metcalf <cmetcalf@...hip.com>,
Chris Metcalf <cmetcalf@...lanox.com>,
Florian Weimer <fweimer@...hat.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
James Hogan <james.hogan@...tec.com>,
James Morse <james.morse@....com>,
Joseph Myers <joseph@...esourcery.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
Nathan_Lynch@...tor.com, Prasun.Kapoor@...iumnetworks.com,
Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
Steve Ellcey <sellcey@...iumnetworks.com>,
Alexander Graf <agraf@...e.de>,
Mark Brown <broonie@...nel.org>,
christoph.muellner@...obroma-systems.com, davem@...emloft.net,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Alexey Klimov <klimov.linux@...il.com>, linyongting@...wei.com,
manuel.montezelo@...il.com, philipp.tomsich@...obroma-systems.com,
schwidefsky@...ibm.com, szabolcs.nagy@....com,
zhouchengming1@...wei.com
Subject: [PATCH 04/20] arm64: ilp32: add documentation on the ILP32 ABI for ARM64
Based on Andrew Pinski's patch-series.
Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
---
Documentation/arm64/ilp32.txt | 45 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/arm64/ilp32.txt
diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt
new file mode 100644
index 000000000000..08935a34e7e9
--- /dev/null
+++ b/Documentation/arm64/ilp32.txt
@@ -0,0 +1,45 @@
+ILP32 AARCH64 SYSCALL ABI
+=========================
+
+This document describes the ILP32 syscall ABI and where it differs
+from the generic compat linux syscall interface.
+
+AARCH64/ILP32 userspace can pass garbage in the top halve of w0-w7 registers
+(syscall arguments). So top 32 bits are zeroed for them.
+
+Comparing to AARCH32, AARCH64/ILP32 has 64-bit length of following types:
+ino_t is u64 type.
+off_t is s64 type.
+blkcnt_t is s64 type.
+fsblkcnt_t is u64 type.
+fsfilcnt_t is u64 type.
+rlim_t is u64 type.
+
+AARCH64/ILP32 ABI uses standard syscall table which can be found at
+include/uapi/asm-generic/unistd.h, with the exceptions listed below.
+
+Syscalls which pass 64-bit values are handled by the code shared from
+AARCH32 and pass that value as a pair. Next syscalls are affected:
+fadvise64_64()
+fallocate()
+ftruncate64()
+pread64()
+pwrite64()
+readahead()
+sync_file_range()
+truncate64()
+
+ptrace() syscall is handled by compat version.
+
+shmat() syscall is handled by non-compat handler as aarch64/ilp32 has no
+limitation on 4-pages alignement for shared memory.
+
+statfs() and fstatfs() take the size of struct statfs as an argument.
+It is calculated differently in kernel and user spaces. So AARCH32 handlers
+are taken to handle it.
+
+struct rt_sigframe is redefined and contains struct compat_siginfo,
+as compat syscalls expects, and struct ilp32_sigframe, to handle
+AARCH64 register set and 32-bit userspace register representation.
+
+elf_gregset_t is taken from lp64 to handle registers properly.
--
2.11.0
Powered by blists - more mailing lists