The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/mips/include/vmparam.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $OpenBSD: vmparam.h,v 1.2 1998/09/15 10:50:12 pefo Exp $        */
    2 /*      $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $  */
    3 
    4 /*
    5  * Copyright (c) 1988 University of Utah.
    6  * Copyright (c) 1992, 1993
    7  *      The Regents of the University of California.  All rights reserved.
    8  *
    9  * This code is derived from software contributed to Berkeley by
   10  * the Systems Programming Group of the University of Utah Computer
   11  * Science Department and Ralph Campbell.
   12  *
   13  * Redistribution and use in source and binary forms, with or without
   14  * modification, are permitted provided that the following conditions
   15  * are met:
   16  * 1. Redistributions of source code must retain the above copyright
   17  *    notice, this list of conditions and the following disclaimer.
   18  * 2. Redistributions in binary form must reproduce the above copyright
   19  *    notice, this list of conditions and the following disclaimer in the
   20  *    documentation and/or other materials provided with the distribution.
   21  * 4. Neither the name of the University nor the names of its contributors
   22  *    may be used to endorse or promote products derived from this software
   23  *    without specific prior written permission.
   24  *
   25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   35  * SUCH DAMAGE.
   36  *
   37  *      from: Utah Hdr: vmparam.h 1.16 91/01/18
   38  *      @(#)vmparam.h   8.2 (Berkeley) 4/22/94
   39  *      JNPR: vmparam.h,v 1.3.2.1 2007/09/10 06:01:28 girish
   40  * $FreeBSD: releng/10.2/sys/mips/include/vmparam.h 285634 2015-07-16 14:41:58Z kib $
   41  */
   42 
   43 #ifndef _MACHINE_VMPARAM_H_
   44 #define _MACHINE_VMPARAM_H_
   45 
   46 /*
   47  * Machine dependent constants mips processors.
   48  */
   49 
   50 /*
   51  * Virtual memory related constants, all in bytes
   52  */
   53 #ifndef MAXTSIZ
   54 #define MAXTSIZ         (128UL*1024*1024)       /* max text size */
   55 #endif
   56 #ifndef DFLDSIZ
   57 #define DFLDSIZ         (128UL*1024*1024)       /* initial data size limit */
   58 #endif
   59 #ifndef MAXDSIZ
   60 #define MAXDSIZ         (1*1024UL*1024*1024)    /* max data size */
   61 #endif
   62 #ifndef DFLSSIZ
   63 #define DFLSSIZ         (8UL*1024*1024)         /* initial stack size limit */
   64 #endif
   65 #ifndef MAXSSIZ
   66 #define MAXSSIZ         (64UL*1024*1024)        /* max stack size */
   67 #endif
   68 #ifndef SGROWSIZ
   69 #define SGROWSIZ        (128UL*1024)            /* amount to grow stack */
   70 #endif
   71 
   72 /*
   73  * Mach derived constants
   74  */
   75 
   76 /* user/kernel map constants */
   77 #define VM_MIN_ADDRESS          ((vm_offset_t)0x00000000)
   78 #define VM_MAX_ADDRESS          ((vm_offset_t)(intptr_t)(int32_t)0xffffffff)
   79 
   80 #define VM_MINUSER_ADDRESS      ((vm_offset_t)0x00000000)
   81 
   82 #ifdef __mips_n64
   83 #define VM_MAXUSER_ADDRESS      (VM_MINUSER_ADDRESS + (NPDEPG * NBSEG))
   84 #define VM_MIN_KERNEL_ADDRESS   ((vm_offset_t)0xc000000000000000)
   85 #define VM_MAX_KERNEL_ADDRESS   (VM_MIN_KERNEL_ADDRESS + (NPDEPG * NBSEG))
   86 #else
   87 #define VM_MAXUSER_ADDRESS      ((vm_offset_t)0x80000000)
   88 #define VM_MIN_KERNEL_ADDRESS   ((vm_offset_t)0xC0000000)
   89 #define VM_MAX_KERNEL_ADDRESS   ((vm_offset_t)0xFFFFC000)
   90 #endif
   91 
   92 #define KERNBASE                ((vm_offset_t)(intptr_t)(int32_t)0x80000000)
   93 /*
   94  * USRSTACK needs to start a little below 0x8000000 because the R8000
   95  * and some QED CPUs perform some virtual address checks before the
   96  * offset is calculated.
   97  */
   98 #define USRSTACK                (VM_MAXUSER_ADDRESS - PAGE_SIZE)
   99 #ifdef __mips_n64
  100 #define FREEBSD32_USRSTACK      (((vm_offset_t)0x80000000) - PAGE_SIZE)
  101 #endif
  102 
  103 /*
  104  * Disable superpage reservations. (not sure if this is right
  105  * I copied it from ARM)
  106  */
  107 #ifndef VM_NRESERVLEVEL
  108 #define VM_NRESERVLEVEL         0
  109 #endif
  110 
  111 /*
  112  * How many physical pages per kmem arena virtual page.
  113  */
  114 #ifndef VM_KMEM_SIZE_SCALE
  115 #define VM_KMEM_SIZE_SCALE      (3)
  116 #endif
  117 
  118 /*
  119  * Optional floor (in bytes) on the size of the kmem arena.
  120  */
  121 #ifndef VM_KMEM_SIZE_MIN
  122 #define VM_KMEM_SIZE_MIN        (12 * 1024 * 1024)
  123 #endif
  124 
  125 /*
  126  * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the
  127  * kernel map.
  128  */
  129 #ifndef VM_KMEM_SIZE_MAX
  130 #define VM_KMEM_SIZE_MAX        ((VM_MAX_KERNEL_ADDRESS - \
  131     VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
  132 #endif
  133 
  134 /* initial pagein size of beginning of executable file */
  135 #ifndef VM_INITIAL_PAGEIN
  136 #define VM_INITIAL_PAGEIN       16
  137 #endif
  138 
  139 #define UMA_MD_SMALL_ALLOC
  140 
  141 /*
  142  * max number of non-contig chunks of physical RAM you can have
  143  */
  144 #define VM_PHYSSEG_MAX          32
  145 
  146 /*
  147  * The physical address space is sparsely populated.
  148  */
  149 #define VM_PHYSSEG_SPARSE
  150 
  151 /*
  152  * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool
  153  * from which physical pages are allocated and VM_FREEPOOL_DIRECT is
  154  * the pool from which physical pages for small UMA objects are
  155  * allocated.
  156  */
  157 #define VM_NFREEPOOL            3
  158 #define VM_FREEPOOL_CACHE       2
  159 #define VM_FREEPOOL_DEFAULT     0
  160 #define VM_FREEPOOL_DIRECT      1
  161 
  162 /*
  163  * Create up to two free lists on !__mips_n64: VM_FREELIST_DEFAULT is for
  164  * physical pages that are above the largest physical address that is
  165  * accessible through the direct map (KSEG0) and VM_FREELIST_LOWMEM is for
  166  * physical pages that are below that address.  VM_LOWMEM_BOUNDARY is the
  167  * physical address for the end of the direct map (KSEG0).
  168  */
  169 #ifdef __mips_n64
  170 #define VM_NFREELIST            1
  171 #define VM_FREELIST_DEFAULT     0
  172 #define VM_FREELIST_DIRECT      VM_FREELIST_DEFAULT
  173 #else
  174 #define VM_NFREELIST            2
  175 #define VM_FREELIST_DEFAULT     0
  176 #define VM_FREELIST_LOWMEM      1
  177 #define VM_FREELIST_DIRECT      VM_FREELIST_LOWMEM
  178 #define VM_LOWMEM_BOUNDARY      ((vm_paddr_t)0x20000000)
  179 #endif
  180 
  181 /*
  182  * The largest allocation size is 1MB.
  183  */
  184 #define VM_NFREEORDER           9
  185 
  186 #define ZERO_REGION_SIZE        (64 * 1024)     /* 64KB */
  187 
  188 #endif /* !_MACHINE_VMPARAM_H_ */

Cache object: 1d02376329157f44a222dbec650039f9


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.