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 #ident "$Id: frame.h,v 1.1 1993/09/29 06:09:22 briggs Exp $"
     39 
     40 /*
     41  * from: Utah $Hdr: frame.h 1.1 90/07/09$
     42  *
     43  *	@(#)frame.h	7.2 (Berkeley) 11/2/90
     44  */
     45 
     46 struct frame {
     47 	int	f_regs[16];
     48 	short	f_stackadj;
     49 	u_short	f_sr;
     50 	u_int	f_pc;
     51 	u_short	f_format:4,
     52 		f_vector:12;
     53 	union F_u {
     54 		struct fmt2 {
     55 			u_int	f_iaddr;
     56 		} F_fmt2;
     57 
     58 		struct fmt9 {
     59 			u_int	f_iaddr;
     60 			u_short	f_iregs[4];
     61 		} F_fmt9;
     62 
     63 		struct fmtA {
     64 			u_short	f_ir0;
     65 			u_short	f_ssw;
     66 			u_short	f_ipsc;
     67 			u_short	f_ipsb;
     68 			u_int	f_dcfa;
     69 			u_short	f_ir1, f_ir2;
     70 			u_int	f_dob;
     71 			u_short	f_ir3, f_ir4;
     72 		} F_fmtA;
     73 
     74 		struct fmtB {
     75 			u_short	f_ir0;
     76 			u_short	f_ssw;
     77 			u_short	f_ipsc;
     78 			u_short	f_ipsb;
     79 			u_int	f_dcfa;
     80 			u_short	f_ir1, f_ir2;
     81 			u_int	f_dob;
     82 			u_short	f_ir3, f_ir4;
     83 			u_short	f_ir5, f_ir6;
     84 			u_int	f_sba;
     85 			u_short	f_ir7, f_ir8;
     86 			u_int	f_dib;
     87 			u_short	f_iregs[22];
     88 		} F_fmtB;
     89 	} F_u;
     90 };
     91 
     92 #define	f_fmt2		F_u.F_fmt2
     93 #define	f_fmtA		F_u.F_fmtA
     94 #define	f_fmtB		F_u.F_fmtB
     95 
     96 /* common frame size */
     97 #define	CFSIZE		(sizeof(struct frame) - sizeof(union F_u))
     98 #define	NFMTSIZE	8
     99 
    100 #define	FMT0		0x0
    101 #define	FMT1		0x1
    102 #define	FMT2		0x2
    103 #define	FMT9		0x9
    104 #define	FMTA		0xA
    105 #define	FMTB		0xB
    106 
    107 /* frame specific info sizes */
    108 #define	FMT0SIZE	0
    109 #define	FMT1SIZE	0
    110 #define	FMT2SIZE	sizeof(struct fmt2)
    111 #define	FMT9SIZE	sizeof(struct fmt9)
    112 #define	FMTASIZE	sizeof(struct fmtA)
    113 #define	FMTBSIZE	sizeof(struct fmtB)
    114 
    115 #define	V_BUSERR	0x008
    116 #define	V_ADDRERR	0x00C
    117 #define	V_TRAP1		0x084
    118 
    119 #define	SSW_RC		0x2000
    120 #define	SSW_RB		0x1000
    121 #define	SSW_DF		0x0100
    122 #define	SSW_RM		0x0080
    123 #define	SSW_RW		0x0040
    124 #define	SSW_FCMASK	0x0007
    125 
    126 struct fpframe {
    127 	union FPF_u1 {
    128 		u_int	FPF_null;
    129 		struct {
    130 			u_char	FPF_version;
    131 			u_char	FPF_fsize;
    132 			u_short	FPF_res1;
    133 		} FPF_nonnull;
    134 	} FPF_u1;
    135 	union FPF_u2 {
    136 		struct fpidle {
    137 			u_short	fpf_ccr;
    138 			u_short	fpf_res2;
    139 			u_int	fpf_iregs1[8];
    140 			u_int	fpf_xops[3];
    141 			u_int	fpf_opreg;
    142 			u_int	fpf_biu;
    143 		} FPF_idle;
    144 
    145 		struct fpbusy {
    146 			u_int	fpf_iregs[53];
    147 		} FPF_busy;
    148 	} FPF_u2;
    149 	u_int	fpf_regs[8*3];
    150 	u_int	fpf_fpcr;
    151 	u_int	fpf_fpsr;
    152 	u_int	fpf_fpiar;
    153 };
    154 
    155 #define fpf_null	FPF_u1.FPF_null
    156 #define fpf_version	FPF_u1.FPF_nonnull.FPF_version
    157 #define fpf_fsize	FPF_u1.FPF_nonnull.FPF_fsize
    158 #define fpf_res1	FPF_u1.FPF_nonnull.FPF_res1
    159 #define fpf_idle	FPF_u2.FPF_idle
    160 #define fpf_busy	FPF_u2.FPF_busy
    161