-/* $OpenBSD: cpu.c,v 1.93 2023/06/10 19:30:48 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.94 2023/06/11 21:42:01 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
/* Enable PAuth. */
id_aa64isar1 = READ_SPECIALREG(id_aa64isar1_el1);
- if (ID_AA64ISAR1_API(id_aa64isar1) >= ID_AA64ISAR1_API_BASE ||
- ID_AA64ISAR1_APA(id_aa64isar1) >= ID_AA64ISAR1_APA_BASE) {
+ if (ID_AA64ISAR1_API(id_aa64isar1) >= ID_AA64ISAR1_API_BASE) {
sctlr = READ_SPECIALREG(sctlr_el1);
sctlr |= SCTLR_EnIA | SCTLR_EnDA;
sctlr |= SCTLR_EnIB | SCTLR_EnDB;
-/* $OpenBSD: pmap.c,v 1.97 2023/06/10 19:30:48 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.98 2023/06/11 21:42:01 kettenis Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
void
pmap_setpauthkeys(struct pmap *pm)
{
- if (ID_AA64ISAR1_API(cpu_id_aa64isar1) >= ID_AA64ISAR1_API_BASE ||
- ID_AA64ISAR1_APA(cpu_id_aa64isar1) >= ID_AA64ISAR1_APA_BASE) {
+ if (ID_AA64ISAR1_API(cpu_id_aa64isar1) >= ID_AA64ISAR1_API_BASE) {
__asm volatile (".arch armv8.3-a; msr apiakeylo_el1, %0"
:: "r"(pm->pm_apiakey[0]));
__asm volatile (".arch armv8.3-a; msr apiakeyhi_el1, %0"
:: "r"(pm->pm_apdbkey[1]));
}
- if (ID_AA64ISAR1_GPI(cpu_id_aa64isar1) >= ID_AA64ISAR1_GPI_IMPL ||
- ID_AA64ISAR1_GPA(cpu_id_aa64isar1) >= ID_AA64ISAR1_GPA_IMPL) {
+ if (ID_AA64ISAR1_GPI(cpu_id_aa64isar1) >= ID_AA64ISAR1_GPI_IMPL) {
__asm volatile (".arch armv8.3-a; msr apgakeylo_el1, %0"
:: "r"(pm->pm_apgakey[0]));
__asm volatile (".arch armv8.3-a; msr apgakeyhi_el1, %0"