/[gxemul]/trunk/src/include/machine.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/machine.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 27 by dpavlin, Mon Oct 8 16:20:10 2007 UTC revision 28 by dpavlin, Mon Oct 8 16:20:26 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: machine.h,v 1.120 2006/06/24 19:52:28 debug Exp $   *  $Id: machine.h,v 1.126 2006/07/21 16:55:41 debug Exp $
32   */   */
33    
34  #include <sys/types.h>  #include <sys/types.h>
# Line 47  Line 47 
47    
48  #define MAX_TICK_FUNCTIONS      16  #define MAX_TICK_FUNCTIONS      16
49    
50    #define MAX_STATISTICS_FIELDS   8
51    
52  struct cpu_family;  struct cpu_family;
53  struct diskimage;  struct diskimage;
54  struct emul;  struct emul;
# Line 88  struct machine_bus { Line 90  struct machine_bus {
90  };  };
91    
92    
 #define MACHINE_NAME_MAXBUF             150  
   
93  struct machine {  struct machine {
94          /*  Pointer back to the emul struct we are in:  */          /*  Pointer back to the emul struct we are in:  */
95          struct emul *emul;          struct emul *emul;
# Line 116  struct machine { Line 116  struct machine {
116          int     serial_nr;          int     serial_nr;
117          int     nr_of_nics;          int     nr_of_nics;
118    
119            /*  TODO: How about multiple cpu familys in one machine?  */
120          struct cpu_family *cpu_family;          struct cpu_family *cpu_family;
121    
122          /*          /*
# Line 155  struct machine { Line 156  struct machine {
156          int     n_busses;          int     n_busses;
157    
158          /*  These are used by stuff in cpu.c, mostly:  */          /*  These are used by stuff in cpu.c, mostly:  */
159          int64_t ncycles;          int64_t ninstrs;
160          int64_t ncycles_show;          int64_t ninstrs_show;
161          int64_t ncycles_flush;          int64_t ninstrs_flush;
162          int64_t ncycles_since_gettimeofday;          int64_t ninstrs_since_gettimeofday;
163          struct timeval starttime;          struct timeval starttime;
         int     a_few_cycles;  
         int     a_few_instrs;  
164    
165          struct diskimage *first_diskimage;          struct diskimage *first_diskimage;
166    
# Line 181  struct machine { Line 180  struct machine {
180    
181          struct debugger_gdb gdb;          struct debugger_gdb gdb;
182    
183            /*  Breakpoints:  */
184          int     n_breakpoints;          int     n_breakpoints;
185          char    *breakpoint_string[MAX_BREAKPOINTS];          char    *breakpoint_string[MAX_BREAKPOINTS];
186          uint64_t breakpoint_addr[MAX_BREAKPOINTS];          uint64_t breakpoint_addr[MAX_BREAKPOINTS];
# Line 196  struct machine { Line 196  struct machine {
196          int     cache_secondary_linesize;          int     cache_secondary_linesize;
197    
198          int     dbe_on_nonexistant_memaccess;          int     dbe_on_nonexistant_memaccess;
         int     dyntrans_alignment_check;  
199          int     instruction_trace;          int     instruction_trace;
200          int     show_nr_of_instructions;          int     show_nr_of_instructions;
201            int     show_trace_tree;
202          int     show_symbolic_register_names;          int     show_symbolic_register_names;
203          int     emulated_hz;          int     emulated_hz;
204          int     speed_tricks;          int     allow_instruction_combinations;
205          char    *userland_emul;         /*  NULL for no userland emulation  */          char    *userland_emul;         /*  NULL for no userland emulation  */
206          int     force_netboot;          int     force_netboot;
207          int     slow_serial_interrupts_hack_for_linux;          int     slow_serial_interrupts_hack_for_linux;
208          uint64_t file_loaded_end_addr;          uint64_t file_loaded_end_addr;
209          char    *boot_kernel_filename;          char    *boot_kernel_filename;
210          char    *boot_string_argument;          char    *boot_string_argument;
   
211          int     automatic_clock_adjustment;          int     automatic_clock_adjustment;
212          int     exit_without_entering_debugger;          int     exit_without_entering_debugger;
         int     show_trace_tree;  
   
213          int     n_gfx_cards;          int     n_gfx_cards;
214    
215            /*  Instruction statistics:  */
216            char    *statistics_filename;
217            FILE    *statistics_file;
218            int     statistics_enabled;
219            char    *statistics_fields;     /*  "vpi" etc.  */
220    
221          /*  Machine-dependent: (PROM stuff, etc.)  */          /*  Machine-dependent: (PROM stuff, etc.)  */
222          union {          union {
223                  struct machine_arcbios  arc;                  struct machine_arcbios  arc;
# Line 267  struct machine { Line 270  struct machine {
270  };  };
271    
272    
273    /*  Tick function "prototype":  */
274    #define DEVICE_TICK(x)  void dev_ ## x ## _tick(struct cpu *cpu, void *extra)
275    
276    
277  /*  /*
278   *  Machine emulation types:   *  Machine emulation types:
279   */   */
# Line 284  struct machine { Line 291  struct machine {
291  #define ARCH_HPPA               10  #define ARCH_HPPA               10
292  #define ARCH_I960               11  #define ARCH_I960               11
293  #define ARCH_AVR                12  #define ARCH_AVR                12
294    #define ARCH_TRANSPUTER         13
295    
296  /*  MIPS:  */  /*  MIPS:  */
297  #define MACHINE_BAREMIPS        1000  #define MACHINE_BAREMIPS        1000
# Line 299  struct machine { Line 307  struct machine {
307  #define MACHINE_EVBMIPS         1010  #define MACHINE_EVBMIPS         1010
308  #define MACHINE_PSP             1011  #define MACHINE_PSP             1011
309  #define MACHINE_ALGOR           1012  #define MACHINE_ALGOR           1012
310    #define MACHINE_QEMU_MIPS       1013
311    
312  /*  PPC:  */  /*  PPC:  */
313  #define MACHINE_BAREPPC         2000  #define MACHINE_BAREPPC         2000
# Line 364  struct machine { Line 373  struct machine {
373  #define MACHINE_AVR_PAL         12001  #define MACHINE_AVR_PAL         12001
374  #define MACHINE_AVR_MAHPONG     12002  #define MACHINE_AVR_MAHPONG     12002
375    
376    /*  TRANSPUTER:  */
377    #define MACHINE_BARETRANSPUTER  13000
378    
379  /*  Other "pseudo"-machines:  */  /*  Other "pseudo"-machines:  */
380  #define MACHINE_NONE            0  #define MACHINE_NONE            0
381  #define MACHINE_USERLAND        100000  #define MACHINE_USERLAND        100000
# Line 404  struct machine { Line 416  struct machine {
416  #define MACHINE_HPCSH_JORNADA680                1  #define MACHINE_HPCSH_JORNADA680                1
417  #define MACHINE_HPCSH_JORNADA690                2  #define MACHINE_HPCSH_JORNADA690                2
418    
 /*  Playstation 2:  */  
 #define PLAYSTATION2_BDA        0xffffffffa0001000ULL  
 #define PLAYSTATION2_OPTARGS    0xffffffff81fff100ULL  
 #define PLAYSTATION2_SIFBIOS    0xffffffffbfc10000ULL  
   
419  /*  SGI and ARC:  */  /*  SGI and ARC:  */
420  #define MACHINE_ARC_NEC_RD94            1  #define MACHINE_ARC_NEC_RD94            1
421  #define MACHINE_ARC_JAZZ_PICA           2  #define MACHINE_ARC_JAZZ_PICA           2
# Line 454  struct machine { Line 461  struct machine {
461  #define MACHINE_X86_XT                  2  #define MACHINE_X86_XT                  2
462    
463    
 /*  
  *  Problem: kernels seem to be loaded at low addresses in RAM, so  
  *  storing environment strings and memory descriptors there is a bad  
  *  idea. They are stored at 0xbfc..... instead.  The ARC SPB must  
  *  be at physical address 0x1000 though.  
  */  
 #define SGI_SPB_ADDR            0xffffffff80001000ULL  
 /*  0xbfc10000 is firmware callback vector stuff  */  
 #define ARC_FIRMWARE_VECTORS    0xffffffffbfc80000ULL  
 #define ARC_FIRMWARE_ENTRIES    0xffffffffbfc88000ULL  
 #define ARC_ARGV_START          0xffffffffbfc90000ULL  
 #define ARC_ENV_STRINGS         0xffffffffbfc98000ULL  
 #define ARC_ENV_POINTERS        0xffffffffbfc9d000ULL  
 #define SGI_SYSID_ADDR          0xffffffffbfca1800ULL  
 #define ARC_DSPSTAT_ADDR        0xffffffffbfca1c00ULL  
 #define ARC_MEMDESC_ADDR        0xffffffffbfca1c80ULL  
 #define ARC_CONFIG_DATA_ADDR    0xffffffffbfca2000ULL  
 #define FIRST_ARC_COMPONENT     0xffffffffbfca8000ULL  
 #define ARC_PRIVATE_VECTORS     0xffffffffbfcb0000ULL  
 #define ARC_PRIVATE_ENTRIES     0xffffffffbfcb8000ULL  
   
   
464  /*  For the automachine system:  */  /*  For the automachine system:  */
465  struct machine_entry_subtype {  struct machine_entry_subtype {
466          int                     machine_subtype;/*  Old-style subtype  */          int                     machine_subtype;/*  Old-style subtype  */
# Line 524  int machine_name_to_type(char *stype, ch Line 509  int machine_name_to_type(char *stype, ch
509  void machine_add_tickfunction(struct machine *machine,  void machine_add_tickfunction(struct machine *machine,
510          void (*func)(struct cpu *, void *), void *extra,          void (*func)(struct cpu *, void *), void *extra,
511          int clockshift, double hz);          int clockshift, double hz);
512    void machine_statistics_init(struct machine *, char *fname);
513  void machine_register(char *name, MACHINE_SETUP_TYPE(setup));  void machine_register(char *name, MACHINE_SETUP_TYPE(setup));
514  void dump_mem_string(struct cpu *cpu, uint64_t addr);  void dump_mem_string(struct cpu *cpu, uint64_t addr);
515  void store_string(struct cpu *cpu, uint64_t addr, char *s);  void store_string(struct cpu *cpu, uint64_t addr, char *s);

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26