141474Smckusick /* 241474Smckusick * Copyright (c) 1988 University of Utah. 3*63160Sbostic * Copyright (c) 1982, 1990, 1993 4*63160Sbostic * The Regents of the University of California. 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 * 1257318Shibler * from: Utah $Hdr: frame.h 1.8 92/12/20$ 1341474Smckusick * 14*63160Sbostic * @(#)frame.h 8.1 (Berkeley) 06/10/93 1541474Smckusick */ 1641474Smckusick 1741474Smckusick struct frame { 1841474Smckusick int f_regs[16]; 1957318Shibler short f_pad; 2041474Smckusick short f_stackadj; 2141474Smckusick u_short f_sr; 2241474Smckusick u_int f_pc; 2341474Smckusick u_short f_format:4, 2441474Smckusick f_vector:12; 2541474Smckusick union F_u { 2641474Smckusick struct fmt2 { 2741474Smckusick u_int f_iaddr; 2841474Smckusick } F_fmt2; 2941474Smckusick 3053928Shibler struct fmt3 { 3153928Shibler u_int f_ea; 3253928Shibler } F_fmt3; 3353928Shibler 3453928Shibler struct fmt7 { 3553928Shibler u_int f_ea; 3653928Shibler u_short f_ssw; 3753928Shibler u_short f_wb3s, f_wb2s, f_wb1s; 3853928Shibler u_int f_fa; 3953928Shibler u_int f_wb3a, f_wb3d; 4053928Shibler u_int f_wb2a, f_wb2d; 4153928Shibler u_int f_wb1a, f_wb1d; 4253928Shibler #define f_pd0 f_wb1d 4353928Shibler u_int f_pd1, f_pd2, f_pd3; 4453928Shibler } F_fmt7; 4553928Shibler 4641474Smckusick struct fmt9 { 4741474Smckusick u_int f_iaddr; 4841474Smckusick u_short f_iregs[4]; 4941474Smckusick } F_fmt9; 5041474Smckusick 5141474Smckusick struct fmtA { 5241474Smckusick u_short f_ir0; 5341474Smckusick u_short f_ssw; 5441474Smckusick u_short f_ipsc; 5541474Smckusick u_short f_ipsb; 5641474Smckusick u_int f_dcfa; 5741474Smckusick u_short f_ir1, f_ir2; 5841474Smckusick u_int f_dob; 5941474Smckusick u_short f_ir3, f_ir4; 6041474Smckusick } F_fmtA; 6141474Smckusick 6241474Smckusick struct fmtB { 6341474Smckusick u_short f_ir0; 6441474Smckusick u_short f_ssw; 6541474Smckusick u_short f_ipsc; 6641474Smckusick u_short f_ipsb; 6741474Smckusick u_int f_dcfa; 6841474Smckusick u_short f_ir1, f_ir2; 6941474Smckusick u_int f_dob; 7041474Smckusick u_short f_ir3, f_ir4; 7141474Smckusick u_short f_ir5, f_ir6; 7241474Smckusick u_int f_sba; 7341474Smckusick u_short f_ir7, f_ir8; 7441474Smckusick u_int f_dib; 7541474Smckusick u_short f_iregs[22]; 7641474Smckusick } F_fmtB; 7741474Smckusick } F_u; 7841474Smckusick }; 7941474Smckusick 8041474Smckusick #define f_fmt2 F_u.F_fmt2 8153928Shibler #define f_fmt3 F_u.F_fmt3 8253928Shibler #define f_fmt7 F_u.F_fmt7 8353928Shibler #define f_fmt9 F_u.F_fmt9 8441474Smckusick #define f_fmtA F_u.F_fmtA 8541474Smckusick #define f_fmtB F_u.F_fmtB 8641474Smckusick 8741474Smckusick /* common frame size */ 8841474Smckusick #define CFSIZE (sizeof(struct frame) - sizeof(union F_u)) 8941474Smckusick #define NFMTSIZE 8 9041474Smckusick 9141474Smckusick #define FMT0 0x0 9241474Smckusick #define FMT1 0x1 9341474Smckusick #define FMT2 0x2 9453928Shibler #define FMT3 0x3 9553928Shibler #define FMT7 0x7 9641474Smckusick #define FMT9 0x9 9741474Smckusick #define FMTA 0xA 9841474Smckusick #define FMTB 0xB 9941474Smckusick 10041474Smckusick /* frame specific info sizes */ 10141474Smckusick #define FMT0SIZE 0 10241474Smckusick #define FMT1SIZE 0 10341474Smckusick #define FMT2SIZE sizeof(struct fmt2) 10453928Shibler #define FMT3SIZE sizeof(struct fmt3) 10553928Shibler #define FMT7SIZE sizeof(struct fmt7) 10641474Smckusick #define FMT9SIZE sizeof(struct fmt9) 10741474Smckusick #define FMTASIZE sizeof(struct fmtA) 10841474Smckusick #define FMTBSIZE sizeof(struct fmtB) 10941474Smckusick 11041474Smckusick #define V_BUSERR 0x008 11141474Smckusick #define V_ADDRERR 0x00C 11241474Smckusick #define V_TRAP1 0x084 11341474Smckusick 11453928Shibler /* 68020/68030 SSW bits */ 11541474Smckusick #define SSW_RC 0x2000 11641474Smckusick #define SSW_RB 0x1000 11741474Smckusick #define SSW_DF 0x0100 11841474Smckusick #define SSW_RM 0x0080 11941474Smckusick #define SSW_RW 0x0040 12041474Smckusick #define SSW_FCMASK 0x0007 12141474Smckusick 12253928Shibler /* 68040 SSW bits */ 12353928Shibler #define SSW4_CP 0x8000 12453928Shibler #define SSW4_CU 0x4000 12553928Shibler #define SSW4_CT 0x2000 12653928Shibler #define SSW4_CM 0x1000 12753928Shibler #define SSW4_MA 0x0800 12853928Shibler #define SSW4_ATC 0x0400 12953928Shibler #define SSW4_LK 0x0200 13053928Shibler #define SSW4_RW 0x0100 13153928Shibler #define SSW4_WBSV 0x0080 /* really in WB status, not SSW */ 13253928Shibler #define SSW4_SZMASK 0x0060 13353928Shibler #define SSW4_SZLW 0x0000 13453928Shibler #define SSW4_SZB 0x0020 13553928Shibler #define SSW4_SZW 0x0040 13653928Shibler #define SSW4_SZLN 0x0060 13753928Shibler #define SSW4_TTMASK 0x0018 13853928Shibler #define SSW4_TTNOR 0x0000 13953928Shibler #define SSW4_TTM16 0x0008 14053928Shibler #define SSW4_TMMASK 0x0007 14153928Shibler #define SSW4_TMDCP 0x0000 14253928Shibler #define SSW4_TMUD 0x0001 14353928Shibler #define SSW4_TMUC 0x0002 14453928Shibler #define SSW4_TMKD 0x0005 14553928Shibler #define SSW4_TMKC 0x0006 14653928Shibler 14741474Smckusick struct fpframe { 14841474Smckusick union FPF_u1 { 14941474Smckusick u_int FPF_null; 15041474Smckusick struct { 15141474Smckusick u_char FPF_version; 15241474Smckusick u_char FPF_fsize; 15341474Smckusick u_short FPF_res1; 15441474Smckusick } FPF_nonnull; 15541474Smckusick } FPF_u1; 15641474Smckusick union FPF_u2 { 15741474Smckusick struct fpidle { 15841474Smckusick u_short fpf_ccr; 15941474Smckusick u_short fpf_res2; 16041474Smckusick u_int fpf_iregs1[8]; 16141474Smckusick u_int fpf_xops[3]; 16241474Smckusick u_int fpf_opreg; 16341474Smckusick u_int fpf_biu; 16441474Smckusick } FPF_idle; 16541474Smckusick 16641474Smckusick struct fpbusy { 16741474Smckusick u_int fpf_iregs[53]; 16841474Smckusick } FPF_busy; 16953928Shibler 17053928Shibler struct fpunimp { 17153928Shibler u_int fpf_state[10]; 17253928Shibler } FPF_unimp; 17341474Smckusick } FPF_u2; 17441474Smckusick u_int fpf_regs[8*3]; 17541474Smckusick u_int fpf_fpcr; 17641474Smckusick u_int fpf_fpsr; 17741474Smckusick u_int fpf_fpiar; 17841474Smckusick }; 17941474Smckusick 18041474Smckusick #define fpf_null FPF_u1.FPF_null 18141474Smckusick #define fpf_version FPF_u1.FPF_nonnull.FPF_version 18241474Smckusick #define fpf_fsize FPF_u1.FPF_nonnull.FPF_fsize 18341474Smckusick #define fpf_res1 FPF_u1.FPF_nonnull.FPF_res1 18441474Smckusick #define fpf_idle FPF_u2.FPF_idle 18541474Smckusick #define fpf_busy FPF_u2.FPF_busy 18653928Shibler #define fpf_unimp FPF_u2.FPF_unimp 187