141474Smckusick /* 241474Smckusick * Copyright (c) 1988 University of Utah. 341474Smckusick * Copyright (c) 1982, 1990 The Regents of the University of California. 441474Smckusick * All rights reserved. 541474Smckusick * 641474Smckusick * This code is derived from software contributed to Berkeley by 741474Smckusick * the Systems Programming Group of the University of Utah Computer 841474Smckusick * Science Department. 941474Smckusick * 1041474Smckusick * %sccs.include.redist.c% 1141474Smckusick * 12*53928Shibler * from: Utah $Hdr: frame.h 1.7 91/03/25$ 1341474Smckusick * 14*53928Shibler * @(#)frame.h 7.3 (Berkeley) 06/05/92 1541474Smckusick */ 1641474Smckusick 1741474Smckusick struct frame { 1841474Smckusick int f_regs[16]; 1941474Smckusick short f_stackadj; 2041474Smckusick u_short f_sr; 2141474Smckusick u_int f_pc; 2241474Smckusick u_short f_format:4, 2341474Smckusick f_vector:12; 2441474Smckusick union F_u { 2541474Smckusick struct fmt2 { 2641474Smckusick u_int f_iaddr; 2741474Smckusick } F_fmt2; 2841474Smckusick 29*53928Shibler struct fmt3 { 30*53928Shibler u_int f_ea; 31*53928Shibler } F_fmt3; 32*53928Shibler 33*53928Shibler struct fmt7 { 34*53928Shibler u_int f_ea; 35*53928Shibler u_short f_ssw; 36*53928Shibler u_short f_wb3s, f_wb2s, f_wb1s; 37*53928Shibler u_int f_fa; 38*53928Shibler u_int f_wb3a, f_wb3d; 39*53928Shibler u_int f_wb2a, f_wb2d; 40*53928Shibler u_int f_wb1a, f_wb1d; 41*53928Shibler #define f_pd0 f_wb1d 42*53928Shibler u_int f_pd1, f_pd2, f_pd3; 43*53928Shibler } F_fmt7; 44*53928Shibler 4541474Smckusick struct fmt9 { 4641474Smckusick u_int f_iaddr; 4741474Smckusick u_short f_iregs[4]; 4841474Smckusick } F_fmt9; 4941474Smckusick 5041474Smckusick struct fmtA { 5141474Smckusick u_short f_ir0; 5241474Smckusick u_short f_ssw; 5341474Smckusick u_short f_ipsc; 5441474Smckusick u_short f_ipsb; 5541474Smckusick u_int f_dcfa; 5641474Smckusick u_short f_ir1, f_ir2; 5741474Smckusick u_int f_dob; 5841474Smckusick u_short f_ir3, f_ir4; 5941474Smckusick } F_fmtA; 6041474Smckusick 6141474Smckusick struct fmtB { 6241474Smckusick u_short f_ir0; 6341474Smckusick u_short f_ssw; 6441474Smckusick u_short f_ipsc; 6541474Smckusick u_short f_ipsb; 6641474Smckusick u_int f_dcfa; 6741474Smckusick u_short f_ir1, f_ir2; 6841474Smckusick u_int f_dob; 6941474Smckusick u_short f_ir3, f_ir4; 7041474Smckusick u_short f_ir5, f_ir6; 7141474Smckusick u_int f_sba; 7241474Smckusick u_short f_ir7, f_ir8; 7341474Smckusick u_int f_dib; 7441474Smckusick u_short f_iregs[22]; 7541474Smckusick } F_fmtB; 7641474Smckusick } F_u; 7741474Smckusick }; 7841474Smckusick 7941474Smckusick #define f_fmt2 F_u.F_fmt2 80*53928Shibler #define f_fmt3 F_u.F_fmt3 81*53928Shibler #define f_fmt7 F_u.F_fmt7 82*53928Shibler #define f_fmt9 F_u.F_fmt9 8341474Smckusick #define f_fmtA F_u.F_fmtA 8441474Smckusick #define f_fmtB F_u.F_fmtB 8541474Smckusick 8641474Smckusick /* common frame size */ 8741474Smckusick #define CFSIZE (sizeof(struct frame) - sizeof(union F_u)) 8841474Smckusick #define NFMTSIZE 8 8941474Smckusick 9041474Smckusick #define FMT0 0x0 9141474Smckusick #define FMT1 0x1 9241474Smckusick #define FMT2 0x2 93*53928Shibler #define FMT3 0x3 94*53928Shibler #define FMT7 0x7 9541474Smckusick #define FMT9 0x9 9641474Smckusick #define FMTA 0xA 9741474Smckusick #define FMTB 0xB 9841474Smckusick 9941474Smckusick /* frame specific info sizes */ 10041474Smckusick #define FMT0SIZE 0 10141474Smckusick #define FMT1SIZE 0 10241474Smckusick #define FMT2SIZE sizeof(struct fmt2) 103*53928Shibler #define FMT3SIZE sizeof(struct fmt3) 104*53928Shibler #define FMT7SIZE sizeof(struct fmt7) 10541474Smckusick #define FMT9SIZE sizeof(struct fmt9) 10641474Smckusick #define FMTASIZE sizeof(struct fmtA) 10741474Smckusick #define FMTBSIZE sizeof(struct fmtB) 10841474Smckusick 10941474Smckusick #define V_BUSERR 0x008 11041474Smckusick #define V_ADDRERR 0x00C 11141474Smckusick #define V_TRAP1 0x084 11241474Smckusick 113*53928Shibler /* 68020/68030 SSW bits */ 11441474Smckusick #define SSW_RC 0x2000 11541474Smckusick #define SSW_RB 0x1000 11641474Smckusick #define SSW_DF 0x0100 11741474Smckusick #define SSW_RM 0x0080 11841474Smckusick #define SSW_RW 0x0040 11941474Smckusick #define SSW_FCMASK 0x0007 12041474Smckusick 121*53928Shibler /* 68040 SSW bits */ 122*53928Shibler #define SSW4_CP 0x8000 123*53928Shibler #define SSW4_CU 0x4000 124*53928Shibler #define SSW4_CT 0x2000 125*53928Shibler #define SSW4_CM 0x1000 126*53928Shibler #define SSW4_MA 0x0800 127*53928Shibler #define SSW4_ATC 0x0400 128*53928Shibler #define SSW4_LK 0x0200 129*53928Shibler #define SSW4_RW 0x0100 130*53928Shibler #define SSW4_WBSV 0x0080 /* really in WB status, not SSW */ 131*53928Shibler #define SSW4_SZMASK 0x0060 132*53928Shibler #define SSW4_SZLW 0x0000 133*53928Shibler #define SSW4_SZB 0x0020 134*53928Shibler #define SSW4_SZW 0x0040 135*53928Shibler #define SSW4_SZLN 0x0060 136*53928Shibler #define SSW4_TTMASK 0x0018 137*53928Shibler #define SSW4_TTNOR 0x0000 138*53928Shibler #define SSW4_TTM16 0x0008 139*53928Shibler #define SSW4_TMMASK 0x0007 140*53928Shibler #define SSW4_TMDCP 0x0000 141*53928Shibler #define SSW4_TMUD 0x0001 142*53928Shibler #define SSW4_TMUC 0x0002 143*53928Shibler #define SSW4_TMKD 0x0005 144*53928Shibler #define SSW4_TMKC 0x0006 145*53928Shibler 14641474Smckusick struct fpframe { 14741474Smckusick union FPF_u1 { 14841474Smckusick u_int FPF_null; 14941474Smckusick struct { 15041474Smckusick u_char FPF_version; 15141474Smckusick u_char FPF_fsize; 15241474Smckusick u_short FPF_res1; 15341474Smckusick } FPF_nonnull; 15441474Smckusick } FPF_u1; 15541474Smckusick union FPF_u2 { 15641474Smckusick struct fpidle { 15741474Smckusick u_short fpf_ccr; 15841474Smckusick u_short fpf_res2; 15941474Smckusick u_int fpf_iregs1[8]; 16041474Smckusick u_int fpf_xops[3]; 16141474Smckusick u_int fpf_opreg; 16241474Smckusick u_int fpf_biu; 16341474Smckusick } FPF_idle; 16441474Smckusick 16541474Smckusick struct fpbusy { 16641474Smckusick u_int fpf_iregs[53]; 16741474Smckusick } FPF_busy; 168*53928Shibler 169*53928Shibler struct fpunimp { 170*53928Shibler u_int fpf_state[10]; 171*53928Shibler } FPF_unimp; 17241474Smckusick } FPF_u2; 17341474Smckusick u_int fpf_regs[8*3]; 17441474Smckusick u_int fpf_fpcr; 17541474Smckusick u_int fpf_fpsr; 17641474Smckusick u_int fpf_fpiar; 17741474Smckusick }; 17841474Smckusick 17941474Smckusick #define fpf_null FPF_u1.FPF_null 18041474Smckusick #define fpf_version FPF_u1.FPF_nonnull.FPF_version 18141474Smckusick #define fpf_fsize FPF_u1.FPF_nonnull.FPF_fsize 18241474Smckusick #define fpf_res1 FPF_u1.FPF_nonnull.FPF_res1 18341474Smckusick #define fpf_idle FPF_u2.FPF_idle 18441474Smckusick #define fpf_busy FPF_u2.FPF_busy 185*53928Shibler #define fpf_unimp FPF_u2.FPF_unimp 186