From owner-p4-projects@FreeBSD.ORG Mon Jul 10 11:29:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D868916A4DD; Mon, 10 Jul 2006 11:29:18 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B23116A4DF for ; Mon, 10 Jul 2006 11:29:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D70C43D7E for ; Mon, 10 Jul 2006 11:29:03 +0000 (GMT) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6ABT3Eo057728 for ; Mon, 10 Jul 2006 11:29:03 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6ABT3qg057725 for perforce@freebsd.org; Mon, 10 Jul 2006 11:29:03 GMT (envelope-from gonzo@FreeBSD.org) Date: Mon, 10 Jul 2006 11:29:03 GMT Message-Id: <200607101129.k6ABT3qg057725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 101194 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2006 11:29:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=101194 Change 101194 by gonzo@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_ */