From 228ea451b077f9d519b55c498184cf588bd765c6 Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 4 Mar 2021 18:32:52 +0000 Subject: [PATCH] Print feature that indicates a CPU core supports 16-bit ASIDs. ok patrick@ --- sys/arch/arm64/arm64/cpu.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 21f841a7e25..719bcf1431d 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.48 2021/02/21 14:55:16 tobhe Exp $ */ +/* $OpenBSD: cpu.c,v 1.49 2021/03/04 18:32:52 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -399,6 +399,18 @@ cpu_identify(struct cpu_info *ci) sep = ","; } + /* + * ID_AA64MMFR0 + * + * We only print ASIDBits for now. + */ + id = READ_SPECIALREG(id_aa64mmfr0_el1); + + if (ID_AA64MMFR0_ASID_BITS(id) == ID_AA64MMFR0_ASID_BITS_16) { + printf("%sASID16", sep); + sep = ","; + } + /* * ID_AA64MMFR1 * -- 2.20.1