28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: machine.h,v 1.54 2005/06/12 12:31:55 debug Exp $ |
* $Id: machine.h,v 1.78 2005/09/21 19:10:35 debug Exp $ |
32 |
*/ |
*/ |
33 |
|
|
34 |
#include <sys/types.h> |
#include <sys/types.h> |
36 |
|
|
37 |
#include "symbol.h" |
#include "symbol.h" |
38 |
|
|
39 |
#include "arcbios.h" |
#include "machine_arc.h" |
40 |
#include "machine_x86.h" |
#include "machine_x86.h" |
41 |
|
|
42 |
|
|
43 |
#define MAX_BREAKPOINTS 8 |
#define MAX_BREAKPOINTS 8 |
44 |
#define BREAKPOINT_FLAG_R 1 |
#define BREAKPOINT_FLAG_R 1 |
45 |
|
|
56 |
struct kn02_csr; |
struct kn02_csr; |
57 |
struct dec_ioasic_data; |
struct dec_ioasic_data; |
58 |
struct ps2_data; |
struct ps2_data; |
59 |
|
struct footbridge_data; |
60 |
struct dec5800_data; |
struct dec5800_data; |
61 |
struct au1x00_ic_data; |
struct au1x00_ic_data; |
62 |
|
struct malta_data; |
63 |
struct vr41xx_data; |
struct vr41xx_data; |
64 |
struct jazz_data; |
struct jazz_data; |
65 |
struct crime_data; |
struct crime_data; |
67 |
struct sgi_ip20_data; |
struct sgi_ip20_data; |
68 |
struct sgi_ip22_data; |
struct sgi_ip22_data; |
69 |
struct sgi_ip30_data; |
struct sgi_ip30_data; |
70 |
|
struct isa_pic_data { |
71 |
|
struct pic8259_data *pic1; |
72 |
|
struct pic8259_data *pic2; |
73 |
|
}; |
74 |
|
|
75 |
|
|
76 |
|
#define MACHINE_NAME_MAXBUF 200 |
77 |
|
|
78 |
struct machine { |
struct machine { |
79 |
/* Pointer back to the emul struct we are in: */ |
/* Pointer back to the emul struct we are in: */ |
128 |
struct cpu **cpus; |
struct cpu **cpus; |
129 |
|
|
130 |
/* These are used by stuff in cpu.c, mostly: */ |
/* These are used by stuff in cpu.c, mostly: */ |
|
struct timeval starttime; |
|
131 |
int64_t ncycles; |
int64_t ncycles; |
132 |
int64_t ncycles_show; |
int64_t ncycles_show; |
133 |
int64_t ncycles_flush; |
int64_t ncycles_flush; |
134 |
|
int64_t ncycles_since_gettimeofday; |
135 |
|
struct timeval starttime; |
136 |
int a_few_cycles; |
int a_few_cycles; |
137 |
int a_few_instrs; |
int a_few_instrs; |
138 |
|
|
145 |
int memory_offset_in_mb; |
int memory_offset_in_mb; |
146 |
int prom_emulation; |
int prom_emulation; |
147 |
int register_dump; |
int register_dump; |
148 |
|
int arch_pagesize; |
149 |
|
|
150 |
int n_breakpoints; |
int n_breakpoints; |
151 |
char *breakpoint_string[MAX_BREAKPOINTS]; |
char *breakpoint_string[MAX_BREAKPOINTS]; |
162 |
int cache_secondary_linesize; |
int cache_secondary_linesize; |
163 |
|
|
164 |
int dbe_on_nonexistant_memaccess; |
int dbe_on_nonexistant_memaccess; |
165 |
|
int dyntrans_alignment_check; |
166 |
int bintrans_enable; |
int bintrans_enable; |
167 |
int old_bintrans_enable; |
int old_bintrans_enable; |
168 |
int bintrans_enabled_from_start; |
int bintrans_enabled_from_start; |
194 |
struct machine_pc pc; |
struct machine_pc pc; |
195 |
} md; |
} md; |
196 |
|
|
197 |
|
/* Bus-specific interrupt data: */ |
198 |
|
struct isa_pic_data isa_pic_data; |
199 |
|
|
200 |
/* Machine-dependent interrupt specific structs: */ |
/* Machine-dependent interrupt specific structs: */ |
201 |
union { |
union { |
202 |
struct kn230_csr *kn230_csr; |
struct kn230_csr *kn230_csr; |
207 |
struct au1x00_ic_data *au1x00_ic_data; |
struct au1x00_ic_data *au1x00_ic_data; |
208 |
struct vr41xx_data *vr41xx_data; |
struct vr41xx_data *vr41xx_data; |
209 |
struct jazz_data *jazz_data; |
struct jazz_data *jazz_data; |
210 |
|
struct malta_data *malta_data; |
211 |
struct sgi_ip20_data *sgi_ip20_data; |
struct sgi_ip20_data *sgi_ip20_data; |
212 |
struct sgi_ip22_data *sgi_ip22_data; |
struct sgi_ip22_data *sgi_ip22_data; |
213 |
struct sgi_ip30_data *sgi_ip30_data; |
struct sgi_ip30_data *sgi_ip30_data; |
215 |
struct crime_data *crime_data; |
struct crime_data *crime_data; |
216 |
struct mace_data *mace_data; |
struct mace_data *mace_data; |
217 |
} ip32; |
} ip32; |
218 |
|
struct footbridge_data *footbridge_data; |
219 |
} md_int; |
} md_int; |
220 |
|
|
221 |
/* X11/framebuffer stuff: */ |
/* X11/framebuffer stuff: */ |
238 |
#define ARCH_MIPS 1 |
#define ARCH_MIPS 1 |
239 |
#define ARCH_PPC 2 |
#define ARCH_PPC 2 |
240 |
#define ARCH_SPARC 3 |
#define ARCH_SPARC 3 |
241 |
#define ARCH_URISC 4 |
#define ARCH_ALPHA 4 |
242 |
#define ARCH_HPPA 5 |
#define ARCH_X86 5 |
243 |
#define ARCH_ALPHA 6 |
#define ARCH_ARM 6 |
244 |
#define ARCH_X86 7 |
#define ARCH_IA64 7 |
245 |
#define ARCH_ARM 8 |
#define ARCH_M68K 8 |
246 |
|
#define ARCH_SH 9 |
247 |
|
#define ARCH_HPPA 10 |
248 |
|
#define ARCH_I960 11 |
249 |
|
#define ARCH_AVR 12 |
250 |
|
|
251 |
/* MIPS: */ |
/* MIPS: */ |
252 |
#define MACHINE_BAREMIPS 1000 |
#define MACHINE_BAREMIPS 1000 |
261 |
#define MACHINE_NETGEAR 1009 |
#define MACHINE_NETGEAR 1009 |
262 |
#define MACHINE_SONYNEWS 1010 |
#define MACHINE_SONYNEWS 1010 |
263 |
#define MACHINE_EVBMIPS 1011 |
#define MACHINE_EVBMIPS 1011 |
264 |
|
#define MACHINE_PSP 1012 |
265 |
|
|
266 |
/* PPC: */ |
/* PPC: */ |
267 |
#define MACHINE_BAREPPC 2000 |
#define MACHINE_BAREPPC 2000 |
276 |
|
|
277 |
/* SPARC: */ |
/* SPARC: */ |
278 |
#define MACHINE_BARESPARC 3000 |
#define MACHINE_BARESPARC 3000 |
279 |
#define MACHINE_ULTRA1 3001 |
#define MACHINE_TESTSPARC 3001 |
280 |
|
#define MACHINE_ULTRA1 3002 |
|
/* URISC: */ |
|
|
#define MACHINE_BAREURISC 4000 |
|
|
#define MACHINE_TESTURISC 4001 |
|
|
|
|
|
/* HPPA: */ |
|
|
#define MACHINE_BAREHPPA 5000 |
|
|
#define MACHINE_TESTHPPA 5001 |
|
281 |
|
|
282 |
/* Alpha: */ |
/* Alpha: */ |
283 |
#define MACHINE_BAREALPHA 6000 |
#define MACHINE_BAREALPHA 4000 |
284 |
#define MACHINE_TESTALPHA 6001 |
#define MACHINE_TESTALPHA 4001 |
285 |
|
#define MACHINE_ALPHA 4002 |
286 |
|
|
287 |
/* X86: */ |
/* X86: */ |
288 |
#define MACHINE_BAREX86 7000 |
#define MACHINE_BAREX86 5000 |
289 |
#define MACHINE_X86 7001 |
#define MACHINE_X86 5001 |
290 |
|
|
291 |
/* ARM: */ |
/* ARM: */ |
292 |
#define MACHINE_BAREARM 8000 |
#define MACHINE_BAREARM 6000 |
293 |
#define MACHINE_TESTARM 8001 |
#define MACHINE_TESTARM 6001 |
294 |
|
#define MACHINE_CATS 6002 |
295 |
|
#define MACHINE_HPCARM 6003 |
296 |
|
#define MACHINE_ZAURUS 6004 |
297 |
|
#define MACHINE_NETWINDER 6005 |
298 |
|
#define MACHINE_SHARK 6006 |
299 |
|
#define MACHINE_IQ80321 6007 |
300 |
|
#define MACHINE_IYONIX 6008 |
301 |
|
|
302 |
|
/* IA64: */ |
303 |
|
#define MACHINE_BAREIA64 7000 |
304 |
|
#define MACHINE_TESTIA64 7001 |
305 |
|
|
306 |
|
/* M68K: */ |
307 |
|
#define MACHINE_BAREM68K 8000 |
308 |
|
#define MACHINE_TESTM68K 8001 |
309 |
|
|
310 |
|
/* SH: */ |
311 |
|
#define MACHINE_BARESH 9000 |
312 |
|
#define MACHINE_TESTSH 9001 |
313 |
|
#define MACHINE_HPCSH 9002 |
314 |
|
|
315 |
|
/* HPPA: */ |
316 |
|
#define MACHINE_BAREHPPA 10000 |
317 |
|
#define MACHINE_TESTHPPA 10001 |
318 |
|
|
319 |
|
/* I960: */ |
320 |
|
#define MACHINE_BAREI960 11000 |
321 |
|
#define MACHINE_TESTI960 11001 |
322 |
|
|
323 |
|
/* AVR: */ |
324 |
|
#define MACHINE_BAREAVR 12000 |
325 |
|
|
326 |
/* Other "pseudo"-machines: */ |
/* Other "pseudo"-machines: */ |
327 |
#define MACHINE_NONE 0 |
#define MACHINE_NONE 0 |
355 |
#define MACHINE_HPCMIPS_AGENDA_VR3 7 |
#define MACHINE_HPCMIPS_AGENDA_VR3 7 |
356 |
#define MACHINE_HPCMIPS_IBM_WORKPAD_Z50 8 |
#define MACHINE_HPCMIPS_IBM_WORKPAD_Z50 8 |
357 |
|
|
358 |
|
/* HPCarm: */ |
359 |
|
#define MACHINE_HPCARM_IPAQ 1 |
360 |
|
#define MACHINE_HPCARM_JORNADA720 2 |
361 |
|
|
362 |
|
/* HPCsh: */ |
363 |
|
#define MACHINE_HPCSH_JORNADA680 1 |
364 |
|
#define MACHINE_HPCSH_JORNADA690 2 |
365 |
|
|
366 |
/* Playstation 2: */ |
/* Playstation 2: */ |
367 |
#define PLAYSTATION2_BDA 0xffffffffa0001000ULL |
#define PLAYSTATION2_BDA 0xffffffffa0001000ULL |
368 |
#define PLAYSTATION2_OPTARGS 0xffffffff81fff100ULL |
#define PLAYSTATION2_OPTARGS 0xffffffff81fff100ULL |
380 |
|
|
381 |
/* EVBMIPS: */ |
/* EVBMIPS: */ |
382 |
#define MACHINE_EVBMIPS_MALTA 1 |
#define MACHINE_EVBMIPS_MALTA 1 |
383 |
#define MACHINE_EVBMIPS_PB1000 2 |
#define MACHINE_EVBMIPS_MALTA_BE 2 |
384 |
|
#define MACHINE_EVBMIPS_PB1000 3 |
385 |
|
|
386 |
/* MacPPC: TODO: Real model names */ |
/* MacPPC: TODO: Real model names */ |
387 |
#define MACHINE_MACPPC_G4 1 |
#define MACHINE_MACPPC_G4 1 |