From nobody Fri Sep 22 17:16:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rsf830cwRz4v8WG; Fri, 22 Sep 2023 17:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rsf8309yhz4Qtq; Fri, 22 Sep 2023 17:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sf5mpVTzBnTXZt1vpeBlJtOERoRqEtjHm9nkLZ60UM=; b=EgceCHpM3uUPd/xFxT9awPfTGoZsrI2AMK5RQBMr7qStO6PjBgjsFB9GjKI2Q7hqYJp/y0 +sVqUxPqRh0c/ysZZzXRRgn3tQoXoeJECVnAzpokgysDhw7RzAqFgdsLEP+5ZHDGmoG8XW bmBYgRcuJ6EH9lDxZSaggbBBll/97wxbykskwH/h8kQt5vxD5inT/itNKeJZHh3Zw4gKgT o4Ifv5J9IliOnTIWxdQCMTV4T8z1Wo+lb8RtGfRy9VqfUT0c8DKPCnYijWGlvrMwrEmVc7 qxwXn5/bSERv/z8xTCAJYt4uKVm17tJYSkWWMZhiFGuBanzqghf95VUgzSdUlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403011; a=rsa-sha256; cv=none; b=tHQf6JGv4suoaWY/EeoGdolchieUHd14YU7lNG7Ib2VCkUMIg2ZWz62L3HdW0Yff7yCTKV 9j7fwT8DOzCoeL9MZN00pjT8kWVJFs4uc54rbSCLERyPwN456ISo/Rd7i0pDRbb/CLFa3+ vfRaLs7GEKpHvLqj6NApczF0rD5e8zZNfTkk86TDGkfhgGWpJXHZT6fcoY+tl5Putseexg HAp6icFey0RSVNcLenkc/H5YvUt3s6uTvRDP/xmyeu8qFGWF/1T6xP6jHvXtc3fmiEw/eV VLKcRt6jDptOZ1zVY4Wuin37GPDk75smzEKVAwmIit03OwexuRNRl/qzABKGPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sf5mpVTzBnTXZt1vpeBlJtOERoRqEtjHm9nkLZ60UM=; b=C/SmrhTE7Wb4BSFVZTxt6KOh3pn9SyRT/uYFRDkZCHUugXQls/HJOWjYOeyfyTs1YWhBXd RfVbb12I/cCFF7wVhAw34HVRIZ/pKEG4Dkp7CcNM4/VG+VK5ZaOTx7j6DuYihuWky+BlxR rKaNcmebICcpfao772fISNHH8FTtAqbiFZj6tkMEkJDs5cbcxMLO9RAgxKNMopn+6Zpymm cHm9H9ExpL4FmrgIsZ9oEFmV0rasiggdVlLWqFmqwgAuwDF8G1GY2mEPOuoG4CnfW+UihA 0zcBChkucgHdef1/2q6ly7H71lSlk1AfgUauyM09Mf5UPhh+3RmYlZUXIGCbQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rsf8261q8zWP9; Fri, 22 Sep 2023 17:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38MHGoHj081101; Fri, 22 Sep 2023 17:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHGoRt081098; Fri, 22 Sep 2023 17:16:50 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:16:50 GMT Message-Id: <202309221716.38MHGoRt081098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2f198d313b48 - main - ossl: Update arm_arch.h from OpenSSL 1.1.1 to 3.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f198d313b4894c1fc3649aa1e5ccfba2b6a2ef5 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2f198d313b4894c1fc3649aa1e5ccfba2b6a2ef5 commit 2f198d313b4894c1fc3649aa1e5ccfba2b6a2ef5 Author: Andrew Turner AuthorDate: 2023-09-22 15:11:27 +0000 Commit: Andrew Turner CommitDate: 2023-09-22 17:15:14 +0000 ossl: Update arm_arch.h from OpenSSL 1.1.1 to 3.0 Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41939 --- sys/crypto/openssl/aarch64/arm_arch.h | 49 +++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/sys/crypto/openssl/aarch64/arm_arch.h b/sys/crypto/openssl/aarch64/arm_arch.h index 8b7105571d78..45d7e1556475 100644 --- a/sys/crypto/openssl/aarch64/arm_arch.h +++ b/sys/crypto/openssl/aarch64/arm_arch.h @@ -1,7 +1,7 @@ /* - * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2022 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -71,6 +71,8 @@ # ifndef __ASSEMBLER__ extern unsigned int OPENSSL_armcap_P; +extern unsigned int OPENSSL_arm_midr; +extern unsigned int OPENSSL_armv8_rsa_neonized; # endif # define ARMV7_NEON (1<<0) @@ -80,5 +82,48 @@ extern unsigned int OPENSSL_armcap_P; # define ARMV8_SHA256 (1<<4) # define ARMV8_PMULL (1<<5) # define ARMV8_SHA512 (1<<6) +# define ARMV8_CPUID (1<<7) +/* + * MIDR_EL1 system register + * + * 63___ _ ___32_31___ _ ___24_23_____20_19_____16_15__ _ __4_3_______0 + * | | | | | | | + * |RES0 | Implementer | Variant | Arch | PartNum |Revision| + * |____ _ _____|_____ _ _____|_________|_______ _|____ _ ___|________| + * + */ + +# define ARM_CPU_IMP_ARM 0x41 + +# define ARM_CPU_PART_CORTEX_A72 0xD08 +# define ARM_CPU_PART_N1 0xD0C + +# define MIDR_PARTNUM_SHIFT 4 +# define MIDR_PARTNUM_MASK (0xfffU << MIDR_PARTNUM_SHIFT) +# define MIDR_PARTNUM(midr) \ + (((midr) & MIDR_PARTNUM_MASK) >> MIDR_PARTNUM_SHIFT) + +# define MIDR_IMPLEMENTER_SHIFT 24 +# define MIDR_IMPLEMENTER_MASK (0xffU << MIDR_IMPLEMENTER_SHIFT) +# define MIDR_IMPLEMENTER(midr) \ + (((midr) & MIDR_IMPLEMENTER_MASK) >> MIDR_IMPLEMENTER_SHIFT) + +# define MIDR_ARCHITECTURE_SHIFT 16 +# define MIDR_ARCHITECTURE_MASK (0xfU << MIDR_ARCHITECTURE_SHIFT) +# define MIDR_ARCHITECTURE(midr) \ + (((midr) & MIDR_ARCHITECTURE_MASK) >> MIDR_ARCHITECTURE_SHIFT) + +# define MIDR_CPU_MODEL_MASK \ + (MIDR_IMPLEMENTER_MASK | \ + MIDR_PARTNUM_MASK | \ + MIDR_ARCHITECTURE_MASK) + +# define MIDR_CPU_MODEL(imp, partnum) \ + (((imp) << MIDR_IMPLEMENTER_SHIFT) | \ + (0xfU << MIDR_ARCHITECTURE_SHIFT) | \ + ((partnum) << MIDR_PARTNUM_SHIFT)) + +# define MIDR_IS_CPU_MODEL(midr, imp, partnum) \ + (((midr) & MIDR_CPU_MODEL_MASK) == MIDR_CPU_MODEL(imp, partnum)) #endif