From 2cb9f413198d1af84f23f9a432070cc37525aafd Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 27 Mar 2023 17:49:13 +0000 Subject: [PATCH] Show BT and SBSS features in dmesg. ok deraadt@ --- sys/arch/arm64/arm64/cpu.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 3f27da56496..755d76e0ef5 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.86 2023/02/20 00:01:16 patrick Exp $ */ +/* $OpenBSD: cpu.c,v 1.87 2023/03/27 17:49:13 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -732,6 +732,23 @@ cpu_identify(struct cpu_info *ci) sep = ","; } + /* + * ID_AA64PFR0 + */ + id = READ_SPECIALREG(id_aa64pfr1_el1); + + if (ID_AA64PFR1_BT(id) >= ID_AA64PFR1_BT_IMPL) { + printf("%sBT", sep); + sep = ","; + } + + if (ID_AA64PFR1_SBSS(id) >= ID_AA64PFR1_SBSS_PSTATE) { + printf("%sSBSS", sep); + sep = ","; + } + if (ID_AA64PFR1_SBSS(id) >= ID_AA64PFR1_SBSS_PSTATE_MSR) + printf("+MSR"); + #ifdef CPU_DEBUG id = READ_SPECIALREG(id_aa64afr0_el1); printf("\nID_AA64AFR0_EL1: 0x%016llx", id); -- 2.20.1