git: e68136d3635c - main - arm64: Tell userspace when BTI is supported
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Feb 2024 16:28:07 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=e68136d3635ca75a056dc499485417d5eb9fc2f8
commit e68136d3635ca75a056dc499485417d5eb9fc2f8
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-10-26 09:50:28 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
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,
};