Module Name:    src
Committed By:   matt
Date:           Sat Sep 12 17:16:38 UTC 2009

Modified Files:
        src/sys/arch/mips/include [matt-nb5-mips64]: vmparam.h

Log Message:
Add some COMPAT_NETBSD32 definitions of common macros.


To generate a diff of this commit:
cvs rdiff -u -r1.41.28.3 -r1.41.28.4 src/sys/arch/mips/include/vmparam.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.3 src/sys/arch/mips/include/vmparam.h:1.41.28.4
--- src/sys/arch/mips/include/vmparam.h:1.41.28.3	Tue Sep  8 00:52:14 2009
+++ src/sys/arch/mips/include/vmparam.h	Sat Sep 12 17:16:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.41.28.3 2009/09/08 00:52:14 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.41.28.4 2009/09/12 17:16:38 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -98,7 +98,8 @@
  * and some QED CPUs perform some virtual address checks before the
  * offset is calculated.
  */
-#define	USRSTACK	0x7ffff000		/* Start of user stack */
+#define	USRSTACK	(VM_MAXUSER_ADDRESS-PAGE_SIZE) /* Start of user stack */
+#define	USRSTACK32	((uint32_t)VM_MAXUSER32_ADDRESS-PAGE_SIZE)
 
 /* alignment requirement for u-area space in bytes */
 #define	USPACE_ALIGN	USPACE
@@ -123,6 +124,25 @@
 #endif
 
 /*
+ * Virtual memory related constants, all in bytes
+ */
+#ifndef MAXTSIZ32
+#define	MAXTSIZ32	MAXTSIZ			/* max text size */
+#endif
+#ifndef DFLDSIZ32
+#define	DFLDSIZ32	DFLDSIZ			/* initial data size limit */
+#endif
+#ifndef MAXDSIZ32
+#define	MAXDSIZ32	MAXDSIZ			/* max data size */
+#endif
+#ifndef	DFLSSIZ32
+#define	DFLSSIZ32	DFLTSIZ			/* initial stack size limit */
+#endif
+#ifndef	MAXSSIZ32
+#define	MAXSSIZ32	MAXSSIZ			/* max stack size */
+#endif
+
+/*
  * PTEs for mapping user space into the kernel for phyio operations.
  * The default PTE number is enough to cover 8 disks * MAXBSIZE.
  */
@@ -166,6 +186,7 @@
 #define VM_MAX_KERNEL_ADDRESS	((vaddr_t)-0x00004000)	/* 0xFFFFFFFFFFFFC000 */
 #endif
 #endif
+#define VM_MAXUSER32_ADDRESS	((vaddr_t)-0x7fffffff-1)/* 0xFFFFFFFF80000000 */
 
 /*
  * The address to which unspecified mapping requests default
@@ -173,6 +194,8 @@
 #define __USE_TOPDOWN_VM
 #define VM_DEFAULT_ADDRESS(da, sz) \
 	trunc_page(USRSTACK - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS32(da, sz) \
+	trunc_page(USRSTACK32 - MAXSSIZ32 - (sz))
 
 /* virtual sizes (bytes) for various kernel submaps */
 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)

Reply via email to