aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/vmparam.h
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2002-08-10 22:14:16 +0000
committerJake Burkholder <jake@FreeBSD.org>2002-08-10 22:14:16 +0000
commit5aebb4029139c2675b97d1373ef2a379405d7c7c (patch)
tree7349581d304c20934c8c25ed2dcc7c74735a7e7e /sys/sparc64/include/vmparam.h
parentd64915d6e373efc67190d1220865e76c5eaf046f (diff)
Auto size available kernel virtual address space based on phsyical memory
size. This avoids blowing out kva in kmeminit() on large memory machines (4 gigs or more). Reviewed by: tmm
Notes
Notes: svn path=/head/; revision=101653
Diffstat (limited to 'sys/sparc64/include/vmparam.h')
-rw-r--r--sys/sparc64/include/vmparam.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h
index ec080e6c9afa..7b916bc952fa 100644
--- a/sys/sparc64/include/vmparam.h
+++ b/sys/sparc64/include/vmparam.h
@@ -88,9 +88,9 @@
* that if this moves above the va hole, we will have to deal with sign
* extension of virtual addresses.
*/
-#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7fe00000000)
+#define VM_MAXUSER_ADDRESS (0x7fe00000000UL)
-#define VM_MIN_ADDRESS ((vm_offset_t)0)
+#define VM_MIN_ADDRESS (0UL)
#define VM_MAX_ADDRESS (VM_MAXUSER_ADDRESS)
/*
@@ -116,19 +116,6 @@
#endif
/*
- * Number of 4 meg pages to use for the kernel tsb.
- */
-#ifndef KVA_PAGES
-#define KVA_PAGES (1)
-#endif
-
-/*
- * Range of kernel virtual addresses. max = min + range.
- */
-#define KVA_RANGE \
- ((KVA_PAGES * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT))
-
-/*
* Lowest kernel virtual address, where the kernel is loaded. This is also
* arbitrary. We pick a resonably low address, which allows all of kernel
* text, data and bss to be below the 4 gigabyte mark, yet still high enough
@@ -136,12 +123,12 @@
* same as for x86 with default KVA_PAGES...
*/
#define VM_MIN_KERNEL_ADDRESS (0xc0000000)
-#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + KVA_RANGE - PAGE_SIZE)
-#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
-
#define VM_MIN_PROM_ADDRESS (0xf0000000)
#define VM_MAX_PROM_ADDRESS (0xffffe000)
+#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
+#define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address)
+
/*
* Initial pagein size of beginning of executable file.
*/
@@ -149,4 +136,6 @@
#define VM_INITIAL_PAGEIN 16
#endif
+extern vm_offset_t vm_max_kernel_address;
+
#endif /* !_MACHINE_VMPARAM_H_ */