Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/include/oea Make this 64-bit aware.
details: https://anonhg.NetBSD.org/src/rev/0cd0b3e74e0a
branches: trunk
changeset: 327139:0cd0b3e74e0a
user: matt <matt%NetBSD.org@localhost>
date: Fri Feb 28 05:33:53 2014 +0000
description:
Make this 64-bit aware.
diffstat:
sys/arch/powerpc/include/oea/vmparam.h | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diffs (85 lines):
diff -r 9caf51980918 -r 0cd0b3e74e0a sys/arch/powerpc/include/oea/vmparam.h
--- a/sys/arch/powerpc/include/oea/vmparam.h Fri Feb 28 05:32:01 2014 +0000
+++ b/sys/arch/powerpc/include/oea/vmparam.h Fri Feb 28 05:33:53 2014 +0000
@@ -51,7 +51,7 @@
#endif
#ifndef USRSTACK32
-#define USRSTACK32 ((uint32_t)VM_MAXUSER_ADDRESS)
+#define USRSTACK32 VM_MAXUSER_ADDRESS32
#endif
#ifndef MAXTSIZ
@@ -62,18 +62,34 @@
#define MAXDSIZ (1024*1024*1024) /* maximum data size */
#endif
+#ifndef MAXDSIZ32
+#define MAXDSIZ32 (1024*1024*1024) /* maximum data size */
+#endif
+
#ifndef MAXSSIZ
#define MAXSSIZ (32*1024*1024) /* maximum stack size */
#endif
+#ifndef MAXSSIZ32
+#define MAXSSIZ32 (32*1024*1024) /* maximum stack size */
+#endif
+
#ifndef DFLDSIZ
#define DFLDSIZ (256*1024*1024) /* default data size */
#endif
+#ifndef DFLDSIZ32
+#define DFLSSIZ32 (256*1024*1024)
+#endif
+
#ifndef DFLSSIZ
#define DFLSSIZ (2*1024*1024) /* default stack size */
#endif
+#ifndef DFLSSIZ32
+#define DFLSSIZ32 (2*1024*1024) /* default stack size */
+#endif
+
/*
* Default number of pages in the user raw I/O map.
*/
@@ -128,6 +144,7 @@
(((vsid) & SR_VSID) >> (SR_VSID_SHFT + VSID__HASHSHFT))
#endif /*0*/
+#ifndef _LP64
/*
* Fixed segments
*/
@@ -141,6 +158,7 @@
#define KERNEL2_SR 14
#endif
#define KERNEL2_SEGMENT VSID_MAKE(KERNEL2_SR, KERNEL_VSIDBITS)
+#endif
#define KERNEL_VSIDBITS 0xfffff
#define PHYSMAP_VSIDBITS 0xffffe
#define PHYSMAPN_SEGMENT(s) VSID_MAKE(s, PHYSMAP_VSIDBITS)
@@ -158,10 +176,20 @@
#endif
#define VM_MIN_ADDRESS ((vaddr_t) 0)
-#define VM_MAXUSER_ADDRESS ((vaddr_t) ~0xfffL)
+#define VM_MAXUSER_ADDRESS32 ((vaddr_t) (uint32_t) ~0xfffL)
+#ifdef _LP64
+#define VM_MAXUSER_ADDRESS ((vaddr_t) 1UL << 48) /* 256TB */
+#else
+#define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS32
+#endif
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
+#ifdef _LP64
+#define VM_MIN_KERNEL_ADDRESS ((vaddr_t) 0xffffffUL << 40) /* top 1TB */
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) -32768)
+#else
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t) (KERNEL_SR << ADDR_SR_SHFT))
#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH)
+#endif
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
Home |
Main Index |
Thread Index |
Old Index