From nobody Mon Jul 15 12:38:19 2024 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 4WN1vc0WqZz5QrSP; Mon, 15 Jul 2024 12:38:20 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vb4w4Tz4HPj; Mon, 15 Jul 2024 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047099; 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=jKTok8AnG/8tAUzhVLSl0J8RKCVIohEWMOsvixxTLKk=; b=r88262k0vk2KWk4UFHphErAVPghgqR4trw6PKy3WIL/JsOp1/sE1uzqsyUA5jiRtS1rc4C EMMpe1n+gBdalmNI9uaHOxdqqu219beTXg2NOuGAX3Vvsbx+0d/G/W6NxVWRXv4AIGW1EZ 8WdzXA8bB5G84oZ88gurBwmlp4NNEhZBluKRMZfd/EV/VlW7Y3S6SW7KustfXmz4898lBv J15l7jg5x39cLAah77AqIY6rZDy0WD0Ez2tgJAQji0+InwtWr9ulcmOYWJXNktFrlPJQDn aRlDWFB0CX9V0sNb9ePe/5wcHlFQPm27qxy4EQKC2aB0hvW2NLWLgsLTy79wPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047099; a=rsa-sha256; cv=none; b=JebIMeedgZkd/85+d/ORv5c4SmmILaH+pi+YhAO4ooVOTtwlLIMr9X+Y6dHMMaxQ555wUx 4Ht/9A1MrV7wD9udTUYa0ADNGYeFXEAPHmdWar66DqTIjv4c7jUIiM2ZWi1Vpf3RuAwSvV pfacwTW8s3oTawbiqP/gzKgC+x/W2qpN3hVAy14SO8XDG+B2v78rFNWP0dJkq0gQCuWhCw MwMFrCBt3lFTO+iVbab1+PwUz4FMBYLmYZWjRX7BASywlhYCS9uQv4cvCTOgdYFMBYHZtu Q0irS6ByTE9IzfIO37bYN9rQ6ZrXU8YhI+0QjafMkBXje/dE8T5Kv8LbuJwf2A== 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=1721047099; 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=jKTok8AnG/8tAUzhVLSl0J8RKCVIohEWMOsvixxTLKk=; b=uID1Jw1R/2UlOkBX27wNK1jjqQK0CrY0fucKD98gtot0pi4jph36aY6pnGHJ5T7le0AzKW SknF8xTDckxvW5/fPB2yBuCw190aEmZz7nQ//I5wR2t6bEtSvydku0vbsGDVOX7b/8fqTV 3m19cXpahV1Jb3M9bmo11mtHC1Vdgc+kiH4tl0RqUJrLC+fbISjg1V0DXW/bfzqk+E31/I XixqAVb5tdVA3TlrnouKNjXFBQT6g06NTFnP6sDDjxLqrVI50w9e4SOmjRBYX3dlMx+LF3 lE6gshkDX39s3hX+1edEcgjNvTGWqP/sQ7dYfPwNpi6FbGilrrKIbiXrX9ZfKw== 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 4WN1vb4VZBzsZG; Mon, 15 Jul 2024 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCcJXZ060792; Mon, 15 Jul 2024 12:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcJXT060789; Mon, 15 Jul 2024 12:38:19 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:19 GMT Message-Id: <202407151238.46FCcJXT060789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 750fbcc0603f - stable/13 - arm64: make SPE regs use ALT_NAME macro 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 750fbcc0603fb9e7d9e4ee143e793674bf7649d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=750fbcc0603fb9e7d9e4ee143e793674bf7649d7 commit 750fbcc0603fb9e7d9e4ee143e793674bf7649d7 Author: Zachary Leaf AuthorDate: 2024-05-10 15:59:00 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:34:29 +0000 arm64: make SPE regs use ALT_NAME macro When the register is not defined in Armv8.0 i.e. added in a later extension, like SPE added in v8.2, the alternative name format of: S__C_C_ should be used; otherwise, calls to {READ,WRITE}_SPECIALREG() will fail. Use the MRS_REG_ALT_NAME() macro for SPE changing hex to decimal as required by the macro. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45171 (cherry picked from commit f7bdaa103eb8906fc999c7fd5e8d6af440e26e6c) --- sys/arm64/include/armreg.h | 132 ++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 60 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 92ad96550e56..1c9dfc1c19a7 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1639,11 +1639,12 @@ /* PMBIDR_EL1 */ #define PMBIDR_EL1 MRS_REG(PMBIDR_EL1) -#define PMBIDR_EL1_op0 0x3 -#define PMBIDR_EL1_op1 0x0 -#define PMBIDR_EL1_CRn 0x9 -#define PMBIDR_EL1_CRm 0xa -#define PMBIDR_EL1_op2 0x7 +#define PMBIDR_EL1_REG MRS_REG_ALT_NAME(PMBIDR_EL1) +#define PMBIDR_EL1_op0 3 +#define PMBIDR_EL1_op1 0 +#define PMBIDR_EL1_CRn 9 +#define PMBIDR_EL1_CRm 10 +#define PMBIDR_EL1_op2 7 #define PMBIDR_Align_SHIFT 0 #define PMBIDR_Align_MASK (UL(0xf) << PMBIDR_Align_SHIFT) #define PMBIDR_P_SHIFT 4 @@ -1653,11 +1654,12 @@ /* PMBLIMITR_EL1 */ #define PMBLIMITR_EL1 MRS_REG(PMBLIMITR_EL1) -#define PMBLIMITR_EL1_op0 0x3 -#define PMBLIMITR_EL1_op1 0x0 -#define PMBLIMITR_EL1_CRn 0x9 -#define PMBLIMITR_EL1_CRm 0xa -#define PMBLIMITR_EL1_op2 0x0 +#define PMBLIMITR_EL1_REG MRS_REG_ALT_NAME(PMBLIMITR_EL1) +#define PMBLIMITR_EL1_op0 3 +#define PMBLIMITR_EL1_op1 0 +#define PMBLIMITR_EL1_CRn 9 +#define PMBLIMITR_EL1_CRm 10 +#define PMBLIMITR_EL1_op2 0 #define PMBLIMITR_E_SHIFT 0 #define PMBLIMITR_E (UL(0x1) << PMBLIMITR_E_SHIFT) #define PMBLIMITR_FM_SHIFT 1 @@ -1670,22 +1672,24 @@ /* PMBPTR_EL1 */ #define PMBPTR_EL1 MRS_REG(PMBPTR_EL1) -#define PMBPTR_EL1_op0 0x3 -#define PMBPTR_EL1_op1 0x0 -#define PMBPTR_EL1_CRn 0x9 -#define PMBPTR_EL1_CRm 0xa -#define PMBPTR_EL1_op2 0x1 +#define PMBPTR_EL1_REG MRS_REG_ALT_NAME(PMBPTR_EL1) +#define PMBPTR_EL1_op0 3 +#define PMBPTR_EL1_op1 0 +#define PMBPTR_EL1_CRn 9 +#define PMBPTR_EL1_CRm 10 +#define PMBPTR_EL1_op2 1 #define PMBPTR_PTR_SHIFT 0 #define PMBPTR_PTR_MASK \ (UL(0xffffffffffffffff) << PMBPTR_PTR_SHIFT) /* PMBSR_EL1 */ #define PMBSR_EL1 MRS_REG(PMBSR_EL1) -#define PMBSR_EL1_op0 0x3 -#define PMBSR_EL1_op1 0x0 -#define PMBSR_EL1_CRn 0x9 -#define PMBSR_EL1_CRm 0xa -#define PMBSR_EL1_op2 0x3 +#define PMBSR_EL1_REG MRS_REG_ALT_NAME(PMBSR_EL1) +#define PMBSR_EL1_op0 3 +#define PMBSR_EL1_op1 0 +#define PMBSR_EL1_CRn 9 +#define PMBSR_EL1_CRm 10 +#define PMBSR_EL1_op2 3 #define PMBSR_MSS_SHIFT 0 #define PMBSR_MSS_MASK (UL(0xffff) << PMBSR_MSS_SHIFT) #define PMBSR_COLL_SHIFT 16 @@ -1851,11 +1855,12 @@ /* PMSCR_EL1 */ #define PMSCR_EL1 MRS_REG(PMSCR_EL1) -#define PMSCR_EL1_op0 0x3 -#define PMSCR_EL1_op1 0x0 -#define PMSCR_EL1_CRn 0x9 -#define PMSCR_EL1_CRm 0x9 -#define PMSCR_EL1_op2 0x0 +#define PMSCR_EL1_REG MRS_REG_ALT_NAME(PMSCR_EL1) +#define PMSCR_EL1_op0 3 +#define PMSCR_EL1_op1 0 +#define PMSCR_EL1_CRn 9 +#define PMSCR_EL1_CRm 9 +#define PMSCR_EL1_op2 0 #define PMSCR_E0SPE_SHIFT 0 #define PMSCR_E0SPE (UL(0x1) << PMSCR_E0SPE_SHIFT) #define PMSCR_E1SPE_SHIFT 1 @@ -1880,19 +1885,21 @@ /* PMSEVFR_EL1 */ #define PMSEVFR_EL1 MRS_REG(PMSEVFR_EL1) -#define PMSEVFR_EL1_op0 0x3 -#define PMSEVFR_EL1_op1 0x0 -#define PMSEVFR_EL1_CRn 0x9 -#define PMSEVFR_EL1_CRm 0x9 -#define PMSEVFR_EL1_op2 0x5 +#define PMSEVFR_EL1_REG MRS_REG_ALT_NAME(PMSEVFR_EL1) +#define PMSEVFR_EL1_op0 3 +#define PMSEVFR_EL1_op1 0 +#define PMSEVFR_EL1_CRn 9 +#define PMSEVFR_EL1_CRm 9 +#define PMSEVFR_EL1_op2 5 /* PMSFCR_EL1 */ #define PMSFCR_EL1 MRS_REG(PMSFCR_EL1) -#define PMSFCR_EL1_op0 0x3 -#define PMSFCR_EL1_op1 0x0 -#define PMSFCR_EL1_CRn 0x9 -#define PMSFCR_EL1_CRm 0x9 -#define PMSFCR_EL1_op2 0x4 +#define PMSFCR_EL1_REG MRS_REG_ALT_NAME(PMSFCR_EL1) +#define PMSFCR_EL1_op0 3 +#define PMSFCR_EL1_op1 0 +#define PMSFCR_EL1_CRn 9 +#define PMSFCR_EL1_CRm 9 +#define PMSFCR_EL1_op2 4 #define PMSFCR_FE_SHIFT 0 #define PMSFCR_FE (UL(0x1) << PMSFCR_FE_SHIFT) #define PMSFCR_FT_SHIFT 1 @@ -1910,11 +1917,12 @@ /* PMSICR_EL1 */ #define PMSICR_EL1 MRS_REG(PMSICR_EL1) -#define PMSICR_EL1_op0 0x3 -#define PMSICR_EL1_op1 0x0 -#define PMSICR_EL1_CRn 0x9 -#define PMSICR_EL1_CRm 0x9 -#define PMSICR_EL1_op2 0x2 +#define PMSICR_EL1_REG MRS_REG_ALT_NAME(PMSICR_EL1) +#define PMSICR_EL1_op0 3 +#define PMSICR_EL1_op1 0 +#define PMSICR_EL1_CRn 9 +#define PMSICR_EL1_CRm 9 +#define PMSICR_EL1_op2 2 #define PMSICR_COUNT_SHIFT 0 #define PMSICR_COUNT_MASK (UL(0xffffffff) << PMSICR_COUNT_SHIFT) #define PMSICR_ECOUNT_SHIFT 56 @@ -1922,11 +1930,12 @@ /* PMSIDR_EL1 */ #define PMSIDR_EL1 MRS_REG(PMSIDR_EL1) -#define PMSIDR_EL1_op0 0x3 -#define PMSIDR_EL1_op1 0x0 -#define PMSIDR_EL1_CRn 0x9 -#define PMSIDR_EL1_CRm 0x9 -#define PMSIDR_EL1_op2 0x7 +#define PMSIDR_EL1_REG MRS_REG_ALT_NAME(PMSIDR_EL1) +#define PMSIDR_EL1_op0 3 +#define PMSIDR_EL1_op1 0 +#define PMSIDR_EL1_CRn 9 +#define PMSIDR_EL1_CRm 9 +#define PMSIDR_EL1_op2 7 #define PMSIDR_FE_SHIFT 0 #define PMSIDR_FE (UL(0x1) << PMSIDR_FE_SHIFT) #define PMSIDR_FT_SHIFT 1 @@ -1954,11 +1963,12 @@ /* PMSIRR_EL1 */ #define PMSIRR_EL1 MRS_REG(PMSIRR_EL1) -#define PMSIRR_EL1_op0 0x3 -#define PMSIRR_EL1_op1 0x0 -#define PMSIRR_EL1_CRn 0x9 -#define PMSIRR_EL1_CRm 0x9 -#define PMSIRR_EL1_op2 0x3 +#define PMSIRR_EL1_REG MRS_REG_ALT_NAME(PMSIRR_EL1) +#define PMSIRR_EL1_op0 3 +#define PMSIRR_EL1_op1 0 +#define PMSIRR_EL1_CRn 9 +#define PMSIRR_EL1_CRm 9 +#define PMSIRR_EL1_op2 3 #define PMSIRR_RND_SHIFT 0 #define PMSIRR_RND (UL(0x1) << PMSIRR_RND_SHIFT) #define PMSIRR_INTERVAL_SHIFT 8 @@ -1966,21 +1976,23 @@ /* PMSLATFR_EL1 */ #define PMSLATFR_EL1 MRS_REG(PMSLATFR_EL1) -#define PMSLATFR_EL1_op0 0x3 -#define PMSLATFR_EL1_op1 0x0 -#define PMSLATFR_EL1_CRn 0x9 -#define PMSLATFR_EL1_CRm 0x9 -#define PMSLATFR_EL1_op2 0x6 +#define PMSLATFR_EL1_REG MRS_REG_ALT_NAME(PMSLATFR_EL1) +#define PMSLATFR_EL1_op0 3 +#define PMSLATFR_EL1_op1 0 +#define PMSLATFR_EL1_CRn 9 +#define PMSLATFR_EL1_CRm 9 +#define PMSLATFR_EL1_op2 6 #define PMSLATFR_MINLAT_SHIFT 0 #define PMSLATFR_MINLAT_MASK (UL(0xfff) << PMSLATFR_MINLAT_SHIFT) /* PMSNEVFR_EL1 */ #define PMSNEVFR_EL1 MRS_REG(PMSNEVFR_EL1) -#define PMSNEVFR_EL1_op0 0x3 -#define PMSNEVFR_EL1_op1 0x0 -#define PMSNEVFR_EL1_CRn 0x9 -#define PMSNEVFR_EL1_CRm 0x9 -#define PMSNEVFR_EL1_op2 0x1 +#define PMSNEVFR_EL1_REG MRS_REG_ALT_NAME(PMSNEVFR_EL1) +#define PMSNEVFR_EL1_op0 3 +#define PMSNEVFR_EL1_op1 0 +#define PMSNEVFR_EL1_CRn 9 +#define PMSNEVFR_EL1_CRm 9 +#define PMSNEVFR_EL1_op2 1 /* PMSWINC_EL0 */ #define PMSWINC_EL0 MRS_REG(PMSWINC_EL0)