Make sure VM_MAXUSER_ADDRESS is aligned to a page boundary, as MI code
authorsemarie <semarie@openbsd.org>
Tue, 3 Aug 2021 04:45:54 +0000 (04:45 +0000)
committersemarie <semarie@openbsd.org>
Tue, 3 Aug 2021 04:45:54 +0000 (04:45 +0000)
relies upon this; sparc64 turned out to be the only platform where this
was not the case.

help, diff, and commit message from Miod Vallat
"makes sense" kettenis@

sys/arch/sparc64/include/vmparam.h

index c5815de..42c9075 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vmparam.h,v 1.32 2015/11/01 20:10:00 miod Exp $       */
+/*     $OpenBSD: vmparam.h,v 1.33 2021/08/03 04:45:54 semarie Exp $    */
 /*     $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */
 
 /*
  */
 #define VM_MIN_ADDRESS         ((vaddr_t)PAGE_SIZE)
 #define VM_MAX_ADDRESS         ((vaddr_t)-1)
-#define VM_MAXUSER_ADDRESS     ((vaddr_t)-1)
+#define VM_MAXUSER_ADDRESS     ((vaddr_t)-PAGE_SIZE)
 
 /* map PIE into the first quarter of the address space before hole */
 #define VM_PIE_MIN_ADDR                PAGE_SIZE