-/* $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>
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);
}
-/* $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
#define SCTLR_EnIA 0x0000000080000000
#define SCTLR_BT0 0x0000000800000000
#define SCTLR_BT1 0x0000001000000000
+#define SCTLR_EPAN 0x0200000000000000
/* SPSR_EL1 */
/*