PERFORCE change 101194 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Mon Jul 10 11:29:19 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101194

Change 101194 by gonzo at gonzo_hq on 2006/07/10 11:28:30

	o Removed bits of i386/arm code. Replaced with proper defines.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/include/vmparam.h#4 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/include/vmparam.h#4 (text+ko) ====

@@ -46,27 +46,32 @@
 #define	_MACHINE_VMPARAM_H_ 1
 
 /*
- * Machine dependent constants for AMD64.
+ * USRSTACK needs to start a little below 0x8000000 because the R8000
+ * and some QED CPUs perform some virtual address checks before the
+ * offset is calculated.
  */
+#define	USRSTACK	0x7ffff000		/* Start of user stack */
 
 /*
  * Virtual memory related constants, all in bytes
  */
-#define	MAXTSIZ		(128UL*1024*1024)	/* max text size */
+#ifndef MAXTSIZ
+#define	MAXTSIZ		(64*1024*1024)		/* max text size */
+#endif
 #ifndef DFLDSIZ
-#define	DFLDSIZ		(128UL*1024*1024)	/* initial data size limit */
+#define	DFLDSIZ		(128*1024*1024)		/* initial data size limit */
 #endif
 #ifndef MAXDSIZ
-#define	MAXDSIZ		(32768UL*1024*1024)	/* max data size */
+#define	MAXDSIZ		(512*1024*1024)		/* max data size */
 #endif
 #ifndef	DFLSSIZ
-#define	DFLSSIZ		(8UL*1024*1024)		/* initial stack size limit */
+#define	DFLSSIZ		(2*1024*1024)		/* initial stack size limit */
 #endif
 #ifndef	MAXSSIZ
-#define	MAXSSIZ		(512UL*1024*1024)	/* max stack size */
+#define	MAXSSIZ		(32*1024*1024)		/* max stack size */
 #endif
 #ifndef SGROWSIZ
-#define	SGROWSIZ	(128UL*1024)		/* amount to grow stack */
+#define	SGROWSIZ	(128*1024)		/* amount to grow stack */
 #endif
 
 /*
@@ -81,62 +86,29 @@
 #define	MAXSLP 		20
 
 /*
- * We provide a machine specific single page allocator through the use
- * of the direct mapped segment.  This uses 2MB pages for reduced
- * TLB pressure.
+ * MIPS provides a machine specific single page allocator through the use
+ * of KSEG0.
  */
+#define UMA_MD_SMALL_ALLOC
+
 /*
- * XXXMIPS: Fix this! Those pieces on i386 family use internal structures from
- * VM subsystem in order to get proper addresses and sizesof critical places.
+ * Mach derived constants
  */
-#define	UMA_MD_SMALL_ALLOC
 
-#define	DMAP_MIN_ADDRESS	(0)
-#define	DMAP_MAX_ADDRESS	(0)
+/* user/kernel map constants */
+#ifndef VM_INITIAL_PAGEIN
+#define	VM_INITIAL_PAGEIN	16
+#endif
+#define VM_MIN_ADDRESS		((vm_offset_t)0x0000000000001000)
+#define VM_MAXUSER_ADDRESS	((vm_offset_t)0x0000000100000000)
+#define VM_MAX_ADDRESS		((vm_offset_t)0x0000000100000000)
+#define VM_MIN_KERNEL_ADDRESS	((vm_offset_t)MIPS_KSEG0_START)
+#define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)MIPS_KSEG1_START-1)
+#define	KERNBASE		(VM_MIN_KERNEL_ADDRESS)
 
-#define	KERNBASE		0xc0000000
-
-#define	VM_MIN_KERNEL_ADDRESS	KERNBASE
-#define	VM_MAX_KERNEL_ADDRESS	0xffffffff
-
-
-#define	UPT_MAX_ADDRESS		KVADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I)
-#define	UPT_MIN_ADDRESS		KVADDR(PML4PML4I, 0, 0, 0)
-
-#define	VM_MAXUSER_ADDRESS	KERNBASE
-
-#define	USRSTACK		VM_MAXUSER_ADDRESS
-
-#define	VM_MAX_ADDRESS		UPT_MAX_ADDRESS
-#define	VM_MIN_ADDRESS		(0)
-
-#define	PHYS_TO_DMAP(x)		((x) | DMAP_MIN_ADDRESS)
-#define	DMAP_TO_PHYS(x)		((x) & ~DMAP_MIN_ADDRESS)
-
 /* virtual sizes (bytes) for various kernel submaps */
-#ifndef VM_KMEM_SIZE
-#define	VM_KMEM_SIZE		(12 * 1024 * 1024)
-#endif
+#define	VM_KMEM_SIZE		(16*1024*1024)		/* XXX ??? */
 
-/*
- * How many physical pages per KVA page allocated.
- * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
- * is the total KVA space allocated for kmem_map.
- */
-#ifndef VM_KMEM_SIZE_SCALE
-#define	VM_KMEM_SIZE_SCALE	(3)
-#endif
 
-/*
- * Ceiling on amount of kmem_map kva space.
- */
-#ifndef VM_KMEM_SIZE_MAX
-#define	VM_KMEM_SIZE_MAX	(400 * 1024 * 1024)
-#endif
-
-/* initial pagein size of beginning of executable file */
-#ifndef VM_INITIAL_PAGEIN
-#define	VM_INITIAL_PAGEIN	16
-#endif
 
 #endif /* _MACHINE_VMPARAM_H_ */


More information about the p4-projects mailing list