[BACK]Return to pcb.h CVS log [TXT][DIR] Up to [local] / sys / arch / i386 / include

Annotation of sys/arch/i386/include/pcb.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: pcb.h,v 1.13 2004/07/02 16:29:55 niklas Exp $ */
                      2: /*     $NetBSD: pcb.h,v 1.21 1996/01/08 13:51:42 mycroft Exp $ */
                      3:
                      4: /*-
                      5:  * Copyright (c) 1995 Charles M. Hannum.  All rights reserved.
                      6:  * Copyright (c) 1990 The Regents of the University of California.
                      7:  * All rights reserved.
                      8:  *
                      9:  * This code is derived from software contributed to Berkeley by
                     10:  * William Jolitz.
                     11:  *
                     12:  * Redistribution and use in source and binary forms, with or without
                     13:  * modification, are permitted provided that the following conditions
                     14:  * are met:
                     15:  * 1. Redistributions of source code must retain the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer.
                     17:  * 2. Redistributions in binary form must reproduce the above copyright
                     18:  *    notice, this list of conditions and the following disclaimer in the
                     19:  *    documentation and/or other materials provided with the distribution.
                     20:  * 3. Neither the name of the University nor the names of its contributors
                     21:  *    may be used to endorse or promote products derived from this software
                     22:  *    without specific prior written permission.
                     23:  *
                     24:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     25:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     26:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     27:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     28:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     29:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     30:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     31:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     32:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     33:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     34:  * SUCH DAMAGE.
                     35:  *
                     36:  *     @(#)pcb.h       5.10 (Berkeley) 5/12/91
                     37:  */
                     38:
                     39: /*
                     40:  * Intel 386 process control block
                     41:  */
                     42:
                     43: #ifndef _I386_PCB_H_
                     44: #define _I386_PCB_H_
                     45:
                     46: #include <sys/signal.h>
                     47:
                     48: #include <machine/segments.h>
                     49: #include <machine/tss.h>
                     50: #include <machine/npx.h>
                     51: #include <machine/sysarch.h>
                     52:
                     53: #define        NIOPORTS        1024            /* # of ports we allow to be mapped */
                     54:
                     55: struct pcb {
                     56:        struct  i386tss pcb_tss;
                     57: #define        pcb_cr3 pcb_tss.tss_cr3
                     58: #define        pcb_esp pcb_tss.tss_esp
                     59: #define        pcb_ebp pcb_tss.tss_ebp
                     60: #define        pcb_cs  pcb_tss.tss_cs
                     61: #define        pcb_ldt_sel     pcb_tss.tss_ldt
                     62:        int     pcb_tss_sel;
                     63:        union   descriptor *pcb_ldt;    /* per process (user) LDT */
                     64:        int     pcb_ldt_len;            /*      number of LDT entries */
                     65:        int     pcb_cr0;                /* saved image of CR0 */
                     66:        int     pcb_pad[2];             /* savefpu on 16-byte boundary */
                     67:        union   savefpu pcb_savefpu;    /* floating point state for FPU */
                     68:        struct  emcsts pcb_saveemc;     /* Cyrix EMC state */
                     69: /*
                     70:  * Software pcb (extension)
                     71:  */
                     72:        caddr_t pcb_onfault;            /* copyin/out fault recovery */
                     73:        int     vm86_eflags;            /* virtual eflags for vm86 mode */
                     74:        int     vm86_flagmask;          /* flag mask for vm86 mode */
                     75:        void    *vm86_userp;            /* XXX performance hack */
                     76:        struct  pmap *pcb_pmap;         /* back pointer to our pmap */
                     77:        struct  cpu_info *pcb_fpcpu;    /* cpu holding our fpu state */
                     78:        u_long  pcb_iomap[NIOPORTS/32]; /* I/O bitmap */
                     79:        u_char  pcb_iomap_pad;  /* required; must be 0xff, says intel */
                     80: };
                     81:
                     82: /*
                     83:  * The pcb is augmented with machine-dependent additional data for
                     84:  * core dumps. For the i386, there is nothing to add.
                     85:  */
                     86: struct md_coredump {
                     87:        long    md_pad[8];
                     88: };
                     89:
                     90: #endif /* _I386_PCB_H_ */

CVSweb