From nobody Sat Nov 23 00:33:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1712342715; cv=none; d=zohomail.com; s=zohoarc; b=GLa+9+TiSsUgWTgJprTs5wtMQSR45IVQZdLBq/OKqYuQTWFmsTcq+NU5UbDTnDnlmKWkrZs0+C+Ck2sRcRoHIxzko00DAJ+1S94QRi+TOYzatEF7gXXpJTeJ6lRu5tmh5bhd4AxnXwgWR0LEYYyy8NAsCcYxe9Swx9n2S29iAi8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712342715; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=44W1XCLdiwEHsLi3qlogMsHp4U4Qce+YDja8IxrMi78=; b=A2dZ3UNHWAyzlzIfMwVA+jdM3nVDOG/5UbvkagnutVhsl9608u/lfck39eXWeArRNvSF548LtidhU++SaFnc4MNx2JPqjizkJFWsTmfLsFLRSTFT72JGgqkP4aPI14O7dXpZ7H0kVmd8snU7X6CzeOTxmiAC9n5bZ4WEIlmOkUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1712342715658659.5282615916643; Fri, 5 Apr 2024 11:45:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.701369.1095780 (Exim 4.92) (envelope-from ) id 1rsoYa-0003Gg-57; Fri, 05 Apr 2024 18:44:56 +0000 Received: by outflank-mailman (output) from mailman id 701369.1095780; Fri, 05 Apr 2024 18:44:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rsoYa-0003GZ-0i; Fri, 05 Apr 2024 18:44:56 +0000 Received: by outflank-mailman (input) for mailman id 701369; Fri, 05 Apr 2024 18:44:55 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rsoYZ-0003GT-FZ for xen-devel@lists.xenproject.org; Fri, 05 Apr 2024 18:44:55 +0000 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 96a7e152-f37c-11ee-afe6-a90da7624cb6; Fri, 05 Apr 2024 20:44:54 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9E644CE2578; Fri, 5 Apr 2024 18:44:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9428CC433C7; Fri, 5 Apr 2024 18:44:47 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 96a7e152-f37c-11ee-afe6-a90da7624cb6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712342688; bh=UHAOITdinMVWq70npyFzk0FScg54RY1dB3DNx+drG5s=; h=Date:From:To:cc:Subject:From; b=GfrCsifWsaqf0ezpSvbqwWmmkyISOvUc2e2cTov9mQM4PNtaSBHWLeti2Eb7pm/6P 6g2p7FtULHXmslDH/haRTrrtX+HCw/1uDogAKdKiUwNFx0c80HGzFJKXtxagsFHpnQ M16Mj2nWzcMgtuho8NUNQzNMvBxG+H0Q6xXIYSJ/bCT5IHO1Wdes+tb7Bjmidu6cij YScpP7Rf36A7wEihuOi3mfZ75zz7B4+s0uzAr9giDGXoWknPJMzGfFSxgAMOWX9HBn 0yg4RShRUJJlz7FH2dKU+kYJ/wPzaJv7CcSsmiejZUu4aC/Qyi2x/LezvKdDC4Df20 9dVTZATJXqXUQ== Date: Fri, 5 Apr 2024 11:44:46 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, andrew.cooper3@citrix.com, bertrand.marquis@arm.com, george.dunlap@citrix.com, jbeulich@suse.com, julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com Subject: [PATCH v4] docs/misra: document the expected sizes of integer types Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1712342716736100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Xen makes assumptions about the size of integer types on the various architectures. Document these assumptions. Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- Changes in v4: - list the architectures explicitly - add ARMv7-A --- docs/misra/C-language-toolchain.rst | 73 +++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/docs/misra/C-language-toolchain.rst b/docs/misra/C-language-to= olchain.rst index b7c2000992..5ddfe7bdbe 100644 --- a/docs/misra/C-language-toolchain.rst +++ b/docs/misra/C-language-toolchain.rst @@ -480,4 +480,77 @@ The table columns are as follows: - See Section "4.13 Preprocessing Directives" of GCC_MANUAL and Secti= on "11.1 Implementation-defined behavior" of CPP_MANUAL. =20 =20 +Sizes of Integer types +______________________ + +Xen expects System V ABI on x86_64: + https://gitlab.com/x86-psABIs/x86-64-ABI + +Xen expects AAPCS32 on ARMv8-A AArch32 and ARMv7-A: + https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst + +Xen expects AAPCS64 LP64 on ARMv8-A AArch64: + https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst + +A summary table of data types, sizes and alignment is below: + +.. list-table:: + :widths: 10 10 10 45 + :header-rows: 1 + + * - Type + - Size + - Alignment + - Architectures + + * - char=20 + - 8 bits + - 8 bits + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64, + ARMv8-A AArch64, RV64, PPC64 + + * - short + - 16 bits + - 16 bits + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64, + ARMv8-A AArch64, RV64, PPC64 + + * - int + - 32 bits + - 32 bits + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64, + ARMv8-A AArch64, RV64, PPC64 + + * - long + - 32 bits + - 32 bits=20 + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A + + * - long + - 64 bits + - 64 bits=20 + - x86_64, ARMv8-A AArch64, RV64, PPC64 + + * - long long + - 64-bit + - 32-bit + - x86_32 + + * - long long + - 64-bit + - 64-bit + - x86_64, ARMv8-A AArch64, RV64, PPC64, ARMv8-A AArch32, ARMv8-R + AArch32, ARMv7-A + + * - pointer + - 32-bit + - 32-bit + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A + + * - pointer + - 64-bit + - 64-bit + - x86_64, ARMv8-A AArch64, RV64, PPC64 + + END OF DOCUMENT. --=20 2.25.1