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

Annotation of sys/arch/m88k/include/pcb.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: pcb.h,v 1.4 2007/01/13 22:00:56 miod Exp $ */
        !             2: /*
        !             3:  * Copyright (c) 1996 Nivas Madhur
        !             4:  * Mach Operating System
        !             5:  * Copyright (c) 1993-1992 Carnegie Mellon University
        !             6:  * All Rights Reserved.
        !             7:  *
        !             8:  * Permission to use, copy, modify and distribute this software and its
        !             9:  * documentation is hereby granted, provided that both the copyright
        !            10:  * notice and this permission notice appear in all copies of the
        !            11:  * software, derivative works or modified versions, and any portions
        !            12:  * thereof, and that both notices appear in supporting documentation.
        !            13:  *
        !            14:  * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            15:  * CONDITION.  CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
        !            16:  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            17:  *
        !            18:  * Carnegie Mellon requests users of this software to return to
        !            19:  *
        !            20:  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
        !            21:  *  School of Computer Science
        !            22:  *  Carnegie Mellon University
        !            23:  *  Pittsburgh PA 15213-3890
        !            24:  *
        !            25:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            26:  * the rights to redistribute these changes.
        !            27:  */
        !            28: /*
        !            29:  * Motorola 88100 pcb definitions
        !            30:  *
        !            31:  */
        !            32: /*
        !            33:  */
        !            34: #ifndef _M88K_PCB_H_
        !            35: #define _M88K_PCB_H_
        !            36:
        !            37: #include <machine/frame.h>
        !            38:
        !            39: /*
        !            40:  * Our PCB is the regular PCB+Save area for kernel frame.
        !            41:  * Upon entering kernel mode from user land, save the user context
        !            42:  * in the saved_state area - this is passed as the exception frame.
        !            43:  * On a context switch, only registers that need to be saved by the
        !            44:  * C calling convention and few other regs (pc, psr etc) are saved
        !            45:  * in the kernel_state part of the PCB. Typically, trap frames are
        !            46:  * saved on the stack (by low level handlers or by hardware) but,
        !            47:  * we just decided to do it in the PCB.
        !            48:  */
        !            49:
        !            50: struct m88100_pcb {
        !            51:        unsigned pcb_pc;        /* address to return */
        !            52:        unsigned :32;
        !            53:        unsigned pcb_r14;
        !            54:        unsigned pcb_r15;
        !            55:        unsigned pcb_r16;
        !            56:        unsigned pcb_r17;
        !            57:        unsigned pcb_r18;
        !            58:        unsigned pcb_r19;
        !            59:        unsigned pcb_r20;
        !            60:        unsigned pcb_r21;
        !            61:        unsigned pcb_r22;
        !            62:        unsigned pcb_r23;
        !            63:        unsigned pcb_r24;
        !            64:        unsigned pcb_r25;
        !            65:        unsigned pcb_r26;
        !            66:        unsigned pcb_r27;
        !            67:        unsigned pcb_r28;
        !            68:        unsigned pcb_r29;
        !            69:        unsigned pcb_r30;
        !            70:        unsigned pcb_sp;        /* kernel stack pointer */
        !            71:        /* floating-point state */
        !            72:        unsigned pcb_fcr62;
        !            73:        unsigned pcb_fcr63;
        !            74: };
        !            75:
        !            76: struct pcb
        !            77: {
        !            78:        struct m88100_pcb       kernel_state;
        !            79:        struct trapframe        user_state;
        !            80:        int                     pcb_onfault;
        !            81: };
        !            82:
        !            83: /*
        !            84:  *     Location of saved user registers for the proc.
        !            85:  */
        !            86: #define        USER_REGS(p) \
        !            87:        (((struct reg *)(&((p)->p_addr->u_pcb.user_state))))
        !            88:
        !            89: /*
        !            90:  * The pcb is augmented with machine-dependent additional data for
        !            91:  * core dumps.  Note that the trapframe here is a copy of the one
        !            92:  * from the top of the kernel stack (included here so that the kernel
        !            93:  * stack itself need not be dumped).
        !            94:  */
        !            95: struct md_coredump {
        !            96:        struct  trapframe md_tf;
        !            97: };
        !            98:
        !            99: #endif /* _M88K_PCB_H_ */

CVSweb