summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/include/vmparam.h5
-rw-r--r--sys/arch/arm64/include/vmparam.h5
-rw-r--r--sys/arch/mips64/include/vmparam.h5
-rw-r--r--sys/arch/powerpc64/include/vmparam.h3
-rw-r--r--sys/arch/riscv64/include/vmparam.h5
-rw-r--r--sys/arch/sparc64/include/vmparam.h5
6 files changed, 23 insertions, 5 deletions
diff --git a/sys/arch/amd64/include/vmparam.h b/sys/arch/amd64/include/vmparam.h
index fae0eeec8bd..d7b606a1bf6 100644
--- a/sys/arch/amd64/include/vmparam.h
+++ b/sys/arch/amd64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.22 2019/01/03 18:59:27 deraadt Exp $ */
+/* $OpenBSD: vmparam.h,v 1.23 2023/03/19 20:32:13 kettenis Exp $ */
/* $NetBSD: vmparam.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $ */
/*-
@@ -94,6 +94,9 @@
#define VM_MIN_ADDRESS PAGE_SIZE
#define VM_MAXUSER_ADDRESS 0x00007f7fffffc000
#define VM_MAX_ADDRESS 0x00007fbfdfeff000
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS 0x0000600000000000
+#endif
#define VM_MIN_KERNEL_ADDRESS 0xffff800000000000
#define VM_MAX_KERNEL_ADDRESS 0xffff800100000000
diff --git a/sys/arch/arm64/include/vmparam.h b/sys/arch/arm64/include/vmparam.h
index 118fa0ed0a2..af4f674efd6 100644
--- a/sys/arch/arm64/include/vmparam.h
+++ b/sys/arch/arm64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.7 2019/06/01 18:38:27 patrick Exp $ */
+/* $OpenBSD: vmparam.h,v 1.8 2023/03/19 20:32:13 kettenis Exp $ */
/* $NetBSD: vmparam.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $ */
/*-
@@ -92,6 +92,9 @@
#define USER_SPACE_BITS 39
#define VM_MAXUSER_ADDRESS ((1ULL << USER_SPACE_BITS) - 0x8000)
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS (3ULL << (USER_SPACE_BITS - 2))
+#endif
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xffffff8000000000ULL)
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xffffff83ffffffffULL)
diff --git a/sys/arch/mips64/include/vmparam.h b/sys/arch/mips64/include/vmparam.h
index eef1c18f286..cfc8f55a05b 100644
--- a/sys/arch/mips64/include/vmparam.h
+++ b/sys/arch/mips64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.29 2016/12/23 12:38:16 visa Exp $ */
+/* $OpenBSD: vmparam.h,v 1.30 2023/03/19 20:32:13 kettenis Exp $ */
/* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $ */
/*
@@ -99,6 +99,9 @@
#define VM_MIN_ADDRESS ((vaddr_t)0x0000000000004000L)
#define VM_MAXUSER_ADDRESS ((vaddr_t)0x0000010000000000L)
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS ((vaddr_t)0x000000c000000000L)
+#endif
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xc000000000000000L)
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xc000000040000000L)
diff --git a/sys/arch/powerpc64/include/vmparam.h b/sys/arch/powerpc64/include/vmparam.h
index 56061429181..af8831a71ec 100644
--- a/sys/arch/powerpc64/include/vmparam.h
+++ b/sys/arch/powerpc64/include/vmparam.h
@@ -46,5 +46,8 @@
#define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE)
#define VM_MAXUSER_ADDRESS 0xbffffffffffff000UL
#define VM_MAX_ADDRESS 0xffffffffffffffffUL
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS 0x9000000000000000UL
+#endif
#define VM_MIN_KERNEL_ADDRESS 0xc000000000000000UL
#define VM_MAX_KERNEL_ADDRESS 0xc0000007ffffffffUL
diff --git a/sys/arch/riscv64/include/vmparam.h b/sys/arch/riscv64/include/vmparam.h
index c9e63887d63..fa1fd0b7461 100644
--- a/sys/arch/riscv64/include/vmparam.h
+++ b/sys/arch/riscv64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.6 2022/03/22 06:47:38 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.7 2023/03/19 20:32:13 kettenis Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -175,6 +175,9 @@
#define VM_MINUSER_ADDRESS (VM_MIN_USER_ADDRESS)
// XXX OpenBSD/arm64 saves 8 * PAGE_SIZE at top of VM_MAXUSER_ADDRESS. Why?
#define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS)
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS (VM_MAXUSER_ADDRESS * 3 / 4)
+#endif
#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h
index 42c9075482e..a7a4a4bd593 100644
--- a/sys/arch/sparc64/include/vmparam.h
+++ b/sys/arch/sparc64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.33 2021/08/03 04:45:54 semarie Exp $ */
+/* $OpenBSD: vmparam.h,v 1.34 2023/03/19 20:32:13 kettenis Exp $ */
/* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */
/*
@@ -103,6 +103,9 @@
#define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE)
#define VM_MAX_ADDRESS ((vaddr_t)-1)
#define VM_MAXUSER_ADDRESS ((vaddr_t)-PAGE_SIZE)
+#ifdef _KERNEL
+#define VM_MIN_STACK_ADDRESS ((vaddr_t)0xfffffe0000000000L)
+#endif
/* map PIE into the first quarter of the address space before hole */
#define VM_PIE_MIN_ADDR PAGE_SIZE