diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-10 15:56:29 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-10 15:56:29 +0000 |
commit | 34093eac5fdf901e43a0df765971fab8ec95f272 (patch) | |
tree | dcd22f04eb1f01df0b5df911984ade2094453b68 /sys/arch | |
parent | aeaca088097fc9446b7dc82269369a80d6a08ec3 (diff) |
VM_MAX_KERNEL_ADDRESS is the end of the kva range not the end of
addressable virtual memory space but arm ports were using a value of
0xffffffff for this.
Instead of using a shared VM_MAX_KERNEL_ADDRESS define add md
VM_KERNEL_SPACE_SIZE defines based on the KERNEL_VM_SIZE values
from the respective machdep.c files.
djm's novena was hitting "panic: bufinit: can't reserve VM for buffers"
without a similiar change.
ok miod@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm/include/vmparam.h | 3 | ||||
-rw-r--r-- | sys/arch/armish/armish/armish_machdep.c | 12 | ||||
-rw-r--r-- | sys/arch/armish/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/armv7/armv7/armv7_machdep.c | 12 | ||||
-rw-r--r-- | sys/arch/armv7/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/zaurus/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/zaurus/zaurus/zaurus_machdep.c | 13 |
7 files changed, 16 insertions, 36 deletions
diff --git a/sys/arch/arm/include/vmparam.h b/sys/arch/arm/include/vmparam.h index 5f86b05f270..123fc515e9a 100644 --- a/sys/arch/arm/include/vmparam.h +++ b/sys/arch/arm/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.14 2014/09/30 01:34:34 tobiasu Exp $ */ +/* $OpenBSD: vmparam.h,v 1.15 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2003/05/21 18:04:44 thorpej Exp $ */ /* @@ -93,6 +93,5 @@ #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) ARM_KERNEL_BASE) -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) 0xffffffff) #endif /* _ARM_VMPARAM_H_ */ diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c index abac7f07f71..ec3279c7ca0 100644 --- a/sys/arch/armish/armish/armish_machdep.c +++ b/sys/arch/armish/armish/armish_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armish_machdep.c,v 1.38 2015/05/08 22:56:53 miod Exp $ */ +/* $OpenBSD: armish_machdep.c,v 1.39 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -119,18 +119,10 @@ #include <armish/dev/iq80321var.h> #include <armish/dev/obiovar.h> - - /* Kernel text starts 2MB in from the bottom of the kernel address space. */ #define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00200000) #define KERNEL_VM_BASE (KERNEL_BASE + 0x10000000) - -/* - * The range 0xc1000000 - 0xcfffffff is available for kernel VM space - * Core-logic registers and I/O mappings occupy 0xfd000000 - 0xffffffff - */ -#define KERNEL_VM_SIZE 0x20000000 - +#define KERNEL_VM_SIZE VM_KERNEL_SPACE_SIZE /* * Address to call from cpu_reset() to reset the machine. diff --git a/sys/arch/armish/include/vmparam.h b/sys/arch/armish/include/vmparam.h index 6a8315f1316..7e6671e51a5 100644 --- a/sys/arch/armish/include/vmparam.h +++ b/sys/arch/armish/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.8 2011/09/21 10:09:52 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.9 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: vmparam.h,v 1.23 2003/05/22 05:47:07 thorpej Exp $ */ /* @@ -56,6 +56,8 @@ */ #define KERNEL_BASE ARM_KERNEL_BASE +#define VM_KERNEL_SPACE_SIZE 0x20000000 + /* * Override the default pager_map size, there's not enough KVA. */ diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c index fabb406e4d3..5a85498b6a6 100644 --- a/sys/arch/armv7/armv7/armv7_machdep.c +++ b/sys/arch/armv7/armv7/armv7_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_machdep.c,v 1.19 2015/05/10 05:42:46 jsg Exp $ */ +/* $OpenBSD: armv7_machdep.c,v 1.20 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -138,15 +138,7 @@ /* Kernel text starts 2MB in from the bottom of the kernel address space. */ #define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00000000) #define KERNEL_VM_BASE (KERNEL_BASE + 0x04000000) - -/* - * The range 0xc1000000 - 0xccffffff is available for kernel VM space - * Core-logic registers and I/O mappings occupy 0xfd000000 - 0xffffffff - */ -/* -#define KERNEL_VM_SIZE 0x0C000000 -*/ -#define KERNEL_VM_SIZE 0x10000000 +#define KERNEL_VM_SIZE VM_KERNEL_SPACE_SIZE /* * Address to call from cpu_reset() to reset the machine. diff --git a/sys/arch/armv7/include/vmparam.h b/sys/arch/armv7/include/vmparam.h index 8f47d2c4124..a6fee2b8d4a 100644 --- a/sys/arch/armv7/include/vmparam.h +++ b/sys/arch/armv7/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.1 2013/09/04 14:38:29 patrick Exp $ */ +/* $OpenBSD: vmparam.h,v 1.2 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: vmparam.h,v 1.23 2003/05/22 05:47:07 thorpej Exp $ */ /* @@ -56,6 +56,8 @@ */ #define KERNEL_BASE ARM_KERNEL_BASE +#define VM_KERNEL_SPACE_SIZE 0x10000000 + /* * Override the default pager_map size, there's not enough KVA. */ diff --git a/sys/arch/zaurus/include/vmparam.h b/sys/arch/zaurus/include/vmparam.h index 57b4974bdbb..f7578818643 100644 --- a/sys/arch/zaurus/include/vmparam.h +++ b/sys/arch/zaurus/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.6 2011/05/30 22:25:23 oga Exp $ */ +/* $OpenBSD: vmparam.h,v 1.7 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: vmparam.h,v 1.23 2003/05/22 05:47:07 thorpej Exp $ */ /* @@ -48,6 +48,8 @@ */ #define KERNEL_BASE ARM_KERNEL_BASE +#define VM_KERNEL_SPACE_SIZE 0x10000000 + /* * Override the default pager_map size, there's not enough KVA. */ diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index b8f056130e3..af987a98da1 100644 --- a/sys/arch/zaurus/zaurus/zaurus_machdep.c +++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_machdep.c,v 1.58 2015/05/08 22:56:53 miod Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.59 2015/05/10 15:56:28 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -166,16 +166,7 @@ /* Kernel text starts 2MB in from the bottom of the kernel address space. */ #define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00200000) #define KERNEL_VM_BASE (KERNEL_BASE + 0x04000000) - -/* - * The range 0xc1000000 - 0xccffffff is available for kernel VM space - * Core-logic registers and I/O mappings occupy 0xfd000000 - 0xffffffff - */ -/* -#define KERNEL_VM_SIZE 0x0C000000 -*/ -#define KERNEL_VM_SIZE 0x10000000 - +#define KERNEL_VM_SIZE VM_KERNEL_SPACE_SIZE /* * Address to call from cpu_reset() to reset the machine. |