proc.h revision 1.13 1 /* $NetBSD: proc.h,v 1.13 2003/09/18 05:26:43 skd Exp $ */
2
3 /*
4 * Copyright (c) 1994, 1995 Carnegie-Mellon University.
5 * All rights reserved.
6 *
7 * Author: Chris G. Demetriou
8 *
9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation.
14 *
15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 *
19 * Carnegie Mellon requests users of this software to return to
20 *
21 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
25 *
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
28 */
29
30 #ifndef _ALPHA_PROC_H
31 #define _ALPHA_PROC_H
32
33 #include <machine/frame.h>
34
35 /* breakpoints for single stepping */
36 struct mdbpt {
37 vaddr_t addr;
38 u_int32_t contents;
39 };
40
41 /*
42 * Machine-dependent part of the lwp struct for the Alpha.
43 */
44 struct mdlwp {
45 u_long md_flags;
46 struct trapframe *md_tf; /* trap/syscall registers */
47 struct pcb *md_pcbpaddr; /* phys addr of the pcb */
48 struct mdbpt md_sstep[2]; /* two single step breakpoints */
49 };
50 /*
51 * md_flags usage
52 * --------------
53 * MDP_FPUSED
54 * A largely unused bit indicating the presence of FPU history.
55 * Cleared on exec. Set but not used by the fpu context switcher
56 * itself.
57 *
58 * MDP_FP_C
59 * The architected FP Control word. It should forever begin at bit 1,
60 * as the bits are AARM specified and this way it doesn't need to be
61 * shifted.
62 *
63 * Until C99 there was never an IEEE 754 API, making most of the
64 * standard useless. Because of overlapping AARM, OSF/1, NetBSD, and
65 * C99 API's, the use of the MDP_FP_C bits is defined variously in
66 * ieeefp.h and fpu.h.
67 *
68 * MDP_STEP1 Single stepping (emulation) is set and the target
69 * instruction is not a branch. md_step[0] contains the destination.
70 *
71 * MDP_STEP2 Single stepping (emulation) is set and the target
72 * instruction is a branch. The two breakpoints in the md_step
73 * array represent the possible destinations, and both must be
74 * cleaned up when the breakpoint trap is taken.
75 *
76 */
77 #define MDP_FPUSED 0x00000001 /* Process used the FPU */
78 #define MDP_FP_C 0x007ffffe /* Extended FP_C Quadword bits */
79 #define MDP_STEP1 0x80000000 /* Single step normal instruction */
80 #define MDP_STEP2 0x40000000 /* Single step branch instruction */
81 /*
82 * Machine-dependent part of the proc struct for the Alpha.
83 */
84 struct lwp;
85 struct mdproc {
86 /* this process's syscall vector */
87 void (*md_syscall)(struct lwp *, u_int64_t, struct trapframe *);
88 __volatile int md_astpending; /* AST pending for this process */
89 };
90
91
92 #endif /* !_ALPHA_PROC_H_ */
93