home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / i386 / param.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-22  |  3.1 KB  |  129 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon 
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    param.h,v $
  29.  * Revision 2.1  92/04/21  17:18:51  rwd
  30.  * BSDSS
  31.  * 
  32.  *
  33.  */
  34.  
  35. /*
  36.  * Machine dependent constants for I386
  37.  */
  38. /*
  39.  * Base address for U*X system call emulator.
  40.  */
  41. #define    EMULATOR_BASE    0xa0000000
  42. #define    EMULATOR_END    0xa0040000
  43.                 /* 256 Kbytes */
  44.  
  45. /*
  46.  * Define base for user mapped files
  47.  */
  48.  
  49. #define MAP_FILE_BASE    0x90000000
  50.  
  51. /*
  52.  * i386 stack sits above emulator.
  53.  */
  54. #define    EMULATOR_ABOVE_STACK    0
  55.  
  56. #define USRTEXT        0x0
  57.  
  58. #define    USRSTACK    0xc0000000
  59. #define TRAMPOLINE_MAX_SIZE    0x100
  60.  
  61. /*
  62.  * Virtual memory related constants, all in bytes
  63.  */
  64. #ifndef    MAXTSIZ
  65. #define MAXTSIZ        (6*1024*1024)        /* max text size */
  66. #endif
  67. #ifndef    DFLDSIZ
  68. #define DFLDSIZ        (6*1024*1024)        /* initial data size limit */
  69. #endif
  70. #ifndef    MAXDSIZ
  71. #define MAXDSIZ        (16*1024*1024)        /* max data size */
  72. #endif
  73. #ifndef    DFLSSIZ
  74. #define DFLSSIZ        (512*1024)        /* initial stack size limit */
  75. #endif
  76. #ifndef    MAXSSIZ
  77. #define MAXSSIZ        MAXDSIZ            /* max stack size */
  78. #endif
  79.  
  80. #define    MAXPHYS        (64 * 1024)    /* max raw I/O transfer size */
  81. #define    CLSIZE        1
  82. #define    CLSIZELOG2    0
  83.  
  84. #define    NBPG        4096        /* bytes/page */
  85. #define    PGSHIFT        12        /* LOG2(NBPG) */
  86.  
  87. #define    MSIZE        128        /* size of an mbuf */
  88. #define    MCLBYTES    1024
  89. #define    MCLSHIFT    10
  90. #define    MCLOFSET    (MCLBYTES - 1)
  91. #define UPAGES        2
  92.  
  93. #define    DEV_BSIZE    512
  94. #define    DEV_BSHIFT    9        /* log2(DEV_BSIZE) */
  95.  
  96. #ifndef NMBCLUSTERS
  97. #ifdef GATEWAY
  98. #define    NMBCLUSTERS    512        /* map size, max cluster allocation */
  99. #else
  100. #define    NMBCLUSTERS    256        /* map size, max cluster allocation */
  101. #endif
  102. #endif
  103.  
  104. /*
  105.  * Some macros for units conversion
  106.  */
  107. /* Core clicks (4096 bytes) to segments and vice versa */
  108. #define    ctos(x)    (x)
  109. #define    stoc(x)    (x)
  110.  
  111. /* Core clicks (4096 bytes) to disk blocks */
  112. #define    ctod(x)    ((x)<<(PGSHIFT-DEV_BSHIFT))
  113. #define    dtoc(x)    ((x)>>(PGSHIFT-DEV_BSHIFT))
  114. #define    dtob(x)    ((x)<<DEV_BSHIFT)
  115.  
  116. /* clicks to bytes */
  117. #define    ctob(x)    ((x)<<PGSHIFT)
  118.  
  119. /* bytes to clicks */
  120. #define    btoc(x)    (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
  121.  
  122. #define    btodb(bytes)             /* calculates (bytes / DEV_BSIZE) */ \
  123.     ((unsigned)(bytes) >> DEV_BSHIFT)
  124. #define    dbtob(db)            /* calculates (db * DEV_BSIZE) */ \
  125.     ((unsigned)(db) << DEV_BSHIFT)
  126.  
  127. #include <mach/i386/vm_param.h>
  128.  
  129.