1 |
#ifndef MACHINE_H |
2 |
#define MACHINE_H |
3 |
|
4 |
/* |
5 |
* Copyright (C) 2005-2006 Anders Gavare. 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 are met: |
9 |
* |
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. The name of the author may not be used to endorse or promote products |
16 |
* derived from this software without specific prior written permission. |
17 |
* |
18 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
19 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
22 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
23 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
24 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
25 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
26 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
27 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 |
* SUCH DAMAGE. |
29 |
* |
30 |
* |
31 |
* $Id: machine.h,v 1.128 2006/08/14 17:45:47 debug Exp $ |
32 |
*/ |
33 |
|
34 |
#include <sys/types.h> |
35 |
#include <sys/time.h> |
36 |
|
37 |
#include "debugger_gdb.h" |
38 |
#include "symbol.h" |
39 |
|
40 |
#include "machine_arc.h" |
41 |
#include "machine_pmax.h" |
42 |
#include "machine_x86.h" |
43 |
|
44 |
|
45 |
#define MAX_BREAKPOINTS 8 |
46 |
#define BREAKPOINT_FLAG_R 1 |
47 |
|
48 |
#define MAX_TICK_FUNCTIONS 16 |
49 |
|
50 |
#define MAX_STATISTICS_FIELDS 8 |
51 |
|
52 |
struct cpu_family; |
53 |
struct diskimage; |
54 |
struct emul; |
55 |
struct fb_window; |
56 |
struct memory; |
57 |
struct of_data; |
58 |
|
59 |
/* Ugly: */ |
60 |
struct kn230_csr; |
61 |
struct kn02_csr; |
62 |
struct dec_ioasic_data; |
63 |
struct ps2_data; |
64 |
struct footbridge_data; |
65 |
struct dec5800_data; |
66 |
struct au1x00_ic_data; |
67 |
struct malta_data; |
68 |
struct vr41xx_data; |
69 |
struct jazz_data; |
70 |
struct crime_data; |
71 |
struct mace_data; |
72 |
struct sgi_ip20_data; |
73 |
struct sgi_ip22_data; |
74 |
struct sgi_ip30_data; |
75 |
struct isa_pic_data { |
76 |
struct pic8259_data *pic1; |
77 |
struct pic8259_data *pic2; |
78 |
|
79 |
int last_int; |
80 |
int native_irq; |
81 |
int native_secondary_irq; |
82 |
uint8_t secondary_mask1; |
83 |
}; |
84 |
|
85 |
|
86 |
struct machine_bus { |
87 |
struct machine_bus *next; |
88 |
|
89 |
char *name; |
90 |
|
91 |
void (*debug_dump)(void *); |
92 |
void *extra; |
93 |
}; |
94 |
|
95 |
|
96 |
struct machine { |
97 |
/* Pointer back to the emul struct we are in: */ |
98 |
struct emul *emul; |
99 |
|
100 |
/* Name as choosen by the user: */ |
101 |
char *name; |
102 |
|
103 |
int arch; /* ARCH_MIPS, ARCH_PPC, .. */ |
104 |
int machine_type; /* MACHINE_PMAX, .. */ |
105 |
int machine_subtype; /* MACHINE_DEC_3MAX_5000, .. */ |
106 |
|
107 |
int cycle_accurate; /* Set to non-zero for cycle |
108 |
accurate (slow) emulation. */ |
109 |
|
110 |
/* Name set by code in src/machines/machine_*.c: */ |
111 |
char *machine_name; |
112 |
|
113 |
int stable; /* startup warning for non-stable |
114 |
emulation modes. */ |
115 |
|
116 |
/* The serial number is mostly used when emulating multiple machines |
117 |
in a network. nr_of_nics is the current nr of network cards, which |
118 |
is useful when emulating multiple cards in one machine: */ |
119 |
int serial_nr; |
120 |
int nr_of_nics; |
121 |
|
122 |
/* TODO: How about multiple cpu familys in one machine? */ |
123 |
struct cpu_family *cpu_family; |
124 |
|
125 |
/* |
126 |
* The "mainbus": |
127 |
* |
128 |
* o) memory |
129 |
* o) devices |
130 |
* o) CPUs |
131 |
*/ |
132 |
|
133 |
struct memory *memory; |
134 |
|
135 |
int main_console_handle; |
136 |
|
137 |
/* Hardware devices, run every x clock cycles. */ |
138 |
int n_tick_entries; |
139 |
int ticks_till_next[MAX_TICK_FUNCTIONS]; |
140 |
int ticks_reset_value[MAX_TICK_FUNCTIONS]; |
141 |
void (*tick_func[MAX_TICK_FUNCTIONS])(struct cpu *, void *); |
142 |
void *tick_extra[MAX_TICK_FUNCTIONS]; |
143 |
double tick_hz[MAX_TICK_FUNCTIONS]; |
144 |
|
145 |
void (*md_interrupt)(struct machine *m, struct cpu *cpu, |
146 |
int irq_nr, int assert); |
147 |
|
148 |
char *cpu_name; /* TODO: remove this, there could be several |
149 |
cpus with different names in a machine */ |
150 |
int byte_order_override; |
151 |
int bootstrap_cpu; |
152 |
int use_random_bootstrap_cpu; |
153 |
int start_paused; |
154 |
int ncpus; |
155 |
struct cpu **cpus; |
156 |
|
157 |
/* Registered busses: */ |
158 |
struct machine_bus *first_bus; |
159 |
int n_busses; |
160 |
|
161 |
/* These are used by stuff in cpu.c, mostly: */ |
162 |
int64_t ninstrs; |
163 |
int64_t ninstrs_show; |
164 |
int64_t ninstrs_flush; |
165 |
int64_t ninstrs_since_gettimeofday; |
166 |
struct timeval starttime; |
167 |
|
168 |
struct diskimage *first_diskimage; |
169 |
|
170 |
struct symbol_context symbol_context; |
171 |
|
172 |
int random_mem_contents; |
173 |
int physical_ram_in_mb; |
174 |
int memory_offset_in_mb; |
175 |
int prom_emulation; |
176 |
int register_dump; |
177 |
int arch_pagesize; |
178 |
|
179 |
int bootdev_type; |
180 |
int bootdev_id; |
181 |
char *bootstr; |
182 |
char *bootarg; |
183 |
|
184 |
struct debugger_gdb gdb; |
185 |
|
186 |
/* Breakpoints: */ |
187 |
int n_breakpoints; |
188 |
char *breakpoint_string[MAX_BREAKPOINTS]; |
189 |
uint64_t breakpoint_addr[MAX_BREAKPOINTS]; |
190 |
int breakpoint_flags[MAX_BREAKPOINTS]; |
191 |
|
192 |
/* Cache sizes: (1 << x) x=0 for default values */ |
193 |
/* TODO: these are _PER CPU_! */ |
194 |
int cache_picache; |
195 |
int cache_pdcache; |
196 |
int cache_secondary; |
197 |
int cache_picache_linesize; |
198 |
int cache_pdcache_linesize; |
199 |
int cache_secondary_linesize; |
200 |
|
201 |
int dbe_on_nonexistant_memaccess; |
202 |
int instruction_trace; |
203 |
int show_nr_of_instructions; |
204 |
int show_trace_tree; |
205 |
int show_symbolic_register_names; |
206 |
int emulated_hz; |
207 |
int allow_instruction_combinations; |
208 |
char *userland_emul; /* NULL for no userland emulation */ |
209 |
int force_netboot; |
210 |
int slow_serial_interrupts_hack_for_linux; |
211 |
uint64_t file_loaded_end_addr; |
212 |
char *boot_kernel_filename; |
213 |
char *boot_string_argument; |
214 |
int automatic_clock_adjustment; |
215 |
int exit_without_entering_debugger; |
216 |
int n_gfx_cards; |
217 |
|
218 |
/* Instruction statistics: */ |
219 |
char *statistics_filename; |
220 |
FILE *statistics_file; |
221 |
int statistics_enabled; |
222 |
char *statistics_fields; /* "vpi" etc. */ |
223 |
|
224 |
/* Machine-dependent: (PROM stuff, etc.) */ |
225 |
union { |
226 |
struct machine_arcbios arc; |
227 |
struct machine_pmax pmax; |
228 |
struct machine_pc pc; |
229 |
} md; |
230 |
|
231 |
/* OpenFirmware: */ |
232 |
struct of_data *of_data; |
233 |
|
234 |
/* Bus-specific interrupt data: */ |
235 |
struct isa_pic_data isa_pic_data; |
236 |
|
237 |
/* Machine-dependent interrupt specific structs: */ |
238 |
union { |
239 |
struct kn230_csr *kn230_csr; |
240 |
struct kn02_csr *kn02_csr; |
241 |
struct dec_ioasic_data *dec_ioasic_data; |
242 |
struct ps2_data *ps2_data; |
243 |
struct dec5800_data *dec5800_csr; |
244 |
struct au1x00_ic_data *au1x00_ic_data; |
245 |
struct vr41xx_data *vr41xx_data; |
246 |
struct jazz_data *jazz_data; |
247 |
struct malta_data *malta_data; |
248 |
struct sgi_ip20_data *sgi_ip20_data; |
249 |
struct sgi_ip22_data *sgi_ip22_data; |
250 |
struct sgi_ip30_data *sgi_ip30_data; |
251 |
struct { |
252 |
struct crime_data *crime_data; |
253 |
struct mace_data *mace_data; |
254 |
} ip32; |
255 |
struct footbridge_data *footbridge_data; |
256 |
struct bebox_data *bebox_data; |
257 |
struct prep_data *prep_data; |
258 |
struct cpc700_data *cpc700_data; |
259 |
struct gc_data *gc_data; |
260 |
struct v3_data *v3_data; |
261 |
} md_int; |
262 |
|
263 |
/* X11/framebuffer stuff: */ |
264 |
int use_x11; |
265 |
int x11_scaledown; |
266 |
int x11_scaleup; |
267 |
int x11_n_display_names; |
268 |
char **x11_display_names; |
269 |
int x11_current_display_name_nr; /* updated by x11.c */ |
270 |
|
271 |
int n_fb_windows; |
272 |
struct fb_window **fb_windows; |
273 |
}; |
274 |
|
275 |
|
276 |
/* Tick function "prototype": */ |
277 |
#define DEVICE_TICK(x) void dev_ ## x ## _tick(struct cpu *cpu, void *extra) |
278 |
|
279 |
|
280 |
/* |
281 |
* Machine emulation types: |
282 |
*/ |
283 |
|
284 |
#define ARCH_NOARCH 0 |
285 |
#define ARCH_MIPS 1 |
286 |
#define ARCH_PPC 2 |
287 |
#define ARCH_SPARC 3 |
288 |
#define ARCH_ALPHA 4 |
289 |
#define ARCH_X86 5 |
290 |
#define ARCH_ARM 6 |
291 |
#define ARCH_IA64 7 |
292 |
#define ARCH_M68K 8 |
293 |
#define ARCH_SH 9 |
294 |
#define ARCH_HPPA 10 |
295 |
#define ARCH_I960 11 |
296 |
#define ARCH_AVR 12 |
297 |
#define ARCH_TRANSPUTER 13 |
298 |
|
299 |
/* MIPS: */ |
300 |
#define MACHINE_BAREMIPS 1000 |
301 |
#define MACHINE_TESTMIPS 1001 |
302 |
#define MACHINE_PMAX 1002 |
303 |
#define MACHINE_COBALT 1003 |
304 |
#define MACHINE_HPCMIPS 1004 |
305 |
#define MACHINE_PS2 1005 |
306 |
#define MACHINE_SGI 1006 |
307 |
#define MACHINE_ARC 1007 |
308 |
#define MACHINE_NETGEAR 1008 |
309 |
#define MACHINE_SONYNEWS 1009 |
310 |
#define MACHINE_EVBMIPS 1010 |
311 |
#define MACHINE_PSP 1011 |
312 |
#define MACHINE_ALGOR 1012 |
313 |
#define MACHINE_QEMU_MIPS 1013 |
314 |
|
315 |
/* PPC: */ |
316 |
#define MACHINE_BAREPPC 2000 |
317 |
#define MACHINE_TESTPPC 2001 |
318 |
#define MACHINE_WALNUT 2002 |
319 |
#define MACHINE_PMPPC 2003 |
320 |
#define MACHINE_SANDPOINT 2004 |
321 |
#define MACHINE_BEBOX 2005 |
322 |
#define MACHINE_PREP 2006 |
323 |
#define MACHINE_MACPPC 2007 |
324 |
#define MACHINE_DB64360 2008 |
325 |
#define MACHINE_MVMEPPC 2009 |
326 |
|
327 |
/* SPARC: */ |
328 |
#define MACHINE_BARESPARC 3000 |
329 |
#define MACHINE_TESTSPARC 3001 |
330 |
#define MACHINE_SPARC 3002 |
331 |
|
332 |
/* Alpha: */ |
333 |
#define MACHINE_BAREALPHA 4000 |
334 |
#define MACHINE_TESTALPHA 4001 |
335 |
#define MACHINE_ALPHA 4002 |
336 |
|
337 |
/* X86: */ |
338 |
#define MACHINE_BAREX86 5000 |
339 |
#define MACHINE_X86 5001 |
340 |
|
341 |
/* ARM: */ |
342 |
#define MACHINE_BAREARM 6000 |
343 |
#define MACHINE_TESTARM 6001 |
344 |
#define MACHINE_CATS 6002 |
345 |
#define MACHINE_HPCARM 6003 |
346 |
#define MACHINE_ZAURUS 6004 |
347 |
#define MACHINE_NETWINDER 6005 |
348 |
#define MACHINE_SHARK 6006 |
349 |
#define MACHINE_IQ80321 6007 |
350 |
#define MACHINE_IYONIX 6008 |
351 |
#define MACHINE_TS7200 6009 |
352 |
|
353 |
/* IA64: */ |
354 |
#define MACHINE_BAREIA64 7000 |
355 |
#define MACHINE_TESTIA64 7001 |
356 |
|
357 |
/* M68K: */ |
358 |
#define MACHINE_BAREM68K 8000 |
359 |
#define MACHINE_TESTM68K 8001 |
360 |
|
361 |
/* SH: */ |
362 |
#define MACHINE_BARESH 9000 |
363 |
#define MACHINE_TESTSH 9001 |
364 |
#define MACHINE_HPCSH 9002 |
365 |
#define MACHINE_DREAMCAST 9003 |
366 |
|
367 |
/* HPPA: */ |
368 |
#define MACHINE_BAREHPPA 10000 |
369 |
#define MACHINE_TESTHPPA 10001 |
370 |
|
371 |
/* I960: */ |
372 |
#define MACHINE_BAREI960 11000 |
373 |
#define MACHINE_TESTI960 11001 |
374 |
|
375 |
/* AVR: */ |
376 |
#define MACHINE_BAREAVR 12000 |
377 |
#define MACHINE_AVR_PAL 12001 |
378 |
#define MACHINE_AVR_MAHPONG 12002 |
379 |
|
380 |
/* TRANSPUTER: */ |
381 |
#define MACHINE_BARETRANSPUTER 13000 |
382 |
|
383 |
/* Other "pseudo"-machines: */ |
384 |
#define MACHINE_NONE 0 |
385 |
#define MACHINE_USERLAND 100000 |
386 |
|
387 |
/* DEC: */ |
388 |
#define MACHINE_DEC_PMAX_3100 1 |
389 |
#define MACHINE_DEC_3MAX_5000 2 |
390 |
#define MACHINE_DEC_3MIN_5000 3 |
391 |
#define MACHINE_DEC_3MAXPLUS_5000 4 |
392 |
#define MACHINE_DEC_5800 5 |
393 |
#define MACHINE_DEC_5400 6 |
394 |
#define MACHINE_DEC_MAXINE_5000 7 |
395 |
#define MACHINE_DEC_5500 11 |
396 |
#define MACHINE_DEC_MIPSMATE_5100 12 |
397 |
|
398 |
#define DEC_PROM_CALLBACK_STRUCT 0xffffffffbfc04000ULL |
399 |
#define DEC_PROM_EMULATION 0xffffffffbfc08000ULL |
400 |
#define DEC_PROM_INITIAL_ARGV (INITIAL_STACK_POINTER + 0x80) |
401 |
#define DEC_PROM_STRINGS 0xffffffffbfc20000ULL |
402 |
#define DEC_PROM_TCINFO 0xffffffffbfc2c000ULL |
403 |
#define DEC_MEMMAP_ADDR 0xffffffffbfc30000ULL |
404 |
|
405 |
/* HPCmips: */ |
406 |
#define MACHINE_HPCMIPS_CASIO_BE300 1 |
407 |
#define MACHINE_HPCMIPS_CASIO_E105 2 |
408 |
#define MACHINE_HPCMIPS_NEC_MOBILEPRO_770 3 |
409 |
#define MACHINE_HPCMIPS_NEC_MOBILEPRO_780 4 |
410 |
#define MACHINE_HPCMIPS_NEC_MOBILEPRO_800 5 |
411 |
#define MACHINE_HPCMIPS_NEC_MOBILEPRO_880 6 |
412 |
#define MACHINE_HPCMIPS_AGENDA_VR3 7 |
413 |
#define MACHINE_HPCMIPS_IBM_WORKPAD_Z50 8 |
414 |
|
415 |
/* HPCarm: */ |
416 |
#define MACHINE_HPCARM_IPAQ 1 |
417 |
#define MACHINE_HPCARM_JORNADA720 2 |
418 |
|
419 |
/* HPCsh: */ |
420 |
#define MACHINE_HPCSH_JORNADA680 1 |
421 |
#define MACHINE_HPCSH_JORNADA690 2 |
422 |
|
423 |
/* SGI and ARC: */ |
424 |
#define MACHINE_ARC_NEC_RD94 1 |
425 |
#define MACHINE_ARC_JAZZ_PICA 2 |
426 |
#define MACHINE_ARC_NEC_R94 3 |
427 |
#define MACHINE_ARC_DESKTECH_TYNE 4 |
428 |
#define MACHINE_ARC_JAZZ_MAGNUM 5 |
429 |
#define MACHINE_ARC_NEC_R98 6 |
430 |
#define MACHINE_ARC_JAZZ_M700 7 |
431 |
#define MACHINE_ARC_NEC_R96 8 |
432 |
|
433 |
/* Algor: */ |
434 |
#define MACHINE_ALGOR_P4032 4 |
435 |
#define MACHINE_ALGOR_P5064 5 |
436 |
|
437 |
/* EVBMIPS: */ |
438 |
#define MACHINE_EVBMIPS_MALTA 1 |
439 |
#define MACHINE_EVBMIPS_MALTA_BE 2 |
440 |
#define MACHINE_EVBMIPS_MESHCUBE 3 |
441 |
#define MACHINE_EVBMIPS_PB1000 4 |
442 |
|
443 |
/* PReP: */ |
444 |
#define MACHINE_PREP_IBM6050 1 |
445 |
#define MACHINE_PREP_MVME2400 2 |
446 |
|
447 |
/* Sun SPARC: */ |
448 |
#define MACHINE_SPARC_SS5 1 |
449 |
#define MACHINE_SPARC_SS20 2 |
450 |
#define MACHINE_SPARC_ULTRA1 3 |
451 |
#define MACHINE_SPARC_ULTRA60 4 |
452 |
|
453 |
/* MacPPC: TODO: Real model names */ |
454 |
#define MACHINE_MACPPC_G3 1 |
455 |
#define MACHINE_MACPPC_G4 2 |
456 |
#define MACHINE_MACPPC_G5 3 |
457 |
|
458 |
/* MVMEPPC */ |
459 |
#define MACHINE_MVMEPPC_1600 1 |
460 |
#define MACHINE_MVMEPPC_2100 2 |
461 |
#define MACHINE_MVMEPPC_5500 3 |
462 |
|
463 |
/* X86: */ |
464 |
#define MACHINE_X86_GENERIC 1 |
465 |
#define MACHINE_X86_XT 2 |
466 |
|
467 |
|
468 |
/* For the automachine system: */ |
469 |
struct machine_entry_subtype { |
470 |
int machine_subtype;/* Old-style subtype */ |
471 |
const char *name; /* Official name */ |
472 |
int n_aliases; |
473 |
char **aliases; /* Aliases */ |
474 |
}; |
475 |
|
476 |
struct machine_entry { |
477 |
struct machine_entry *next; |
478 |
|
479 |
/* Machine type: */ |
480 |
int arch; |
481 |
int machine_type; /* Old-style type */ |
482 |
const char *name; /* Official name */ |
483 |
int n_aliases; |
484 |
char **aliases; /* Aliases */ |
485 |
|
486 |
void (*setup)(struct machine *, struct cpu *); |
487 |
void (*set_default_cpu)(struct machine *); |
488 |
void (*set_default_ram)(struct machine *); |
489 |
|
490 |
/* Machine subtypes: */ |
491 |
int n_subtypes; |
492 |
struct machine_entry_subtype **subtype; |
493 |
}; |
494 |
|
495 |
#define MACHINE_SETUP_TYPE(n) void (*n)(struct machine *, struct cpu *) |
496 |
#define MACHINE_SETUP(x) void machine_setup_ ## x(struct machine *machine, \ |
497 |
struct cpu *cpu) |
498 |
#define MACHINE_DEFAULT_CPU(x) void machine_default_cpu_ ## x(struct machine *machine) |
499 |
#define MACHINE_DEFAULT_RAM(x) void machine_default_ram_ ## x(struct machine *machine) |
500 |
#define MACHINE_REGISTER(x) void machine_register_ ## x(void) |
501 |
#define MR_DEFAULT(x,name,arch,type) struct machine_entry \ |
502 |
*me = machine_entry_new(name,arch,type); \ |
503 |
me->setup = machine_setup_ ## x; \ |
504 |
me->set_default_cpu = machine_default_cpu_ ## x; \ |
505 |
machine_entry_register(me, arch); |
506 |
void automachine_init(void); |
507 |
|
508 |
|
509 |
/* machine.c: */ |
510 |
struct machine *machine_new(char *name, struct emul *emul); |
511 |
int machine_name_to_type(char *stype, char *ssubtype, |
512 |
int *type, int *subtype, int *arch); |
513 |
void machine_add_tickfunction(struct machine *machine, |
514 |
void (*func)(struct cpu *, void *), void *extra, |
515 |
int clockshift, double hz); |
516 |
void machine_statistics_init(struct machine *, char *fname); |
517 |
void machine_register(char *name, MACHINE_SETUP_TYPE(setup)); |
518 |
void dump_mem_string(struct cpu *cpu, uint64_t addr); |
519 |
void store_string(struct cpu *cpu, uint64_t addr, char *s); |
520 |
int store_64bit_word(struct cpu *cpu, uint64_t addr, uint64_t data64); |
521 |
int store_32bit_word(struct cpu *cpu, uint64_t addr, uint64_t data32); |
522 |
int store_16bit_word(struct cpu *cpu, uint64_t addr, uint64_t data16); |
523 |
void store_byte(struct cpu *cpu, uint64_t addr, uint8_t data); |
524 |
void store_64bit_word_in_host(struct cpu *cpu, unsigned char *data, |
525 |
uint64_t data32); |
526 |
void store_32bit_word_in_host(struct cpu *cpu, unsigned char *data, |
527 |
uint64_t data32); |
528 |
void store_16bit_word_in_host(struct cpu *cpu, unsigned char *data, |
529 |
uint16_t data16); |
530 |
uint32_t load_32bit_word(struct cpu *cpu, uint64_t addr); |
531 |
uint16_t load_16bit_word(struct cpu *cpu, uint64_t addr); |
532 |
void store_buf(struct cpu *cpu, uint64_t addr, char *s, size_t len); |
533 |
void add_environment_string(struct cpu *cpu, char *s, uint64_t *addr); |
534 |
void add_environment_string_dual(struct cpu *cpu, |
535 |
uint64_t *ptrp, uint64_t *addrp, char *s1, char *s2); |
536 |
void store_pointer_and_advance(struct cpu *cpu, uint64_t *addrp, |
537 |
uint64_t data, int flag64); |
538 |
void machine_setup(struct machine *); |
539 |
void machine_memsize_fix(struct machine *); |
540 |
void machine_default_cputype(struct machine *); |
541 |
void machine_dumpinfo(struct machine *); |
542 |
void machine_bus_register(struct machine *, char *busname, |
543 |
void (*debug_dump)(void *), void *extra); |
544 |
int machine_run(struct machine *machine); |
545 |
void machine_list_available_types_and_cpus(void); |
546 |
struct machine_entry *machine_entry_new(const char *name, |
547 |
int arch, int oldstyle_type); |
548 |
void machine_entry_add_alias(struct machine_entry *me, const char *name); |
549 |
void machine_entry_add_subtype(struct machine_entry *me, const char *name, |
550 |
int oldstyle_subtype, ...); |
551 |
void machine_entry_register(struct machine_entry *me, int arch); |
552 |
void machine_init(void); |
553 |
|
554 |
|
555 |
#endif /* MACHINE_H */ |