1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * 9 * All advertising materials mentioning features or use of this software 10 * must display the following acknowledgement: 11 * This product includes software developed by the University of 12 * California, Lawrence Berkeley Laboratory. 13 * 14 * %sccs.include.redist.c% 15 * 16 * @(#)reg.h 8.1 (Berkeley) 06/11/93 17 * 18 * from: $Header: reg.h,v 1.8 92/11/26 02:04:44 torek Exp $ 19 */ 20 21 #ifndef _MACHINE_REG_H_ 22 #define _MACHINE_REG_H_ 23 24 /* 25 * Registers passed to trap/syscall/etc. 26 * This structure is known to occupy exactly 80 bytes (see locore.s). 27 * Note, tf_global[0] is not actually written (since g0 is always 0). 28 * (The slot tf_global[0] is used to send a copy of %wim to kernel gdb. 29 * This is known as `cheating'.) 30 */ 31 struct trapframe { 32 int tf_psr; /* psr */ 33 int tf_pc; /* return pc */ 34 int tf_npc; /* return npc */ 35 int tf_y; /* %y register */ 36 int tf_global[8]; /* global registers in trap's caller */ 37 int tf_out[8]; /* output registers in trap's caller */ 38 }; 39 40 /* 41 * Register windows. Each stack pointer (%o6 aka %sp) in each window 42 * must ALWAYS point to some place at which it is safe to scribble on 43 * 64 bytes. (If not, your process gets mangled.) Furthermore, each 44 * stack pointer should be aligned on an 8-byte boundary (the kernel 45 * as currently coded allows arbitrary alignment, but with a hefty 46 * performance penalty). 47 */ 48 struct rwindow { 49 int rw_local[8]; /* %l0..%l7 */ 50 int rw_in[8]; /* %i0..%i7 */ 51 }; 52 53 #include <machine/fsr.h> 54 55 /* 56 * FP coprocessor registers. 57 * 58 * FP_QSIZE is the maximum coprocessor instruction queue depth 59 * of any implementation on which the kernel will run. David Hough: 60 * ``I'd suggest allowing 16 ... allowing an indeterminate variable 61 * size would be even better''. Of course, we cannot do that; we 62 * need to malloc these. 63 */ 64 #define FP_QSIZE 16 65 66 struct fp_qentry { 67 int *fq_addr; /* the instruction's address */ 68 int fq_instr; /* the instruction itself */ 69 }; 70 struct fpstate { 71 u_int fs_regs[32]; /* our view is 32 32-bit registers */ 72 int fs_fsr; /* %fsr */ 73 int fs_qsize; /* actual queue depth */ 74 struct fp_qentry fs_queue[FP_QSIZE]; /* queue contents */ 75 }; 76 77 #endif /* _MACHINE_REG_H_ */ 78