From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4E055740037 for ; Tue, 7 Nov 2023 02:38:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bLAG214KbVUGodKykESXLbb4D8hcKcm5W9TPnHAvaso=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1699324725; v=1; b=YJgGTmvMWLs/GGesjDbDnluvwtsLdwMAxtOec7YVoseCY//bznuHQ8tmMpxRXU1Xnf6jXvES TvZl7ZPm3W98y9dkbGoT21+CQjfQc67uIhz4bqraV0ju4S4+SK4n4gwp4ic4ZjUxDPbXn04XKYV ALEgL1iFVb6JxyOV/Pj3G0ro= X-Received: by 127.0.0.2 with SMTP id CP5MYY7687511xVPVShbtUTY; Mon, 06 Nov 2023 18:38:45 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.2219.1699324724379681026 for ; Mon, 06 Nov 2023 18:38:44 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="2338494" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="2338494" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 18:38:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="791660490" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="791660490" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Nov 2023 18:38:43 -0800 X-Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 6 Nov 2023 18:38:42 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 6 Nov 2023 18:38:42 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 6 Nov 2023 18:38:42 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i3bOxu5Or08mV5ISSL48hfiIXEPCOcp0VVkoz73XLanKd82WySkMzz+ZYFpAhrqxcU++L7OMOXzkbzj4OOQvhYsBaRGLm9+oVZx931aTqRGX+Ze4SfBGsBYRMmi6xSzyUIP3XnnQXHO8SgXdUH+VRMkElff2xBQGPtxgL/ThbvWpg/EWWrScFdhY5IhwZT6b+nhMYXvA6JFMHf5LFGezreR5adCIN9Hq9n4RjrySrd3M5G0Ot3Np02BUOXN4gpBLogIyYyVydcy/jafjt8vQl6q8iXOJqKHXe06t1aIKbUFfent90XmdKaGPqRo6qC22bpUq7yAk7ueLvTledoFRPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7qxCM6Kyw4SxHJFumCWKVY1ueLtD7lanpar6GnDGROU=; b=U2SOK/XMWeJnSjQJmyElL50pIflB7qjbUD2djTIBAhVRqlvwYpkjGJqDCpAtXQlAxmhxTfo7/PyhvPr5Hz+t2tSVqo1OMh4ov1MyBDKVrywIrgpo0SZek9QwAihDComHDJ4BgLKjRlIFwauKKGEsSnTP9LvN7AjIyHLALCWR/LhLCBNr+C3lWRioeFrQ04l0qMIMfryCkE3ss0PHCPn8WaxYopuDCI7ZxIglTRk0Pj1C6HBdSqAJS60aFU8T7Mqt+1sWIXuiFaSEAtffpCULYH+Q5BeAxaje7nqr6KZKEzMtYqSTaupMP6TWOz98jzYGbs2lOzXFMxKiN8B6bsGPEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from SJ1PR11MB6227.namprd11.prod.outlook.com (2603:10b6:a03:45a::10) by SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 02:38:40 +0000 X-Received: from SJ1PR11MB6227.namprd11.prod.outlook.com ([fe80::a667:b365:484a:af59]) by SJ1PR11MB6227.namprd11.prod.outlook.com ([fe80::a667:b365:484a:af59%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 02:38:40 +0000 From: "Li, Yi" To: Pierre Gondois , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Lu, Xiaoyu1" , "Jiang, Guomin" , "Leif Lindholm" , Ard Biesheuvel , Sami Mujawar , "Gerd Hoffmann" Subject: Re: [edk2-devel] [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction support for AARCH64 Thread-Topic: [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction support for AARCH64 Thread-Index: AQHaDZQjY0DmCAH7002BfEPR8CXz/rBuKzBg Date: Tue, 7 Nov 2023 02:38:40 +0000 Message-ID: References: <20231102135417.336334-1-pierre.gondois@arm.com> In-Reply-To: <20231102135417.336334-1-pierre.gondois@arm.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ1PR11MB6227:EE_|SJ1PR11MB6228:EE_ x-ms-office365-filtering-correlation-id: 5690a210-0322-4f63-ca3e-08dbdf3aa713 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: pa4IXnJM3nHPOFOy8laBSwi+fskOa506q4KAiUWMI1xcIxbOyWsmapMJfR4S38HFWdCN72poqO8Nr/nS7XH4LdglLhOdphEM4q324/G0+T9IzuXNcHZQZIKjXOehlccWFwDjr8vlXnvF/h8ydJo+ftcmpRMUKnkxJW/OAahumy5EqNdgNvGcEnjxVgM1+114cp5UDglSj7VdedfFkbKHOlS0+gGMwKoncfNyl7uD1qhecp3aDTf3F1JCE4lv3I/U7a8kgtp2UMYxkJZbHYu6KRes4QfalNX9O6p0q0TyAoT5XFJiWVrsGFlREfI0qV97bzxiW5Yi9o6quRS531fCZ9ZPEd6pFYlL1wietyDIQr+lBM6ADLz+pABIegJE/pe0kLzDWHMegHvRd1Gb7U4zseLUNxXj5QocWbURr7n8Op7iYpzFvgF++IufVNWuOH/wH6bH6lPQbwo8lMWnnQaGic/zhdWSSEXmljeW7aL1wetcnwZeUA6/Ma4pchzp9G93RQVxCMBtJ3uYQ7Ha0EHZw5Fptbbqv5LjxcaUjfmrj3s5du42SRr0tkJQfAqybT8jC78C+RE4u8ZkHK9QuC7HTzTO1fCyFsk6RfzjDk+clt4XnqIC4TAnoWj3ML1WjIOG x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uPK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C?= =?us-ascii?Q?gMXWzMnIvuOde1dyO7KlvPjZTa6BUWYg55r6/Qdx1iBcYDOU0JuX1fzfkMkM?= =?us-ascii?Q?jqspBwEYXQbj0SFGaIEdT0TwMwGyYbQ75iqpanKaFuR/7/P1Lc/8t6CSM26s?= =?us-ascii?Q?H0sAi/7x5RcEv/bOrYdX3DXsroXdhFAJLkLiRa8Yjb02ofB/MLGcvv4nI0pa?= =?us-ascii?Q?o0pM0O6CtEXDO/SbbrLHV5hj9w/2ls2QooHj5YREUCiEGoa6071JaAmj+l2c?= =?us-ascii?Q?2MIhbulbKSwl7vgEyVhmGrlz7A9OLfFpRWzxDKHEsWRFuELH/XXNavrFGD50?= =?us-ascii?Q?FaybzS5YAIF64QTjHfQovLVUXH/N5DGbdj4rL3sL5CtPdyFmFcJfReZAH805?= =?us-ascii?Q?3ctE9cGlhft3XZdy2xAumBCbdQ5CGQh9yBb6vtnf0DeNsaDa/S5hx/mOhqlG?= =?us-ascii?Q?3CbPsswAZ4Mf7HSWvylX2zVEezO7dfTBvQPHmPAnvjQxNO+jQ4fNpsm8rHby?= =?us-ascii?Q?IvLIUwqmLjsKztw0E5fOuK6E+7cH85zGbukbVnluP9OMjRo1t4BBL1qn7HTi?= =?us-ascii?Q?zkpaEfJnNl7OVgle3FZdQ6FE/5DPP1VNh9N9/aEdGRlvV3OAIH/OLmHU8qWb?= =?us-ascii?Q?NKA0sIHuUz5VSGDEK3IIwUA8JYnfGVkcMvl/c6ABz7aYi0WaRIGC/ZmzRUqf?= =?us-ascii?Q?YCyUYMKcsRfkIMPl3TE=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ1PR11MB6227.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5690a210-0322-4f63-ca3e-08dbdf3aa713 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2023 02:38:40.6768 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GSbXK7I5kR77bAscr7mkwchphc5/IKhyUMx/Y3YXpnkRy8X27yzEl0Cw95If05EYWyvjF5W+/l+25vRNEy48PQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: KA7kTh7Abm2kRQuek4KQj67cx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=YJgGTmvM; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Hi Pierre, Could you share what tests you did and the test results? Regards, Yi -----Original Message----- From: Pierre Gondois =20 Sent: Thursday, November 2, 2023 9:54 PM To: devel@edk2.groups.io Cc: Yao, Jiewen ; Li, Yi1 ; Lu, Xia= oyu1 ; Jiang, Guomin ; Leif L= indholm ; Ard Biesheuvel ; Sami Mujawar ; Gerd Hoffmann Subject: [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction suppor= t for AARCH64 Various OpensslLib implementations are available in edk2. The OpensslLibAcc= el.inf and OpensslLibFullAccel.inf ones use architecture specific instructi= ons, e.g. AESE, PMULL, SHA256H, ..., allowing to improve speed. Enable support for Aarch64's native instructions: - Add ArmReadCntPctReg() and ArmReadIdAA64Isar0Reg() to Aarch64's BaseLib. - Generate Aarch64's specific Openssl functions. - Add a OpensslStub/AArch64Cap.c file to allow Openssl to probe Aarch64 native instruction support. This patch-set only enable support for GCC for now (MSFT support not added)= . Pierre Gondois (7): MdePkg/BaseLib: AARCH64: Add ArmReadCntPctReg() MdePkg/BaseLib: AARCH64: Add ArmReadIdAA64Isar0Reg() MdePkg/BaseRngLib: Prefer ArmReadIdAA64Isar0Reg() over ArmReadIdIsar0() CryptoPkg/OpensslLib: Add native instruction support for AARCH64 CryptoPkg/OpensslLib: Generate files for AARCH64 native support CryptoPkg/OpensslLib: Add AArch64Cap for arch specific hooks CryptoPkg: Enable Openssl Accel builds for AARCH64 CryptoPkg/CryptoPkg.dsc | 23 +- .../AARCH64-GCC/crypto/aes/aesv8-armx.S | 3180 ++++++++ .../AARCH64-GCC/crypto/aes/vpaes-armv8.S | 1196 +++ .../AARCH64-GCC/crypto/arm64cpuid.S | 129 + .../AARCH64-GCC/crypto/bn/armv8-mont.S | 2124 ++++++ .../crypto/ec/ecp_nistz256-armv8.S | 4242 +++++++++++ .../crypto/modes/aes-gcm-armv8_64.S | 6389 +++++++++++++++++ .../AARCH64-GCC/crypto/modes/ghashv8-armx.S | 552 ++ .../AARCH64-GCC/crypto/sha/keccak1600-armv8.S | 1009 +++ .../AARCH64-GCC/crypto/sha/sha1-armv8.S | 1211 ++++ .../AARCH64-GCC/crypto/sha/sha256-armv8.S | 2051 ++++++ .../AARCH64-GCC/crypto/sha/sha512-armv8.S | 1606 +++++ .../Library/OpensslLib/OpensslLibAccel.inf | 642 +- .../OpensslLib/OpensslLibFullAccel.inf | 691 +- .../OpensslLib/OpensslStub/AArch64Cap.c | 107 + CryptoPkg/Library/OpensslLib/UefiAsm.conf | 6 + CryptoPkg/Library/OpensslLib/configure.py | 5 +- CryptoPkg/Readme.md | 14 +- MdePkg/Include/Library/BaseLib.h | 86 + .../BaseLib/AArch64/ArmReadCntPctReg.S | 30 + .../BaseLib/AArch64/ArmReadCntPctReg.asm | 30 + .../AArch64/ArmReadIdAA64Isar0Reg.S} | 10 +- .../AArch64/ArmReadIdAA64Isar0Reg.asm} | 10 +- MdePkg/Library/BaseLib/BaseLib.inf | 6 +- MdePkg/Library/BaseRngLib/AArch64/ArmRng.h | 12 - MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 14 +- MdePkg/Library/BaseRngLib/BaseRngLib.inf | 2 - 27 files changed, 25320 insertions(+), 57 deletions(-) create mode 100644= CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/aes/aesv8-armx.= S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/aes/vpaes-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/arm64cpuid.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/bn/armv8-mont.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/ec/ecp_nistz256-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/modes/aes-gcm-armv8_64.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/modes/ghashv8-armx.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/sha/keccak1600-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/sha/sha1-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/sha/sha256-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/cry= pto/sha/sha512-armv8.S create mode 100644 CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadCntPctReg.S create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadCntPctReg.asm rename MdePkg/Library/{BaseRngLib/AArch64/ArmReadIdIsar0.S =3D> BaseLib/AA= rch64/ArmReadIdAA64Isar0Reg.S} (70%) rename MdePkg/Library/{BaseRngLib/AAr= ch64/ArmReadIdIsar0.asm =3D> BaseLib/AArch64/ArmReadIdAA64Isar0Reg.asm} (72= %) -- 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110785): https://edk2.groups.io/g/devel/message/110785 Mute This Topic: https://groups.io/mt/102342394/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-