1 | /* |
---|
2 | |
---|
3 | Based upon IDT provided code with the following release: |
---|
4 | |
---|
5 | This source code has been made available to you by IDT on an AS-IS |
---|
6 | basis. Anyone receiving this source is licensed under IDT copyrights |
---|
7 | to use it in any way he or she deems fit, including copying it, |
---|
8 | modifying it, compiling it, and redistributing it either with or |
---|
9 | without modifications. No license under IDT patents or patent |
---|
10 | applications is to be implied by the copyright license. |
---|
11 | |
---|
12 | Any user of this software should understand that IDT cannot provide |
---|
13 | technical support for this software and will not be responsible for |
---|
14 | any consequences resulting from the use of this software. |
---|
15 | |
---|
16 | Any person who transfers this source code or any derivative work must |
---|
17 | include the IDT copyright notice, this paragraph, and the preceeding |
---|
18 | two paragraphs in the transferred software. |
---|
19 | |
---|
20 | COPYRIGHT IDT CORPORATION 1996 |
---|
21 | LICENSED MATERIAL - PROGRAM PROPERTY OF IDT |
---|
22 | |
---|
23 | */ |
---|
24 | |
---|
25 | /* |
---|
26 | ** idtmon.h - General header file for the IDT Prom Monitor |
---|
27 | ** |
---|
28 | ** Copyright 1989 Integrated Device Technology, Inc. |
---|
29 | ** All Rights Reserved. |
---|
30 | ** |
---|
31 | ** June 1989 - D.Cahoon |
---|
32 | */ |
---|
33 | #ifndef __IDTMON_H__ |
---|
34 | #define __IDTMON_H__ |
---|
35 | |
---|
36 | /* |
---|
37 | ** P_STACKSIZE is the size of the Prom Stack. |
---|
38 | ** the prom stack grows downward |
---|
39 | */ |
---|
40 | #define P_STACKSIZE 0x2000 /* sets stack size to 8k */ |
---|
41 | |
---|
42 | /* |
---|
43 | ** M_BUSWIDTH |
---|
44 | ** Memory bus width (including bank interleaving) in bytes |
---|
45 | ** used when doing memory sizing to prevent bus capacitance |
---|
46 | ** reporting ghost memory locations |
---|
47 | */ |
---|
48 | #if defined(CPU_R3000) |
---|
49 | #define M_BUSWIDTH 8 /* 32bit memory bank interleaved */ |
---|
50 | #endif |
---|
51 | #if defined(CPU_R4000) |
---|
52 | #define M_BUSWIDTH 16 /* 64 bit memory bank interleaved */ |
---|
53 | #endif |
---|
54 | |
---|
55 | /* |
---|
56 | ** this is the default value for the number of bytes to add in calculating |
---|
57 | ** the checksums in the checksum command |
---|
58 | */ |
---|
59 | #define CHK_SUM_CNT 0x20000 /* number of bytes to calc chksum for */ |
---|
60 | |
---|
61 | /* |
---|
62 | ** Monitor modes |
---|
63 | */ |
---|
64 | #define MODE_MONITOR 5 /* IDT Prom Monitor is executing */ |
---|
65 | #define MODE_USER 0xa /* USER is executing */ |
---|
66 | |
---|
67 | /* |
---|
68 | ** memory reference widths |
---|
69 | */ |
---|
70 | #define SW_BYTE 1 |
---|
71 | #define SW_HALFWORD 2 |
---|
72 | #define SW_WORD 4 |
---|
73 | #define SW_TRIBYTEL 12 |
---|
74 | #define SW_TRIBYTER 20 |
---|
75 | |
---|
76 | #ifdef CPU_R4000 |
---|
77 | /* |
---|
78 | ** definitions for select_cache call |
---|
79 | */ |
---|
80 | #define DCACHE 0 |
---|
81 | #define ICACHE 1 |
---|
82 | #define SCACHE 2 |
---|
83 | |
---|
84 | #endif |
---|
85 | |
---|
86 | #if defined (CLANGUAGE) || defined(_LANGUAGE_C) |
---|
87 | typedef struct { |
---|
88 | unsigned int mem_size; |
---|
89 | unsigned int icache_size; |
---|
90 | unsigned int dcache_size; |
---|
91 | #ifdef CPU_R4000 |
---|
92 | unsigned int scache_size; |
---|
93 | #endif |
---|
94 | |
---|
95 | } mem_config; |
---|
96 | |
---|
97 | #endif CLANGUAGE || defined(_LANGUAGE_C) |
---|
98 | |
---|
99 | /* |
---|
100 | ** general equates for diagnostics and boolean functions |
---|
101 | */ |
---|
102 | #define PASS 0 |
---|
103 | #define FAIL 1 |
---|
104 | |
---|
105 | #ifndef TRUE |
---|
106 | #define TRUE 1 |
---|
107 | #endif TRUE |
---|
108 | #ifndef NULL |
---|
109 | #define NULL 0 |
---|
110 | #endif NULL |
---|
111 | |
---|
112 | #ifndef FALSE |
---|
113 | #define FALSE 0 |
---|
114 | #endif FALSE |
---|
115 | |
---|
116 | |
---|
117 | /* |
---|
118 | ** portablility equates |
---|
119 | */ |
---|
120 | |
---|
121 | #ifndef BOOL |
---|
122 | #define BOOL unsigned int |
---|
123 | #endif BOOL |
---|
124 | |
---|
125 | #ifndef GLOBAL |
---|
126 | #define GLOBAL /**/ |
---|
127 | #endif GLOBAL |
---|
128 | |
---|
129 | #ifndef MLOCAL |
---|
130 | #define MLOCAL static |
---|
131 | #endif MLOCAL |
---|
132 | |
---|
133 | |
---|
134 | #ifdef XDS |
---|
135 | #define CONST const |
---|
136 | #else |
---|
137 | #define CONST |
---|
138 | #endif XDS |
---|
139 | |
---|
140 | #define u_char unsigned char |
---|
141 | #define u_short unsigned short |
---|
142 | #define u_int unsigned int |
---|
143 | /* |
---|
144 | ** assembly instructions for compatability between xds and mips |
---|
145 | */ |
---|
146 | #ifndef XDS |
---|
147 | #define sllv sll |
---|
148 | #define srlv srl |
---|
149 | #endif XDS |
---|
150 | /* |
---|
151 | ** debugger macros for assembly language routines. Allows the |
---|
152 | ** programmer to set up the necessary stack frame info |
---|
153 | ** required by debuggers to do stack traces. |
---|
154 | */ |
---|
155 | |
---|
156 | #ifndef XDS |
---|
157 | #define FRAME(name,frm_reg,offset,ret_reg) \ |
---|
158 | .globl name; \ |
---|
159 | .ent name; \ |
---|
160 | name:; \ |
---|
161 | .frame frm_reg,offset,ret_reg |
---|
162 | #define ENDFRAME(name) \ |
---|
163 | .end name |
---|
164 | #else |
---|
165 | #define FRAME(name,frm_reg,offset,ret_reg) \ |
---|
166 | .globl _##name;\ |
---|
167 | _##name: |
---|
168 | #define ENDFRAME(name) |
---|
169 | #endif XDS |
---|
170 | #endif /* __IDTMON_H__ */ |
---|