aboutsummaryrefslogtreecommitdiff
path: root/i386/include
diff options
context:
space:
mode:
Diffstat (limited to 'i386/include')
-rw-r--r--i386/include/mach/i386/vm_param.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h
index f09049a5..1576f048 100644
--- a/i386/include/mach/i386/vm_param.h
+++ b/i386/include/mach/i386/vm_param.h
@@ -65,18 +65,26 @@
~(I386_PGBYTES-1))
#define i386_trunc_page(x) (((unsigned long)(x)) & ~(I386_PGBYTES-1))
-/* User address spaces are 3GB each,
- starting at virtual and linear address 0.
+/* User address spaces are 3GB each on a 32-bit kernel, starting at
+ virtual and linear address 0.
+ On a 64-bit krenel we split the address space in half, with the
+ lower 128TB for the user address space and the upper 128TB for the
+ kernel address space.
- VM_MAX_ADDRESS can be reduced to leave more space for the kernel, but must
- not be increased to more than 3GB as glibc and hurd servers would not cope
- with that.
+ On a 32-bit kernel VM_MAX_ADDRESS can be reduced to leave more
+ space for the kernel, but must not be increased to more than 3GB as
+ glibc and hurd servers would not cope with that.
*/
#define VM_MIN_ADDRESS (0ULL)
+
#ifdef __x86_64__
-#define VM_MAX_ADDRESS (0xc0000000ULL)
-#else
+#if defined(KERNEL) && defined(USER32)
+#define VM_MAX_ADDRESS (0xc0000000UL)
+#else /* defined(KERNEL) && defined(USER32) */
+#define VM_MAX_ADDRESS (0x800000000000ULL)
+#endif /* defined(KERNEL) && defined(USER32) */
+#else /* __x86_64__ */
#define VM_MAX_ADDRESS (0xc0000000UL)
-#endif
+#endif /* __x86_64__ */
#endif /* _MACH_I386_VM_PARAM_H_ */