diff options
author | fjoe <fjoe@FreeBSD.org> | 2010-11-28 19:26:20 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2010-11-28 19:26:20 +0000 |
commit | eadf2bdaecb0bf137e81c62dcade0a0bfbc08188 (patch) | |
tree | 7fd31f908522e80221397355d9be45cee0ff3a0b /sys/sparc64/include/vmparam.h | |
parent | 04af46dbdb5bc9e23d359c88587c9fb3d691a229 (diff) | |
download | FreeBSD-src-eadf2bdaecb0bf137e81c62dcade0a0bfbc08188.zip FreeBSD-src-eadf2bdaecb0bf137e81c62dcade0a0bfbc08188.tar.gz |
Define VM_KMEM_SIZE_MAX on sparc64. Otherwise kernel built with
DEBUG_MEMGUARD panics early in kmeminit() with the message
"kmem_suballoc: bad status return of 1" because of zero "size" argument
passed to kmem_suballoc() due to "vm_kmem_size_max" being zero.
The problem also exists on ia64.
Diffstat (limited to 'sys/sparc64/include/vmparam.h')
-rw-r--r-- | sys/sparc64/include/vmparam.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h index b92312e..26caab3 100644 --- a/sys/sparc64/include/vmparam.h +++ b/sys/sparc64/include/vmparam.h @@ -237,6 +237,14 @@ #endif /* + * Ceiling on amount of kmem_map kva space. + */ +#ifndef VM_KMEM_SIZE_MAX +#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ + VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5) +#endif + +/* * Initial pagein size of beginning of executable file. */ #ifndef VM_INITIAL_PAGEIN |