From nobody Thu Feb 22 16:28:07 2024 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 4TgdqC5qNBz59wPp; Thu, 22 Feb 2024 16:28:07 +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 4TgdqC374Yz4K1y; Thu, 22 Feb 2024 16:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708619287; 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=PC/MosRYVErGL2yZJ30OE/mqViMIOyGMTtbP6FQieOo=; b=vTyuN/3z0Og7ikji4rnJTp4KqDkG3o8uns6ceBOGFmtTEIUb4yz1itNwTWabBos6JCB7XJ 2rbN48O1+Kf6kVlqpWzCyRY0+Ct3q2zSoZs6AVyYmAjCGGYafsSmcwWiayoP82nNmL47Tp OAmBLSrllnb8W7JNDPYMW6V1ANA0Wafvfv+8VFctwNkKijycocxgUxASsCjNAWEwDt777s 730Zt/+KsqZmS3OPMAajn+JRdUd37XO7X8XnaxCoCFC4y+RP61EDcvqdrHnUukqs3u7mq5 09Ghyx36rxP1mdCVndKfIChn94tisPfFGYwm66XBrP66dhUjFlFMv2yS4kStQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708619287; 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=PC/MosRYVErGL2yZJ30OE/mqViMIOyGMTtbP6FQieOo=; b=p51A+aKMYbRz6bJ4vYnb6VQw1F2R92ZBHtYYRm9VqgE28zB4FDWKQoe3zhgj4mKulw76cj duxHh8U56/4niT6DtPtYPrYLUaZ1/hESBuQ7/3tCy46Xa2pCKglrKJbLpYld23LuY1TvmG 0/StFF7bw2Ys129x2B3rmHe+HBRjCrm9xVV/hQrzMbd/NlK+VyclWkHFvWjLEb3xN9PUHW IKKTdSNVtoDyLPwVE5k9fLnxEQGA1c2XJsSgrHThvplRDq6oBBkePUfQIAfQCPuvIoYSWv JwuZuGJGq3Z7utSK1P3k5yXz9sIp5FLh1HZkXJrL7VHmariPd9rQbE8ycanIfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708619287; a=rsa-sha256; cv=none; b=x+cW6yfoLyy3FkLHIffzf9YWjFv0EZItSMo5bHh6Mz918es1UtUihzu6vFSy/dnBM3OLAH FTbrYjxDaFIlyCdyNevGmqfyA5xxK1/AUL1EE9gtel2Je5Udv7zs2O45G0aF/s72D7Bguc GQo/B5CixtG0gG3MJRWp3ywWOxGXG0BFp49mVWAhZsSmYhaWpSrz/IGd75E6AxeRhwRdK7 Kx1YX6Kt2foL63ciBiKWPY98VTx0+2MHR4kv6Fa8fGyXpbdI8kMd8RaQWTmzj/rxOU6DMZ nU6hUUun8BAEBrP3In1YULrQvKQCymqb5AnudyIvqi6rLkq+GCtk3+U8h6QRNA== 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 4TgdqC264gzfXc; Thu, 22 Feb 2024 16:28:07 +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 41MGS7l1015471; Thu, 22 Feb 2024 16:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MGS7Zd015468; Thu, 22 Feb 2024 16:28:07 GMT (envelope-from git) Date: Thu, 22 Feb 2024 16:28:07 GMT Message-Id: <202402221628.41MGS7Zd015468@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: e68136d3635c - main - arm64: Tell userspace when BTI is supported 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: e68136d3635ca75a056dc499485417d5eb9fc2f8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e68136d3635ca75a056dc499485417d5eb9fc2f8 commit e68136d3635ca75a056dc499485417d5eb9fc2f8 Author: Andrew Turner AuthorDate: 2023-10-26 09:50:28 +0000 Commit: Andrew Turner CommitDate: 2024-02-22 16:27:47 +0000 arm64: Tell userspace when BTI is supported To allow userspace to decide when to try enabling BTI report if it's available via the ID register and hwcaps. Sponsored by: Arm Ltd --- sys/arm64/arm64/identcpu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 7cdcc9dfcb56..7706c42f7fdb 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1530,13 +1530,10 @@ static const struct mrs_field_value id_aa64pfr1_bt[] = { MRS_FIELD_VALUE_END, }; -#if 0 -/* Enable when we add BTI support */ static const struct mrs_field_hwcap id_aa64pfr1_bt_caps[] = { MRS_HWCAP(2, HWCAP2_BTI, ID_AA64PFR1_BT_IMPL), MRS_HWCAP_END }; -#endif static const struct mrs_field id_aa64pfr1_fields[] = { MRS_FIELD(ID_AA64PFR1, NMI, false, MRS_EXACT, id_aa64pfr1_nmi), @@ -1552,7 +1549,8 @@ static const struct mrs_field id_aa64pfr1_fields[] = { MRS_FIELD(ID_AA64PFR1, MTE, false, MRS_EXACT, id_aa64pfr1_mte), MRS_FIELD_HWCAP(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs, id_aa64pfr1_ssbs_caps), - MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), + MRS_FIELD_HWCAP_SPLIT(ID_AA64PFR1, BT, false, MRS_LOWER, MRS_EXACT, + id_aa64pfr1_bt, id_aa64pfr1_bt_caps), MRS_FIELD_END, };