--- trunk/src/include/machine.h 2007/10/08 16:19:37 22 +++ trunk/src/include/machine.h 2007/10/08 16:19:56 24 @@ -28,23 +28,24 @@ * SUCH DAMAGE. * * - * $Id: machine.h,v 1.105 2006/02/18 13:42:39 debug Exp $ + * $Id: machine.h,v 1.118 2006/06/22 13:22:41 debug Exp $ */ #include #include - +#include "debugger_gdb.h" #include "symbol.h" #include "machine_arc.h" +#include "machine_pmax.h" #include "machine_x86.h" #define MAX_BREAKPOINTS 8 #define BREAKPOINT_FLAG_R 1 -#define MAX_TICK_FUNCTIONS 14 +#define MAX_TICK_FUNCTIONS 16 struct cpu_family; struct diskimage; @@ -100,6 +101,9 @@ int machine_type; /* MACHINE_PMAX, .. */ int machine_subtype; /* MACHINE_DEC_3MAX_5000, .. */ + int cycle_accurate; /* Set to non-zero for cycle + accurate (slow) emulation. */ + /* Name set by code in src/machines/machine_*.c: */ char *machine_name; @@ -132,6 +136,7 @@ int ticks_reset_value[MAX_TICK_FUNCTIONS]; void (*tick_func[MAX_TICK_FUNCTIONS])(struct cpu *, void *); void *tick_extra[MAX_TICK_FUNCTIONS]; + double tick_hz[MAX_TICK_FUNCTIONS]; void (*md_interrupt)(struct machine *m, struct cpu *cpu, int irq_nr, int assert); @@ -174,6 +179,8 @@ char *bootstr; char *bootarg; + struct debugger_gdb gdb; + int n_breakpoints; char *breakpoint_string[MAX_BREAKPOINTS]; uint64_t breakpoint_addr[MAX_BREAKPOINTS]; @@ -190,17 +197,10 @@ int dbe_on_nonexistant_memaccess; int dyntrans_alignment_check; - int bintrans_enable; - int old_bintrans_enable; - int bintrans_enabled_from_start; - size_t bintrans_size; int instruction_trace; - int single_step_on_bad_addr; int show_nr_of_instructions; int show_symbolic_register_names; - int64_t max_instructions; int emulated_hz; - int max_random_cycles_per_chunk; int speed_tricks; char *userland_emul; /* NULL for no userland emulation */ int force_netboot; @@ -218,6 +218,7 @@ /* Machine-dependent: (PROM stuff, etc.) */ union { struct machine_arcbios arc; + struct machine_pmax pmax; struct machine_pc pc; } md; @@ -293,12 +294,11 @@ #define MACHINE_PS2 1005 #define MACHINE_SGI 1006 #define MACHINE_ARC 1007 -#define MACHINE_MESHCUBE 1008 -#define MACHINE_NETGEAR 1009 -#define MACHINE_SONYNEWS 1010 -#define MACHINE_EVBMIPS 1011 -#define MACHINE_PSP 1012 -#define MACHINE_ALGOR 1013 +#define MACHINE_NETGEAR 1008 +#define MACHINE_SONYNEWS 1009 +#define MACHINE_EVBMIPS 1010 +#define MACHINE_PSP 1011 +#define MACHINE_ALGOR 1012 /* PPC: */ #define MACHINE_BAREPPC 2000 @@ -315,7 +315,7 @@ /* SPARC: */ #define MACHINE_BARESPARC 3000 #define MACHINE_TESTSPARC 3001 -#define MACHINE_ULTRA1 3002 +#define MACHINE_SPARC 3002 /* Alpha: */ #define MACHINE_BAREALPHA 4000 @@ -361,6 +361,8 @@ /* AVR: */ #define MACHINE_BAREAVR 12000 +#define MACHINE_AVR_PAL 12001 +#define MACHINE_AVR_MAHPONG 12002 /* Other "pseudo"-machines: */ #define MACHINE_NONE 0 @@ -424,15 +426,23 @@ /* EVBMIPS: */ #define MACHINE_EVBMIPS_MALTA 1 #define MACHINE_EVBMIPS_MALTA_BE 2 -#define MACHINE_EVBMIPS_PB1000 3 +#define MACHINE_EVBMIPS_MESHCUBE 3 +#define MACHINE_EVBMIPS_PB1000 4 /* PReP: */ #define MACHINE_PREP_IBM6050 1 #define MACHINE_PREP_MVME2400 2 +/* Sun SPARC: */ +#define MACHINE_SPARC_SS5 1 +#define MACHINE_SPARC_SS20 2 +#define MACHINE_SPARC_ULTRA1 3 +#define MACHINE_SPARC_ULTRA60 4 + /* MacPPC: TODO: Real model names */ -#define MACHINE_MACPPC_G4 1 -#define MACHINE_MACPPC_G5 2 +#define MACHINE_MACPPC_G3 1 +#define MACHINE_MACPPC_G4 2 +#define MACHINE_MACPPC_G5 3 /* MVMEPPC */ #define MACHINE_MVMEPPC_1600 1 @@ -511,7 +521,8 @@ int machine_name_to_type(char *stype, char *ssubtype, int *type, int *subtype, int *arch); void machine_add_tickfunction(struct machine *machine, - void (*func)(struct cpu *, void *), void *extra, int clockshift); + void (*func)(struct cpu *, void *), void *extra, + int clockshift, double hz); void machine_register(char *name, MACHINE_SETUP_TYPE(setup)); void dump_mem_string(struct cpu *cpu, uint64_t addr); void store_string(struct cpu *cpu, uint64_t addr, char *s);