Home | History | Annotate | Line # | Download | only in include
frame.h revision 1.1
      1 /*
      2  * Copyright (c) 1988 University of Utah.
      3  * Copyright (c) 1982, 1990 The Regents of the University of California.
      4  * All rights reserved.
      5  *
      6  * This code is derived from software contributed to Berkeley by
      7  * the Systems Programming Group of the University of Utah Computer
      8  * Science Department.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  * 3. All advertising materials mentioning features or use of this software
     19  *    must display the following acknowledgement:
     20  *	This product includes software developed by the University of
     21  *	California, Berkeley and its contributors.
     22  * 4. Neither the name of the University nor the names of its contributors
     23  *    may be used to endorse or promote products derived from this software
     24  *    without specific prior written permission.
     25  *
     26  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36  * SUCH DAMAGE.
     37  *
     38  * from: Utah $Hdr: frame.h 1.1 90/07/09$
     39  *
     40  *	from: @(#)frame.h	7.2 (Berkeley) 11/2/90
     41  *	frame.h,v 1.2 1993/05/22 07:58:21 cgd Exp
     42  */
     43 
     44 struct frame {
     45 	int	f_regs[16];
     46 	short	f_stackadj;
     47 	u_short	f_sr;
     48 	u_int	f_pc;
     49 	u_short	f_format:4,
     50 		f_vector:12;
     51 	union F_u {
     52 		struct fmt2 {
     53 			u_int	f_iaddr;
     54 		} F_fmt2;
     55 
     56 		struct fmt9 {
     57 			u_int	f_iaddr;
     58 			u_short	f_iregs[4];
     59 		} F_fmt9;
     60 
     61 		struct fmtA {
     62 			u_short	f_ir0;
     63 			u_short	f_ssw;
     64 			u_short	f_ipsc;
     65 			u_short	f_ipsb;
     66 			u_int	f_dcfa;
     67 			u_short	f_ir1, f_ir2;
     68 			u_int	f_dob;
     69 			u_short	f_ir3, f_ir4;
     70 		} F_fmtA;
     71 
     72 		struct fmtB {
     73 			u_short	f_ir0;
     74 			u_short	f_ssw;
     75 			u_short	f_ipsc;
     76 			u_short	f_ipsb;
     77 			u_int	f_dcfa;
     78 			u_short	f_ir1, f_ir2;
     79 			u_int	f_dob;
     80 			u_short	f_ir3, f_ir4;
     81 			u_short	f_ir5, f_ir6;
     82 			u_int	f_sba;
     83 			u_short	f_ir7, f_ir8;
     84 			u_int	f_dib;
     85 			u_short	f_iregs[22];
     86 		} F_fmtB;
     87 	} F_u;
     88 };
     89 
     90 #define	f_fmt2		F_u.F_fmt2
     91 #define	f_fmtA		F_u.F_fmtA
     92 #define	f_fmtB		F_u.F_fmtB
     93 
     94 /* common frame size */
     95 #define	CFSIZE		(sizeof(struct frame) - sizeof(union F_u))
     96 #define	NFMTSIZE	8
     97 
     98 #define	FMT0		0x0
     99 #define	FMT1		0x1
    100 #define	FMT2		0x2
    101 #define	FMT9		0x9
    102 #define	FMTA		0xA
    103 #define	FMTB		0xB
    104 
    105 /* frame specific info sizes */
    106 #define	FMT0SIZE	0
    107 #define	FMT1SIZE	0
    108 #define	FMT2SIZE	sizeof(struct fmt2)
    109 #define	FMT9SIZE	sizeof(struct fmt9)
    110 #define	FMTASIZE	sizeof(struct fmtA)
    111 #define	FMTBSIZE	sizeof(struct fmtB)
    112 
    113 #define	V_BUSERR	0x008
    114 #define	V_ADDRERR	0x00C
    115 #define	V_TRAP1		0x084
    116 
    117 #define	SSW_RC		0x2000
    118 #define	SSW_RB		0x1000
    119 #define	SSW_DF		0x0100
    120 #define	SSW_RM		0x0080
    121 #define	SSW_RW		0x0040
    122 #define	SSW_FCMASK	0x0007
    123 
    124 struct fpframe {
    125 	union FPF_u1 {
    126 		u_int	FPF_null;
    127 		struct {
    128 			u_char	FPF_version;
    129 			u_char	FPF_fsize;
    130 			u_short	FPF_res1;
    131 		} FPF_nonnull;
    132 	} FPF_u1;
    133 	union FPF_u2 {
    134 		struct fpidle {
    135 			u_short	fpf_ccr;
    136 			u_short	fpf_res2;
    137 			u_int	fpf_iregs1[8];
    138 			u_int	fpf_xops[3];
    139 			u_int	fpf_opreg;
    140 			u_int	fpf_biu;
    141 		} FPF_idle;
    142 
    143 		struct fpbusy {
    144 			u_int	fpf_iregs[53];
    145 		} FPF_busy;
    146 	} FPF_u2;
    147 	u_int	fpf_regs[8*3];
    148 	u_int	fpf_fpcr;
    149 	u_int	fpf_fpsr;
    150 	u_int	fpf_fpiar;
    151 };
    152 
    153 #define fpf_null	FPF_u1.FPF_null
    154 #define fpf_version	FPF_u1.FPF_nonnull.FPF_version
    155 #define fpf_fsize	FPF_u1.FPF_nonnull.FPF_fsize
    156 #define fpf_res1	FPF_u1.FPF_nonnull.FPF_res1
    157 #define fpf_idle	FPF_u2.FPF_idle
    158 #define fpf_busy	FPF_u2.FPF_busy
    159