1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)pcb.h 5.6 (Berkeley) 01/18/91 11 */ 12 13 /* 14 * Intel 386 process control block 15 */ 16 #include "tss.h" 17 #include "npx.h" 18 19 struct pcb { 20 struct i386tss pcbtss; 21 #define pcb_ksp pcbtss.tss_esp0 22 #define pcb_ptd pcbtss.tss_cr3 23 #define pcb_cr3 pcb_ptd 24 #define pcb_pc pcbtss.tss_eip 25 #define pcb_psl pcbtss.tss_eflags 26 #define pcb_usp pcbtss.tss_esp 27 #define pcb_fp pcbtss.tss_ebp 28 /* 29 * Software pcb (extension) 30 */ 31 int pcb_flags; 32 #define FP_WASUSED 0x1 /* floating point has been used in this proc */ 33 #define FP_NEEDSSAVE 0x2 /* needs save on next context switch */ 34 #define FP_NEEDSRESTORE 0x4 /* need restore on next DNA fault */ 35 #define FP_USESEMC 0x8 /* process uses EMC memory-mapped mode */ 36 struct save87 pcb_savefpu; 37 struct emcsts pcb_saveemc; 38 struct pte *pcb_p0br; 39 struct pte *pcb_p1br; 40 int pcb_p0lr; 41 int pcb_p1lr; 42 int pcb_szpt; /* number of pages of user page table */ 43 int pcb_cmap2; 44 int *pcb_sswap; 45 long pcb_sigc[8]; 46 int pcb_iml; /* interrupt mask level */ 47 }; 48