diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-06-23 10:17:17 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-06-23 10:17:17 +0000 |
commit | f0c42eab5610cfa6ffc016b936291730eec48154 (patch) | |
tree | 2f3ca135526c779c4891423848b807f97ae27191 /sys/arch | |
parent | f22d575a4563f35f273276b523be98fe2c914af9 (diff) |
Enable EPAN if it is available.
ok patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/arm64/cpu.c | 4 | ||||
-rw-r--r-- | 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 c61be5e1ecb..a350d11a843 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.120 2024/06/21 01:52:17 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.121 2024/06/23 10:17:16 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com> @@ -1174,6 +1174,8 @@ cpu_init(void) if (ID_AA64MMFR1_PAN(id_aa64mmfr1) >= ID_AA64MMFR1_PAN_IMPL) { sctlr = READ_SPECIALREG(sctlr_el1); sctlr &= ~SCTLR_SPAN; + if (ID_AA64MMFR1_PAN(id_aa64mmfr1) >= ID_AA64MMFR1_PAN_EPAN) + sctlr |= SCTLR_EPAN; WRITE_SPECIALREG(sctlr_el1, sctlr); } diff --git a/sys/arch/arm64/include/armreg.h b/sys/arch/arm64/include/armreg.h index 5ace1affed7..ed7b5301795 100644 --- a/sys/arch/arm64/include/armreg.h +++ b/sys/arch/arm64/include/armreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armreg.h,v 1.34 2024/05/27 06:20:59 kettenis Exp $ */ +/* $OpenBSD: armreg.h,v 1.35 2024/06/23 10:17:16 kettenis Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * Copyright (c) 2015 The FreeBSD Foundation @@ -705,6 +705,7 @@ #define SCTLR_EnIA 0x0000000080000000 #define SCTLR_BT0 0x0000000800000000 #define SCTLR_BT1 0x0000001000000000 +#define SCTLR_EPAN 0x0200000000000000 /* SPSR_EL1 */ /* |