Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Readd powerpc/include/vmparam.h to the set lists



details:   https://anonhg.NetBSD.org/src/rev/d52f02ece13a
branches:  trunk
changeset: 766334:d52f02ece13a
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jun 20 21:45:16 2011 +0000

description:
Readd powerpc/include/vmparam.h to the set lists
Export it to powerpc/include.h
Protect pmap.h and vmparam.h from getting an #error when included
from userland.
Export safe definitions of VM_MAXUSER_ADDRESS, VM_MIN_ADDRESS,
VM_MAX_ADDRESS when _RUMPKERNEL is defined.

diffstat:

 distrib/sets/lists/comp/ad.powerpc |   4 ++--
 sys/arch/powerpc/include/Makefile  |   4 ++--
 sys/arch/powerpc/include/pmap.h    |   4 ++--
 sys/arch/powerpc/include/vmparam.h |  16 ++++++++++++++--
 4 files changed, 20 insertions(+), 8 deletions(-)

diffs (98 lines):

diff -r bda72f79e7dd -r d52f02ece13a distrib/sets/lists/comp/ad.powerpc
--- a/distrib/sets/lists/comp/ad.powerpc        Mon Jun 20 21:39:18 2011 +0000
+++ b/distrib/sets/lists/comp/ad.powerpc        Mon Jun 20 21:45:16 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.50 2011/06/05 16:52:22 matt Exp $
+# $NetBSD: ad.powerpc,v 1.51 2011/06/20 21:45:16 matt Exp $
 ./usr/bin/elf2aout                             comp-sysutil-bin
 ./usr/bin/psim                                 comp-debug-bin          gdb,gdb=6
 ./usr/include/altivec.h                                comp-obsolete           obsolete
@@ -79,7 +79,7 @@
 ./usr/include/powerpc/types.h                  comp-c-include
 ./usr/include/powerpc/va-ppc.h                 comp-obsolete           obsolete
 ./usr/include/powerpc/varargs.h                        comp-c-include
-./usr/include/powerpc/vmparam.h                        comp-obsolete           obsolete
+./usr/include/powerpc/vmparam.h                        comp-c-include
 ./usr/include/powerpc/wchar_limits.h           comp-c-include
 ./usr/libdata/debug/usr/bin/elf2aout.debug     comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/bin/fdformat.debug     comp-util-debug         debug
diff -r bda72f79e7dd -r d52f02ece13a sys/arch/powerpc/include/Makefile
--- a/sys/arch/powerpc/include/Makefile Mon Jun 20 21:39:18 2011 +0000
+++ b/sys/arch/powerpc/include/Makefile Mon Jun 20 21:45:16 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.36 2011/06/05 16:52:25 matt Exp $
+#      $NetBSD: Makefile,v 1.37 2011/06/20 21:45:16 matt Exp $
 
 .if !defined(INCSDIR)
 INCSDIR?= /usr/include/powerpc
@@ -19,7 +19,7 @@
        reg.h reloc.h rwlock.h \
        setjmp.h signal.h stdarg.h \
        trap.h types.h \
-       varargs.h \
+       varargs.h vmparam.h \
        wchar_limits.h
 
 .include <bsd.kinc.mk>
diff -r bda72f79e7dd -r d52f02ece13a sys/arch/powerpc/include/pmap.h
--- a/sys/arch/powerpc/include/pmap.h   Mon Jun 20 21:39:18 2011 +0000
+++ b/sys/arch/powerpc/include/pmap.h   Mon Jun 20 21:45:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.37 2011/06/20 20:24:28 matt Exp $   */
+/*     $NetBSD: pmap.h,v 1.38 2011/06/20 21:45:16 matt Exp $   */
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -16,7 +16,7 @@
 #include <powerpc/ibm4xx/pmap.h>
 #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
 #include <powerpc/oea/pmap.h>
-#else
+#elif defined(_KERNEL)
 #error unknown PPC variant
 #endif
 
diff -r bda72f79e7dd -r d52f02ece13a sys/arch/powerpc/include/vmparam.h
--- a/sys/arch/powerpc/include/vmparam.h        Mon Jun 20 21:39:18 2011 +0000
+++ b/sys/arch/powerpc/include/vmparam.h        Mon Jun 20 21:45:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.15 2011/06/20 20:24:28 matt Exp $        */
+/*     $NetBSD: vmparam.h,v 1.16 2011/06/20 21:45:16 matt Exp $        */
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -36,6 +36,17 @@
 #define        MIN_PAGE_SIZE   4096            /* BOOKE/OEA */
 #define        MAX_PAGE_SIZE   16384           /* IBM4XX */
 
+#if defined(_RUMPKERNEL)
+/*
+ * Safe definitions for RUMP kernels
+ */
+#define        VM_MAXUSER_ADDRESS      0x7fff8000
+#define        VM_MIN_ADDRESS          0x00000000
+#define        VM_MAX_ADDRESS          VM_MAXUSER_ADDRESS
+#define        MAXDSIZ                 (1024*1024*1024)
+#define        MAXSSIZ                 (32*1024*1024)
+#define        MAXTSIZ                 (256*1024*1024)
+#else /* !_RUMPKERNEL */
 /*
  * Some modules need some of the constants but those vary between the variants
  * so those constants are exported as linker symbols so they don't take up any
@@ -44,6 +55,7 @@
 extern const char __USRSTACK;          /* let the linker resolve it */
 
 #define USRSTACK       ((vaddr_t)(uintptr_t)&__USRSTACK)
+#endif /* !_RUMPKERNEL */
 
 #else /* !_MODULE */
 
@@ -53,7 +65,7 @@
 #include <powerpc/ibm4xx/vmparam.h>
 #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
 #include <powerpc/oea/vmparam.h>
-#else
+#elif defined(_KERNEL)
 #error unknown PPC variant
 #endif
 



Home | Main Index | Thread Index | Old Index