rspctl.h
3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
/*
* File: rspctl.h
* Creator: hsa@sgi.com
* Create Date: Wed Feb 9 09:33:23 PST 1994
*
*/
#ifndef _rsp_rspctl_h_
#define _rsp_rspctl_h_ 1
/*
* The RSP clock.
*/
extern u32 rsp_clock;
/*
* The RSP PC, points into the instruction cache.
*/
extern u32 rsp_programCounter;
/*
* The RSP control register, accessible to the host processor.
*/
#define rsp_CtlHaltMask SP_STATUS_HALT /* for backwards-compatability */
/* these are in rcp.h */
extern u32 rsp_controlReg;
/*
* RSP step functions, implemented in each module, they execute one clock
* step. Each module installs these during their own init.
*/
typedef boolean (*rsp_stepProc_t)(void);
#define rsp_STEP_PROC_MAX 128
extern rsp_stepProc_t rsp_procStepProcs[rsp_STEP_PROC_MAX];
/*
* reset processor state.
*/
extern void rsp_ProcessorReset(int pc);
/*
* RSP control logic initialize.
*/
extern void rsp_ProcessorInit(void);
/*
* This function is called form other modules, it installs
* a 'step' routine, that will be executed once per clock tick.
*/
extern void rsp_ProcessorStepInstall(rsp_stepProc_t StepProc);
/*
* This function is called to install a breakpoint at the
* specified address or clock value.
*/
extern void rsp_ProcessorBreakpointInstall(u32 where, boolean isAddr);
/*
* enable (or disable) a breakpoint.
*/
extern void rsp_ProcessorBreakpointEnable(int bp, boolean doEnable);
/*
* init breakpoint commands.
*/
extern void rsp_ProcessorBreakpointCmdInit(int bp);
/*
* install a command at a breakpoint.
*/
extern void rsp_ProcessorBreakpointCmdInstall(int bp, char *string);
/*
* list out all the breakpoints.
*/
extern void rsp_ProcessorBreakpointList(FILE *out);
/*
* This function is called to install a memory watchpoint at the
* specified address.
*/
extern void rsp_ProcessorWatchpointInstall(u32 where);
extern boolean rsp_ProcessorSlip(boolean doClock);
/*
* Step RSP one clock tick.
*/
extern boolean rsp_ProcessorStep(void);
/*
* Step RSP one instruction.
*/
extern boolean rsp_ProcessorSStep(void);
/*
* Run RSP (until breakpoint or completion)
*/
extern void rsp_ProcessorRun(void);
/*
* this function sets the value when a jump/branch
* needs to set the PC.
*/
extern void rsp_PCSet(u32 addr, int clockDelay);
extern boolean rsp_SULockReg(int reg);
extern boolean rsp_SURegIsLocked(int reg);
#endif