From nobody Wed Oct 25 18:33:27 2023 X-Original-To: dev-commits-src-branches@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 4SFyHC2Zvdz4xsgl; Wed, 25 Oct 2023 18:33:27 +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 4SFyHC1zDxz3M9T; Wed, 25 Oct 2023 18:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698258807; 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=qgKhXXJxSVRzFOLyZ7LjFti+SJUUaCsVfAvmeF9JzxU=; b=QZ2NZg/+ZuEL+db2kDLTCxi8tzyhVeESg74DJBREyKK/3Ay/dnc7LosxYU0AURO6e0j6+B Bfu2t4zi/hKQvQBfuooxn7fzcQJTz58qpbAiREQv3Avh0o3Mff/TvfGdfUbFy4mOZ0FZIl Ub3lPSBzC6gx/jlDJAhnZSsfjWoVo0axIUC9BPM4RpDYz2oYjQZZyefHxK+IMYgHWA465W oL0CMk1IPyR9A/E7q4HYYeUxzZCOC5ssgMDqw86vtvUiE1OvtwMiovanv29607mZz8g/qK BiUXuRvyDxQFn5NTmsg+blQYUGHijtv9oLYtUBwD2VmAbcldSlo024cvivWduw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698258807; a=rsa-sha256; cv=none; b=LvOMWWTu2WkXVEMmOt+Qrlw4YJDrYcx1q5daXViG+hpay3TMKuL5SmAIr/dL43fCDX4LNZ jyNiv1rpTRSO0W24pC5+FAOBCRq1p48Mh+CcuGuMPZQmDOyIlIpU4hHY4FkiynF4QfEDWp ONhNGoy7tf91YDsC1lZxaEmM8Ab/2KF1ap6J6KkRmP5Gp85nVTv5bElNtZ5r/LgnQ45qyO 4esXMJ0jW1BuzYAGSJuTAccutaHQMqpY++0w80RL5D3o3n5bvPjrd1KRiCjG35owCarcrH Nh/iGiEoOMUCYSCKVloOFzhIalJvK4ULkG1zJnedVCbJsy2+uHT2X05KBRqjlg== 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=1698258807; 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=qgKhXXJxSVRzFOLyZ7LjFti+SJUUaCsVfAvmeF9JzxU=; b=wnn2+Kc1wBk/oWLwOGrHEnYaiprcdQadeZEPkc1b7mM4JO4cy/YRBFze+TWrvyfkjSYR6Y qfxZly88LU+ct2OG6h4L6SwpLvwtzywa2tq7AHnAuyuxb+e4M4uP++AF8S9uM9ssywyeq3 28Avld0o6/npgdELMb01ShZNOTbaCIFUTMyATEjkAV8DxorTOuOB4RmSUStTYNIcQcHg33 q/TbCVLFXkoNkuDhh+c90dcVCaezR8hrGFfNIBLxAdC9QXWm7q7OUIZ0NMXSHfScJ48OZC nFAYRMTFpk7T+2tMUbQ5U3oWyXV0050CJigc+jj1nQ/mqs6zO3AJL4U32Ar+eQ== 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 4SFyHC145vz1FJg; Wed, 25 Oct 2023 18:33:27 +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 39PIXREL089147; Wed, 25 Oct 2023 18:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39PIXR9r089144; Wed, 25 Oct 2023 18:33:27 GMT (envelope-from git) Date: Wed, 25 Oct 2023 18:33:27 GMT Message-Id: <202310251833.39PIXR9r089144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: b91858a32a31 - stable/14 - ossl: Update arm_arch.h from OpenSSL 1.1.1 to 3.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b91858a32a3155ab36d3de54616ef81d47115a6a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b91858a32a3155ab36d3de54616ef81d47115a6a commit b91858a32a3155ab36d3de54616ef81d47115a6a Author: Andrew Turner AuthorDate: 2023-09-22 15:11:27 +0000 Commit: Ed Maste CommitDate: 2023-10-25 18:32:55 +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 (cherry picked from commit 2f198d313b4894c1fc3649aa1e5ccfba2b6a2ef5) --- 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