From nobody Fri Nov 10 16:06:06 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 4SRkFp32LVz4ywf7; Fri, 10 Nov 2023 16:06:06 +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 4SRkFp2bfhz3N7W; Fri, 10 Nov 2023 16:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699632366; 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=xruBsDHG/untGN25mL3fAkm/jUPT2tOIC4yi2RGwRW0=; b=DtOKPocG4xY/s3toqOUYWC8/Sdm4x09jv5S7imhVvrEVDCsWTGvGBwEKBNtRR3y6Ie1jCV miemlFYAEj8l2ZMlxrln23dzy5K7miPzlBYZ85lz9Wj6Qv4uYOvbDqsohtoDT1TJnWOcHj yaS/H2/FA/nN2Evmsn17gm1vCWcizl2yD37naxxfVsN2PKNQEgPx1aDckuQbZi9qyuuKgf uDgAdpPdPYdiDwQuSTwiGc4m+cvmud6nhshxNbiQMSOSXBkwCjN3xkxzp/BCjk65y+7BFe 31wZDCBg0gzR8u2P9jsnq5WBKacZ/2TUCFE3D+YMh8m+fiT86fWb2q3hU7k6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699632366; 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=xruBsDHG/untGN25mL3fAkm/jUPT2tOIC4yi2RGwRW0=; b=ZCvHPTR5vbyPuAuEc2pD59Htk3McA4KldVHB5BRDhBJqTAJy06CvUX4P5zmMcJkIrKDZh5 dc4fPftabpvQWQN30FRGEqHHIpMrI4TuuKvyWOqAr/XfSNNcxrpuPRFeBDbcA41IuiOmEu 0wZtvuqt2+DwYKAebtIeWb6Zbc+sx1mzUt58sgD8tB3OhKXwWY5ekUHlxN1gakMSvgBF44 dMqBoSutKrkSJEb6v700q8TTz3ycUibmYmcz18cVbp2pya+/2DgyK75KA9nwdJHTTCFRlN 4C6qJONCQxdzPO43gGjGMavvNla8kLDw7V4HXzs6Wu3Lb5U3b5qQ7/eRgyWR9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699632366; a=rsa-sha256; cv=none; b=aBNx6w7eZbQi+Yk3ojvQ1ai0Etc/fGrRHGhQZfj4PNN2AxtDgKLCo4LYbQ3LaFCoPbf60U iz/zz0Iarllk794TFYfZhqt11V/u0EyVyVH2umS0Mt4KaO58STWcoSU0wR63WoPylmDjNX GJYH4JQPOw5VcPpot+32AEozoGOpfSLOp7S65QYdeVnnvj8hJby5vq2wLyr+NYyOZ0Thn5 VDGSqjRILNF6XikQKtn1tUumb45h9hKTZ8LPaEbl1AFkFZav1X6dj+P6J6+yTqHi1L3ZjT fQASSOFpZT/DpwyBTgCFa1APujHfNjpUHeQD3FYq9iBXqA2l6bUhEY6iOZZiNA== 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 4SRkFp1fkWz14Vj; Fri, 10 Nov 2023 16:06:06 +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 3AAG66w4018089; Fri, 10 Nov 2023 16:06:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AAG66rL018086; Fri, 10 Nov 2023 16:06:06 GMT (envelope-from git) Date: Fri, 10 Nov 2023 16:06:06 GMT Message-Id: <202311101606.3AAG66rL018086@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: c2dc043c9757 - main - arm64: Add an is64bit flag to user readable ID regs 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: c2dc043c9757aad77bb1745e3b14dfa6b27e3fa4 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c2dc043c9757aad77bb1745e3b14dfa6b27e3fa4 commit c2dc043c9757aad77bb1745e3b14dfa6b27e3fa4 Author: Andrew Turner AuthorDate: 2023-10-25 10:47:30 +0000 Commit: Andrew Turner CommitDate: 2023-11-10 16:01:13 +0000 arm64: Add an is64bit flag to user readable ID regs To tell if a register is for 32 or 64 bit userspace add a flag to the user reg struct. This will be used later to rework how the hwcaps are generated. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42370 --- sys/arm64/arm64/identcpu.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 0dc23286ec9d..994dc4602b9c 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1827,50 +1827,52 @@ struct mrs_user_reg { u_int reg; u_int CRm; u_int Op2; + bool is64bit; size_t offset; const struct mrs_field *fields; }; -#define USER_REG(name, field_name) \ +#define USER_REG(name, field_name, _is64bit) \ { \ .reg = name, \ .CRm = name##_CRm, \ .Op2 = name##_op2, \ .offset = __offsetof(struct cpu_desc, field_name), \ .fields = field_name##_fields, \ + .is64bit = _is64bit, \ } static const struct mrs_user_reg user_regs[] = { - USER_REG(ID_AA64AFR0_EL1, id_aa64afr0), - USER_REG(ID_AA64AFR1_EL1, id_aa64afr1), + USER_REG(ID_AA64AFR0_EL1, id_aa64afr0, true), + USER_REG(ID_AA64AFR1_EL1, id_aa64afr1, true), - USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0), - USER_REG(ID_AA64DFR1_EL1, id_aa64dfr1), + USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0, true), + USER_REG(ID_AA64DFR1_EL1, id_aa64dfr1, true), - USER_REG(ID_AA64ISAR0_EL1, id_aa64isar0), - USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1), - USER_REG(ID_AA64ISAR2_EL1, id_aa64isar2), + USER_REG(ID_AA64ISAR0_EL1, id_aa64isar0, true), + USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1, true), + USER_REG(ID_AA64ISAR2_EL1, id_aa64isar2, true), - USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), - USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1), - USER_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2), + USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0, true), + USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1, true), + USER_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2, true), #ifdef NOTYET - USER_REG(ID_AA64MMFR3_EL1, id_aa64mmfr3), - USER_REG(ID_AA64MMFR4_EL1, id_aa64mmfr4), + USER_REG(ID_AA64MMFR3_EL1, id_aa64mmfr3, true), + USER_REG(ID_AA64MMFR4_EL1, id_aa64mmfr4, true), #endif - USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), - USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1), + USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0, true), + USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1, true), #ifdef NOTYET - USER_REG(ID_AA64PFR2_EL1, id_aa64pfr2), + USER_REG(ID_AA64PFR2_EL1, id_aa64pfr2, true), #endif - USER_REG(ID_AA64ZFR0_EL1, id_aa64zfr0), + USER_REG(ID_AA64ZFR0_EL1, id_aa64zfr0, true), #ifdef COMPAT_FREEBSD32 - USER_REG(ID_ISAR5_EL1, id_isar5), + USER_REG(ID_ISAR5_EL1, id_isar5, false), - USER_REG(MVFR0_EL1, mvfr0), - USER_REG(MVFR1_EL1, mvfr1), + USER_REG(MVFR0_EL1, mvfr0, false), + USER_REG(MVFR1_EL1, mvfr1, false), #endif /* COMPAT_FREEBSD32 */ };