Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbdFSPvd (ORCPT ); Mon, 19 Jun 2017 11:51:33 -0400 Received: from mail-sn1nam01on0061.outbound.protection.outlook.com ([104.47.32.61]:36784 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751689AbdFSPv2 (ORCPT ); Mon, 19 Jun 2017 11:51:28 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com Subject: [PATCH 04/20] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Mon, 19 Jun 2017 18:49:47 +0300 Message-Id: <20170619155003.13218-5-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: AM5PR0402CA0010.eurprd04.prod.outlook.com (10.175.37.20) To BY1PR0701MB1864.namprd07.prod.outlook.com (10.162.143.146) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4627c42e-9999-4f76-51ca-08d4b72b003a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1864;3:LZVTu/RUzIiB0fWa1CNhGWLKzy4+VjugzrkOyQJS+QOdwQoslNECaeQcVzNCpaIaVgj8Tman+dP82DK07dgpJZFf3DzdjA7FwVmhT3Ucp7CokuUmRDGK9iu4EsKiaoE6RuOi4Fv4J0TCDY5F/cXa8tfZ0uj9jI+7mcKBnhsq6WaJAF3hbGgFF9x30p+1rgVCbw5qfZ/wdmOijdhzY9LYJt2QLaxJkPW9PuV799p4hjCHskZK/6rM9yavQ8VumRjQTKJPXtk3D4lEXUj7PxVOz8iC+k+OdIDYAu9ojVXcT4jZ9gAquLlz9y8XifXGC3lUvGm0u/aeTa5V8iY20LvXkg==;25:Kv1X15OCQ6gPyhCNNlDCqjjuNnvjRkfiF7TUIBpPyB+DLu/PVq9k1bad63pvRnexclcuCp0CpcxBbFVsLiQktzrUxG/t3H9OHI1V48MO2tux1Mp2TMgdFZ5rBHVGoETWCTxqF1JkJwY2EQ7VXd0/LNOVDj5SOrqEm3iQxDpxilNDdV+9RO9PIxnQ6SIm5MV6I/QoDq0yxykLZxXpd20t0mT80QBJJZ5sKa4YxemyNbFEdroPWkp0C6YYO5XrArvveIBat3/ytMPRXNALs3HbaxWndhFPLjPAnlU3vmsHkCceAxJ37QPmBok0+uobzRSxXgkmBslNwaF6Aa2KFSQsuf/T2sk6u0YWjpxM3dNX+/djPFuKfN7aOr22EUguUQ59umR0mDNMZG1/7No41kEeR9d6q5qpxPCsupmiGpx/reS9pbp1mZ7dqbxRbR6W4+a7jOlA23MfRNgGnbRou4fp655KAZo6z7soCH6mxcoYQ9A= X-MS-TrafficTypeDiagnostic: BY1PR0701MB1864: X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1864;31:hy1Rfd6rWSmeiP2mQvl/kYoCkMdErBWRG3SuFwVdQAeiq0j8DLfqTI680iwv18nCnMePli63LZXD1joSNBYvdOIcvv5waIPzVe4dUDvlnhCf87eeKrO/ykrrkrT0oAdTJ1E6fOtehW5mS/46Dt6PGPg1yJORt6d74Z5nbuZN8RYRpiruxfVT74ak/yOFaCRHUyVpbwfbM62DuCuSPHBDozH3BF9VM2Hr4bw36uLPyLk=;20:cwq+cbGjFRS+iFvh6qfEcfzF+q7zhfI72MfYonbUx0SgOf/tys+2QSe/mrM98Y1CNQWbUpGLAOjRp64cyQYQgi204hevZsYrJjISRSv7ogZvdkwrWWlsjSt4Un4a3szLrlsP6Iysh4zMkx5IKjb6IpiyzLV/iMqFro56UA2VtIx52PKQk71zP2/0sK0wVGM5vn6fnvbe8BXlYj2yLURmC29qhRgHrqMncdZ0jrDOk/8zb2OUnd0gMsHhiy4ODxWfpk/gHWsHfAHTSaOB2G8Ycj8U1gJZC7VJlnODLkAh2PBVyD2rgIi2SEpA9DaZLFANxwTMouyVX77mzRD/EE70RKK/c6Fx4vBK3AheC8z/DbgaJH5uRKck6aDsRpSVOTc+7DjL319d/xcad/o36+eR1PEvYYW+KULt7QteopQ9myLGMNlX9R+Etgm4w/REppqWzKT9+L+uaUoM/oaxLrQ8yZwvvaG8ebN/GiimYxL1+sX/np8czCVviIfqKkBiI73ZPeCTW1cKrIQgJi90BXlw6Z1zJfhOb3yhjOaqElobkZY07DMNLao+rdqee0/PUIi/TRrqO1q5xDzpPJW0kO3L4csjSH15wXWuSJjT1PYFhyY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0701MB1864;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1864;4:1RwKoZ2/CP+m5F63FI/xbl6M+WkrKRG4lA4nLeCK?= =?us-ascii?Q?4zs6thJ/OZVQGv0JyxmIdtYzKMazzRW2ZJLu+0lPyGOWj+t8fXUYKF9IobKf?= =?us-ascii?Q?KsjvUeCMmA6kaXs2rB2c6erI9NUMaUQUhSdJ0++gO4ug4Ka3xuNqoGYn0nbf?= =?us-ascii?Q?0G0Mjo1bpvt3IFmbANfOYjo/FJLHiBDmJekucsmuJzEUzUMStQ6adKHnoMtW?= =?us-ascii?Q?z/3P2TzEHkHbVsVWq+y7dvJT7NcKTF833ThhiFKU1SXfTVlJSmUCg60uPfwb?= =?us-ascii?Q?juoBRqsFv1piVeMh5hZcOoOU65YKYKunRD0hjwEDj0RbkWqrTDdHMwgjJlNw?= =?us-ascii?Q?AmGd7HqWmfb03gMY0FIMox5EW7gsbfXE9zdK551OcHiQfF3b4UJDOlBuF9vd?= =?us-ascii?Q?hYDggJty4c9eDioNJ3ijEMc4589RQHi3v4H66D7gTDDIjFAtpTpKXX6OF33R?= =?us-ascii?Q?hJcB+YZTTJzUVYZavQxFCp/Hej7yUSwxbsoscjcf9Ege/e/jl9acMxHr/1uJ?= =?us-ascii?Q?TBe2dP2QQfj5thyhMVkx9dQyHSqk99VbEA6n4yhoXwm+EwIpm7AdZnuEA8HN?= =?us-ascii?Q?HF++P4zH7GRUlw2tUDObR+AA8QAzOEYdvG4Qv/QIGNMAs1pTkN8UCFrR+a19?= =?us-ascii?Q?2i0CmaFHMb3HB5+4cUc4C0Hny/0mSmwW7E2r+GSFD9rq8O+3fpB6EkOxXM87?= =?us-ascii?Q?T6LVZXdSVSNiSj/UjzPJP3RqavbHCTPwREkxp25SicfFt1kvTjMsRTTXibn+?= =?us-ascii?Q?M/cUOqqbmEn81mntO/qHzSBjT6BVeMHeZ/f5/zpM5i/BeJiAXCYnjvO/+kfq?= =?us-ascii?Q?WPXx+Myn1gNzBbyaWNy0Cv4dTCECgKj0OEbR+y4F2yTmZu9W5QFNHUDQvqim?= =?us-ascii?Q?py229lLzmIE/RPMPC9/HfOQScaJ9WSksUVBOgrpxZ4qtmN3uQop7/GGYPss8?= =?us-ascii?Q?fM1jQIlaM8ye6TZbSjh09wahNCX5L83fMiUH046xEAoVbMPpJTsglUWMc4Ma?= =?us-ascii?Q?Ku+ySfRF+p6EXPVnuUrkqeQEJBJTS/CU7fnO+6CztqPcdI6pnawcigrkLajU?= =?us-ascii?Q?juRz1IJ5MCAh3Cw436hNJciBGDNz2hbpng3V78bChZ4xyUKvWGDTAIZn2YbU?= =?us-ascii?Q?UyVQX/fYlj8=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(50226002)(33646002)(7416002)(7406005)(6666003)(5003940100001)(76176999)(305945005)(42882006)(2950100002)(6486002)(8676002)(50986999)(42186005)(7736002)(76506005)(50466002)(5660300001)(81166006)(48376002)(25786009)(54906002)(478600001)(189998001)(66066001)(1076002)(47776003)(72206003)(3846002)(6116002)(36756003)(38730400002)(53936002)(2906002)(6496005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1864;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1864;23:LmJq/quJEDK7W+fMWFxmSl4kcgns7AP16y3G2rK?= =?us-ascii?Q?qJnsBF3V0I7Cuan6ntu5iIqMGpW++tccVdg6dhOPj3VgO9+TtzCFEin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RVGT5xknQVxCVHO7fopJ+TQkdQ+67UtVYG+Tw1v?= =?us-ascii?Q?KVs+zg8Jh4U0g9FlvSvSNzDCGE2N5fqPUNHuR8czsT/WWnqayfBLZZV20FAX?= =?us-ascii?Q?QA/sBTkECF0S8O2BDP1MZoQG96WeZPLzu3uMKfMMZxA4/UiLEiA=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1864;6:K1ERyon4Ifbb5tWOsULmUoIG+nzrDRJQn4SFXXUT?= =?us-ascii?Q?6TreaoTsrwoJE5o5pw7kxMAWhJSH9Tx/mXEhMeQVyJ9EEDiD83veu2b4AeKB?= =?us-ascii?Q?eMNW0gYxUxn6mLeKbxdr4UjT9Ijh87MLQo39adLDkCOlnt5QP3aPeToAyG4H?= =?us-ascii?Q?wehRX9q86l04o/SSlfmHFdacOQn9x73e4JHCdt262SAi7rSnyqnq97SGj2LS?= =?us-ascii?Q?z3Dw24P2g38wxcUxOrm684UDCA1pXFmcLlT5GvoRExXnqYXvWXYJ/i72Gq9e?= =?us-ascii?Q?Rviy6beWyD1sTdtopzdat/3RBKlSDGnVNt14Is2Jp1XndsTbWWROOSspE2zP?= =?us-ascii?Q?RXEtI7oCNmyYuLqKHNYplm3DhmH7ScXqvEE3go3a9OIF0sthDSjlxXw8mvAH?= =?us-ascii?Q?A7cTPKYO+Tnl08mB+HC2MMfVIPZbKCHXL91h1nkeE7odcCfLo/inxcCNcDNX?= =?us-ascii?Q?rosiZ1QWas+lKssYBaf90ZnI86xbomok+l1bGVJTOq4HQlDYHHjK7HY9ZEp2?= =?us-ascii?Q?yeU28Ko6S6PC+lRwSylgYJHki/55R/iwZK+DnAXxkNaUGiYBWEGtQHreOor8?= =?us-ascii?Q?A52oYHnTEO1DUDLIlXk3JnGXM2pR1NnINu5q1d8ircwkryFj8hLb1mV3uDQn?= =?us-ascii?Q?HNhIm54GLUgOZZ3SXAnnxDaBClqFKXBZFg4QFu0LgwTnH4Kd32QVM9vu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ticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1864;7:ksDopNMhGrZnefh2w7TCzc46uQg9uXqFTnH4nHknZsGq/nN9712CSFeDGR89U2XuwaNc4yYo5bOvSWiuN/4Neu+KQxdcWpMexXPyRevysFvgmxnJ10fd8CreOcA+/TEiTjQzGnmHBJEmb2g0XGXRZguN8c5trusAjreqD66ROTpgDYYX7Gmo5hYyrn3dI4c9KRPOxCb/wFbtmsUOIw0Qzy7qV61MYVPEQboKRHjE4583i1Fhm1oOpYDQyVnCCEG6JrH8RAFxlmAeqceql2qE5IvcO95azSYT4Cy+iAfUsFaLgFpYfXfoI/qyC14OX+sFjL5nGI0q2MlnNNqBHmi8ofQC9p4Lee2gH5QSHLx57Vi5MF81rcUU/qJLjFjR9tj0YmNYx35VTTiaA+mM1evS0f2J9QBDYTAa/7tqJX10hAf8sQzHwUgyOMtglmHYQcycRIMG8p16nN0619TvanmXBtnyQ6Yvu0znGLmFYF5ffY2z1WYrL+6ir7StFj1RlGsn7L1neApeDoUX5sfhAzDy+EyZ2atlih/Ue/icngpJtDY+CH2nlmbQ9BsfWZrOAsI4GzAmn2Bk2lgl+uTVEPwAFPdAFgQPdAOB+AuQg+Cbq1L8/5/G0S3yCfhDexZNNFmAuXmNdNysvMdyIIdpJXl5mHeUbf4dGAC/G4m1GE+XeB4aBtuayC7Ogoh6GOdAjsvvQ5Ihsj6iIckiUZrw+VVln7nCpMHnNfyMCsB7YsDJdsOHjmpl/XrbWTammNf7o89OGux/UtpefW69izXVXB+/llqcBYW99WGkSGLAOzPdcl4= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:51:07.7318 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1864 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2035 Lines: 61 Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov --- 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