-/* $OpenBSD: pmap.c,v 1.93 2023/03/27 19:02:47 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.94 2023/04/09 19:48:37 kettenis Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
else
access_bits = ap_bits_user[pted->pted_pte & PROT_MASK];
+#ifndef SMALL_KERNEL
if (pm == pmap_kernel())
access_bits |= ATTR_GP;
+#endif
pte = (pted->pted_pte & PTE_RPGN) | attr | access_bits | L3_P;
*pl3 = access_bits ? pte : 0;
-# $OpenBSD: Makefile.arm64,v 1.45 2023/03/27 19:02:47 kettenis Exp $
+# $OpenBSD: Makefile.arm64,v 1.46 2023/04/09 19:48:37 kettenis Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
CMACHFLAGS= -march=armv8-a+nofp+nosimd \
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer \
- -ffixed-x18 -mbranch-protection=bti
+ -ffixed-x18
CMACHFLAGS+= -ffreestanding ${NOPIE_FLAGS}
SORTR= sort -R
.if ${IDENT:M-DNO_PROPOLICE}
.if ${IDENT:M-DSMALL_KERNEL}
SORTR= cat
COPTIMIZE?= -Oz
+CMACHFLAGS+= -mbranch-protection=none
+.else
+CMACHFLAGS+= -mbranch-protection=bti
.endif
DEBUG?= -g