reg.h revision 1.4
1/*	$OpenBSD: reg.h,v 1.4 1999/04/20 19:50:19 mickey Exp $	*/
2
3/*
4 * Copyright (c) 1998 Michael Shalayeff
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 *    must display the following acknowledgement:
17 *	This product includes software developed by Michael Shalayeff.
18 * 4. The name of the author may not be used to endorse or promote products
19 *    derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/*
33 * Copyright (c) 1990,1994 The University of Utah and
34 * the Computer Systems Laboratory at the University of Utah (CSL).
35 * All rights reserved.
36 *
37 * Permission to use, copy, modify and distribute this software is hereby
38 * granted provided that (1) source code retains these copyright, permission,
39 * and disclaimer notices, and (2) redistributions including binaries
40 * reproduce the notices in supporting documentation, and (3) all advertising
41 * materials mentioning features or use of this software display the following
42 * acknowledgement: ``This product includes software developed by the
43 * Computer Systems Laboratory at the University of Utah.''
44 *
45 * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
46 * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
47 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
48 *
49 * CSL requests users of this software to return to csl-dist@cs.utah.edu any
50 * improvements that they make and grant CSL redistribution rights.
51 *
52 * 	Utah $Hdr: regs.h 1.6 94/12/14$
53 *	Author: Bob Wheeler, University of Utah CSL
54 */
55
56#ifndef _MACHINE_REG_H_
57#define _MACHINE_REG_H_
58
59/*
60 * constants for registers for use with the following routines:
61 *
62 *     void mtctl(reg, value)	- move to control register
63 *     int mfctl(reg)		- move from control register
64 *     int mtsp(sreg, value)	- move to space register
65 *     int mfsr(sreg)		- move from space register
66 */
67
68#define	CR_RCTR		0
69#define	CR_PIDR1	8
70#define	CR_PIDR2	9
71#define	CR_CCR		10
72#define	CR_SAR		11
73#define	CR_PIDR3	12
74#define	CR_PIDR4	13
75#define	CR_IVA		14
76#define	CR_EIEM		15
77#define	CR_ITMR		16
78#define	CR_PCSQ		17
79#define	CR_PCOQ		18
80#define	CR_IIR		19
81#define	CR_ISR		20
82#define	CR_IOR		21
83#define	CR_IPSW		22
84#define	CR_EIRR		23
85#define	CR_HPTMASK	24
86#define	CR_VTOP		25
87#define	CR_TR2		26
88#define	CR_TR3		27
89#define	CR_TR4		28
90#define	CR_TR5		29
91#define	CR_TR6		30
92#define	CR_TR7		31
93
94#define CCR_MASK 0xff
95
96#define	HPPA_NREGS	(32)
97#define	HPPA_NFPREGS	(32)
98
99#ifndef _LOCORE
100
101struct reg {
102	u_int32_t r_regs[HPPA_NREGS];
103	/* p'bably some cr* ? */
104};
105
106struct fpreg {
107	u_int64_t fpr_regs[HPPA_NFPREGS];
108};
109#endif /* !_LOCORE */
110
111#endif /* _MACHINE_REG_H_ */
112