*
* %sccs.include.noredist.c%
*
- * @(#)vmparam.h 5.1 (Berkeley) %G%
+ * @(#)vmparam.h 5.3 (Berkeley) %G%
*/
/*
* region begins with user text and ends with user data.
* Immediately after the user structure is the kernal address space.
*/
+
#define USRTEXT 0
#define USRSTACK 0xFDFFE000 /* Sysbase - UPAGES*NBPG */
#define BTOPUSRSTACK (0xFE000-(UPAGES)) /* btop(USRSTACK) */
#define SYSPTSIZE (2*NPTEPG)
#define USRPTSIZE (2*NPTEPG)
+/*
+ * Size of User Raw I/O map
+ */
+#define USRIOSIZE 30
+
/*
* The size of the clock loop.
*/
* { wfj 6/16/89: Retail AT memory expansion $800/megabyte, loan of $17
* on disk costing $7/mb or $0.18 (in memory still 100:1 in cost!) }
*/
-#define SAFERSS 32 /* nominal ``small'' resident set size
+#define SAFERSS 8 /* nominal ``small'' resident set size
protected against replacement */
/*
#define LOTSOFMEM 2
#define mapin(pte, v, pfnum, prot) \
- (*(int *)(pte) = ((pfnum)<<PGSHIFT) | (prot))
+ {(*(int *)(pte) = ((pfnum)<<PGSHIFT) | (prot)); tlbflush(); }
/*
* Invalidate a cluster (optimized here for standard CLSIZE).
#if CLSIZE == 1
#define tbiscl(v)
#endif
+
+/*
+ * inline assembler macros
+ */
+
+/*
+ * Flush MMU TLB
+ */
+
+#define tlbflush() asm(" movl %%cr3,%%eax; movl %%eax,%%cr3 " ::: "ax")
+
+#ifndef I386_CR3PAT
+#define I386_CR3PAT 0x0
+#endif
+
+#define _cr3() ({u_long rtn; \
+ asm (" movl %%cr3,%%eax; movl %%eax,%0 " \
+ : "=g" (rtn) \
+ : \
+ : "ax"); \
+ rtn; \
+})
+
+#define load_cr3(s) ({ u_long val; \
+ val = (s) | I386_CR3PAT; \
+ asm ("movl %0,%%eax; movl %%eax,%%cr3" \
+ : \
+ : "g" (val) \
+ : "ax"); \
+})