Home | History | Annotate | Line # | Download | only in include
frame.h revision 1.6
      1  1.1      cgd /*
      2  1.1      cgd  * Copyright (c) 1988 University of Utah.
      3  1.6  mycroft  * Copyright (c) 1982, 1990, 1993
      4  1.6  mycroft  *	The Regents of the University of California.  All rights reserved.
      5  1.1      cgd  *
      6  1.1      cgd  * This code is derived from software contributed to Berkeley by
      7  1.1      cgd  * the Systems Programming Group of the University of Utah Computer
      8  1.1      cgd  * Science Department.
      9  1.1      cgd  *
     10  1.1      cgd  * Redistribution and use in source and binary forms, with or without
     11  1.1      cgd  * modification, are permitted provided that the following conditions
     12  1.1      cgd  * are met:
     13  1.1      cgd  * 1. Redistributions of source code must retain the above copyright
     14  1.1      cgd  *    notice, this list of conditions and the following disclaimer.
     15  1.1      cgd  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1      cgd  *    notice, this list of conditions and the following disclaimer in the
     17  1.1      cgd  *    documentation and/or other materials provided with the distribution.
     18  1.1      cgd  * 3. All advertising materials mentioning features or use of this software
     19  1.1      cgd  *    must display the following acknowledgement:
     20  1.1      cgd  *	This product includes software developed by the University of
     21  1.1      cgd  *	California, Berkeley and its contributors.
     22  1.1      cgd  * 4. Neither the name of the University nor the names of its contributors
     23  1.1      cgd  *    may be used to endorse or promote products derived from this software
     24  1.1      cgd  *    without specific prior written permission.
     25  1.1      cgd  *
     26  1.1      cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27  1.1      cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28  1.1      cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29  1.1      cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30  1.1      cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31  1.1      cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32  1.1      cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33  1.1      cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34  1.1      cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35  1.1      cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36  1.1      cgd  * SUCH DAMAGE.
     37  1.1      cgd  *
     38  1.6  mycroft  * from: Utah $Hdr: frame.h 1.8 92/12/20$
     39  1.6  mycroft  *
     40  1.6  mycroft  *	@(#)frame.h	8.1 (Berkeley) 6/10/93
     41  1.1      cgd  */
     42  1.1      cgd 
     43  1.1      cgd struct frame {
     44  1.1      cgd 	int	f_regs[16];
     45  1.6  mycroft 	short	f_pad;
     46  1.1      cgd 	short	f_stackadj;
     47  1.1      cgd 	u_short	f_sr;
     48  1.1      cgd 	u_int	f_pc;
     49  1.1      cgd 	u_short	f_format:4,
     50  1.1      cgd 		f_vector:12;
     51  1.1      cgd 	union F_u {
     52  1.1      cgd 		struct fmt2 {
     53  1.1      cgd 			u_int	f_iaddr;
     54  1.1      cgd 		} F_fmt2;
     55  1.1      cgd 
     56  1.4       mw 		struct fmt3 {
     57  1.6  mycroft 			u_int	f_ea;
     58  1.4       mw 		} F_fmt3;
     59  1.4       mw 
     60  1.4       mw 		struct fmt7 {
     61  1.4       mw 			u_int	f_ea;
     62  1.4       mw 			u_short	f_ssw;
     63  1.6  mycroft 			u_short	f_wb3s, f_wb2s, f_wb1s;
     64  1.4       mw 			u_int	f_fa;
     65  1.6  mycroft 			u_int	f_wb3a, f_wb3d;
     66  1.6  mycroft 			u_int	f_wb2a, f_wb2d;
     67  1.6  mycroft 			u_int	f_wb1a, f_wb1d;
     68  1.6  mycroft #define				f_pd0 f_wb1d
     69  1.6  mycroft 			u_int	f_pd1, f_pd2, f_pd3;
     70  1.4       mw 		} F_fmt7;
     71  1.4       mw 
     72  1.1      cgd 		struct fmt9 {
     73  1.1      cgd 			u_int	f_iaddr;
     74  1.1      cgd 			u_short	f_iregs[4];
     75  1.1      cgd 		} F_fmt9;
     76  1.1      cgd 
     77  1.1      cgd 		struct fmtA {
     78  1.1      cgd 			u_short	f_ir0;
     79  1.1      cgd 			u_short	f_ssw;
     80  1.1      cgd 			u_short	f_ipsc;
     81  1.1      cgd 			u_short	f_ipsb;
     82  1.1      cgd 			u_int	f_dcfa;
     83  1.1      cgd 			u_short	f_ir1, f_ir2;
     84  1.1      cgd 			u_int	f_dob;
     85  1.1      cgd 			u_short	f_ir3, f_ir4;
     86  1.1      cgd 		} F_fmtA;
     87  1.1      cgd 
     88  1.1      cgd 		struct fmtB {
     89  1.1      cgd 			u_short	f_ir0;
     90  1.1      cgd 			u_short	f_ssw;
     91  1.1      cgd 			u_short	f_ipsc;
     92  1.1      cgd 			u_short	f_ipsb;
     93  1.1      cgd 			u_int	f_dcfa;
     94  1.1      cgd 			u_short	f_ir1, f_ir2;
     95  1.1      cgd 			u_int	f_dob;
     96  1.1      cgd 			u_short	f_ir3, f_ir4;
     97  1.1      cgd 			u_short	f_ir5, f_ir6;
     98  1.1      cgd 			u_int	f_sba;
     99  1.1      cgd 			u_short	f_ir7, f_ir8;
    100  1.1      cgd 			u_int	f_dib;
    101  1.1      cgd 			u_short	f_iregs[22];
    102  1.1      cgd 		} F_fmtB;
    103  1.1      cgd 	} F_u;
    104  1.1      cgd };
    105  1.1      cgd 
    106  1.1      cgd #define	f_fmt2		F_u.F_fmt2
    107  1.6  mycroft #define	f_fmt3		F_u.F_fmt3
    108  1.4       mw #define	f_fmt7		F_u.F_fmt7
    109  1.6  mycroft #define	f_fmt9		F_u.F_fmt9
    110  1.1      cgd #define	f_fmtA		F_u.F_fmtA
    111  1.1      cgd #define	f_fmtB		F_u.F_fmtB
    112  1.1      cgd 
    113  1.1      cgd /* common frame size */
    114  1.1      cgd #define	CFSIZE		(sizeof(struct frame) - sizeof(union F_u))
    115  1.1      cgd #define	NFMTSIZE	8
    116  1.1      cgd 
    117  1.1      cgd #define	FMT0		0x0
    118  1.1      cgd #define	FMT1		0x1
    119  1.1      cgd #define	FMT2		0x2
    120  1.4       mw #define	FMT3		0x3
    121  1.4       mw #define	FMT7		0x7
    122  1.1      cgd #define	FMT9		0x9
    123  1.1      cgd #define	FMTA		0xA
    124  1.1      cgd #define	FMTB		0xB
    125  1.1      cgd 
    126  1.1      cgd /* frame specific info sizes */
    127  1.1      cgd #define	FMT0SIZE	0
    128  1.1      cgd #define	FMT1SIZE	0
    129  1.1      cgd #define	FMT2SIZE	sizeof(struct fmt2)
    130  1.4       mw #define	FMT3SIZE	sizeof(struct fmt3)
    131  1.4       mw #define	FMT7SIZE	sizeof(struct fmt7)
    132  1.1      cgd #define	FMT9SIZE	sizeof(struct fmt9)
    133  1.1      cgd #define	FMTASIZE	sizeof(struct fmtA)
    134  1.1      cgd #define	FMTBSIZE	sizeof(struct fmtB)
    135  1.1      cgd 
    136  1.1      cgd #define	V_BUSERR	0x008
    137  1.1      cgd #define	V_ADDRERR	0x00C
    138  1.1      cgd #define	V_TRAP1		0x084
    139  1.1      cgd 
    140  1.6  mycroft /* 68020/68030 SSW bits */
    141  1.1      cgd #define	SSW_RC		0x2000
    142  1.1      cgd #define	SSW_RB		0x1000
    143  1.1      cgd #define	SSW_DF		0x0100
    144  1.1      cgd #define	SSW_RM		0x0080
    145  1.1      cgd #define	SSW_RW		0x0040
    146  1.1      cgd #define	SSW_FCMASK	0x0007
    147  1.1      cgd 
    148  1.6  mycroft /* 68040 SSW bits */
    149  1.6  mycroft #define	SSW4_CP		0x8000
    150  1.6  mycroft #define	SSW4_CU		0x4000
    151  1.6  mycroft #define	SSW4_CT		0x2000
    152  1.6  mycroft #define	SSW4_CM		0x1000
    153  1.6  mycroft #define	SSW4_MA		0x0800
    154  1.6  mycroft #define	SSW4_ATC	0x0400
    155  1.6  mycroft #define	SSW4_LK		0x0200
    156  1.6  mycroft #define	SSW4_RW		0x0100
    157  1.6  mycroft #define SSW4_WBSV	0x0080	/* really in WB status, not SSW */
    158  1.6  mycroft #define	SSW4_SZMASK	0x0060
    159  1.6  mycroft #define	SSW4_SZLW	0x0000
    160  1.6  mycroft #define	SSW4_SZB	0x0020
    161  1.6  mycroft #define	SSW4_SZW	0x0040
    162  1.6  mycroft #define	SSW4_SZLN	0x0060
    163  1.6  mycroft #define	SSW4_TTMASK	0x0018
    164  1.6  mycroft #define	SSW4_TTNOR	0x0000
    165  1.6  mycroft #define	SSW4_TTM16	0x0008
    166  1.6  mycroft #define	SSW4_TMMASK	0x0007
    167  1.6  mycroft #define	SSW4_TMDCP	0x0000
    168  1.6  mycroft #define	SSW4_TMUD	0x0001
    169  1.6  mycroft #define	SSW4_TMUC	0x0002
    170  1.6  mycroft #define	SSW4_TMKD	0x0005
    171  1.6  mycroft #define	SSW4_TMKC	0x0006
    172  1.6  mycroft 
    173  1.1      cgd struct fpframe {
    174  1.1      cgd 	union FPF_u1 {
    175  1.1      cgd 		u_int	FPF_null;
    176  1.1      cgd 		struct {
    177  1.1      cgd 			u_char	FPF_version;
    178  1.1      cgd 			u_char	FPF_fsize;
    179  1.1      cgd 			u_short	FPF_res1;
    180  1.1      cgd 		} FPF_nonnull;
    181  1.1      cgd 	} FPF_u1;
    182  1.1      cgd 	union FPF_u2 {
    183  1.1      cgd 		struct fpidle {
    184  1.1      cgd 			u_short	fpf_ccr;
    185  1.1      cgd 			u_short	fpf_res2;
    186  1.1      cgd 			u_int	fpf_iregs1[8];
    187  1.1      cgd 			u_int	fpf_xops[3];
    188  1.1      cgd 			u_int	fpf_opreg;
    189  1.1      cgd 			u_int	fpf_biu;
    190  1.1      cgd 		} FPF_idle;
    191  1.1      cgd 
    192  1.1      cgd 		struct fpbusy {
    193  1.1      cgd 			u_int	fpf_iregs[53];
    194  1.1      cgd 		} FPF_busy;
    195  1.4       mw 
    196  1.6  mycroft 		struct fpunimp {
    197  1.6  mycroft 			u_int	fpf_state[10];
    198  1.6  mycroft 		} FPF_unimp;
    199  1.1      cgd 	} FPF_u2;
    200  1.1      cgd 	u_int	fpf_regs[8*3];
    201  1.1      cgd 	u_int	fpf_fpcr;
    202  1.1      cgd 	u_int	fpf_fpsr;
    203  1.1      cgd 	u_int	fpf_fpiar;
    204  1.1      cgd };
    205  1.1      cgd 
    206  1.1      cgd #define fpf_null	FPF_u1.FPF_null
    207  1.1      cgd #define fpf_version	FPF_u1.FPF_nonnull.FPF_version
    208  1.1      cgd #define fpf_fsize	FPF_u1.FPF_nonnull.FPF_fsize
    209  1.1      cgd #define fpf_res1	FPF_u1.FPF_nonnull.FPF_res1
    210  1.1      cgd #define fpf_idle	FPF_u2.FPF_idle
    211  1.1      cgd #define fpf_busy	FPF_u2.FPF_busy
    212  1.6  mycroft #define fpf_unimp	FPF_u2.FPF_unimp
    213