From 882d5f626d739f949771991194e9f7d3050ff838 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 23 Dec 2022 17:46:49 +0000 Subject: [PATCH] Add detection of EPAN feature bit. ok deraadt@ --- sys/arch/arm64/arm64/cpu.c | 4 +++- sys/arch/arm64/include/armreg.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 0aa5623b342..7c8e4999faf 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.77 2022/12/21 22:30:42 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.78 2022/12/23 17:46:49 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -674,6 +674,8 @@ cpu_identify(struct cpu_info *ci) } if (ID_AA64MMFR1_PAN(id) >= ID_AA64MMFR1_PAN_ATS1E1) printf("+ATS1E1"); + if (ID_AA64MMFR1_PAN(id) >= ID_AA64MMFR1_PAN_EPAN) + printf("+EPAN"); if (ID_AA64MMFR1_LO(id) >= ID_AA64MMFR1_LO_IMPL) { printf("%sLO", sep); diff --git a/sys/arch/arm64/include/armreg.h b/sys/arch/arm64/include/armreg.h index c8281a2e92a..c1799668508 100644 --- a/sys/arch/arm64/include/armreg.h +++ b/sys/arch/arm64/include/armreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armreg.h,v 1.25 2022/12/09 21:23:24 patrick Exp $ */ +/* $OpenBSD: armreg.h,v 1.26 2022/12/23 17:46:49 kettenis Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * Copyright (c) 2015 The FreeBSD Foundation @@ -472,6 +472,7 @@ #define ID_AA64MMFR1_PAN_NONE (0x0 << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_IMPL (0x1 << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_ATS1E1 (0x2 << ID_AA64MMFR1_PAN_SHIFT) +#define ID_AA64MMFR1_PAN_EPAN (0x3 << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_SPECSEI_SHIFT 24 #define ID_AA64MMFR1_SPECSEI_MASK (0xf << ID_AA64MMFR1_SPECSEI_SHIFT) #define ID_AA64MMFR1_SPECSEI(x) ((x) & ID_AA64MMFR1_SPECSEI_MASK) -- 2.20.1