/[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 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 14 by dpavlin, Mon Oct 8 16:18:51 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: machine.h,v 1.46 2005/04/16 02:02:28 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>
# Line 36  Line 36 
36    
37  #include "symbol.h"  #include "symbol.h"
38    
39    #include "machine_arc.h"
40    #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
# Line 53  struct kn230_csr; Line 56  struct kn230_csr;
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;
# Line 62  struct mace_data; Line 67  struct mace_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:  */
# Line 116  struct machine { Line 128  struct machine {
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    
# Line 132  struct machine { Line 145  struct machine {
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];
# Line 148  struct machine { Line 162  struct machine {
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;
# Line 173  struct machine { Line 188  struct machine {
188    
189          int     n_gfx_cards;          int     n_gfx_cards;
190    
191          /*  Yuck, this is ugly:  */          /*  Machine-dependent: (PROM stuff, etc.)  */
192          struct kn230_csr *kn230_csr;          union {
193          struct kn02_csr *kn02_csr;                  struct machine_arcbios  arc;
194          struct dec_ioasic_data *dec_ioasic_data;                  struct machine_pc       pc;
195          struct ps2_data *ps2_data;          } md;
196          struct dec5800_data *dec5800_csr;  
197          struct au1x00_ic_data *au1x00_ic_data;          /*  Bus-specific interrupt data:  */
198          struct vr41xx_data *vr41xx_data;                struct isa_pic_data isa_pic_data;
199          struct jazz_data *jazz_data;  
200          struct crime_data *crime_data;          /*  Machine-dependent interrupt specific structs:  */
201          struct mace_data *mace_data;          union {
202          struct sgi_ip20_data *sgi_ip20_data;                  struct kn230_csr *kn230_csr;
203          struct sgi_ip22_data *sgi_ip22_data;                  struct kn02_csr *kn02_csr;
204          struct sgi_ip30_data *sgi_ip30_data;                  struct dec_ioasic_data *dec_ioasic_data;
205                    struct ps2_data *ps2_data;
206                    struct dec5800_data *dec5800_csr;
207                    struct au1x00_ic_data *au1x00_ic_data;
208                    struct vr41xx_data *vr41xx_data;      
209                    struct jazz_data *jazz_data;
210                    struct malta_data *malta_data;
211                    struct sgi_ip20_data *sgi_ip20_data;
212                    struct sgi_ip22_data *sgi_ip22_data;
213                    struct sgi_ip30_data *sgi_ip30_data;
214                    struct {
215                            struct crime_data *crime_data;
216                            struct mace_data *mace_data;
217                    } ip32;
218                    struct footbridge_data *footbridge_data;
219            } md_int;
220    
221          /*  X11/framebuffer stuff:  */          /*  X11/framebuffer stuff:  */
222          int     use_x11;          int     use_x11;
# Line 208  struct machine { Line 238  struct machine {
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_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
# Line 224  struct machine { Line 259  struct machine {
259  #define MACHINE_ARC             1007  #define MACHINE_ARC             1007
260  #define MACHINE_MESHCUBE        1008  #define MACHINE_MESHCUBE        1008
261  #define MACHINE_NETGEAR         1009  #define MACHINE_NETGEAR         1009
262  #define MACHINE_WRT54G          1010  #define MACHINE_SONYNEWS        1010
263  #define MACHINE_SONYNEWS        1011  #define MACHINE_EVBMIPS         1011
264    #define MACHINE_PSP             1012
265    
266  /*  PPC:  */  /*  PPC:  */
267  #define MACHINE_BAREPPC         2000  #define MACHINE_BAREPPC         2000
# Line 240  struct machine { Line 276  struct machine {
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
281    
282    /*  Alpha:  */
283    #define MACHINE_BAREALPHA       4000
284    #define MACHINE_TESTALPHA       4001
285    #define MACHINE_ALPHA           4002
286    
287  /*  URISC:  */  /*  X86:  */
288  #define MACHINE_BAREURISC       4000  #define MACHINE_BAREX86         5000
289  #define MACHINE_TESTURISC       4001  #define MACHINE_X86             5001
290    
291    /*  ARM:  */
292    #define MACHINE_BAREARM         6000
293    #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:  */  /*  HPPA:  */
316  #define MACHINE_BAREHPPA        5000  #define MACHINE_BAREHPPA        10000
317  #define MACHINE_TESTHPPA        5001  #define MACHINE_TESTHPPA        10001
318    
319  /*  Alpha:  */  /*  I960:  */
320  #define MACHINE_BAREALPHA       6000  #define MACHINE_BAREI960        11000
321  #define MACHINE_TESTALPHA       6001  #define MACHINE_TESTI960        11001
322    
323  /*  X86:  */  /*  AVR:  */
324  #define MACHINE_BAREX86         7000  #define MACHINE_BAREAVR         12000
 #define MACHINE_X86             7001  
325    
326  /*  Other "pseudo"-machines:  */  /*  Other "pseudo"-machines:  */
327  #define MACHINE_NONE            0  #define MACHINE_NONE            0
# Line 280  struct machine { Line 345  struct machine {
345  #define DEC_PROM_TCINFO                 0xffffffffbfc2c000ULL  #define DEC_PROM_TCINFO                 0xffffffffbfc2c000ULL
346  #define DEC_MEMMAP_ADDR                 0xffffffffbfc30000ULL  #define DEC_MEMMAP_ADDR                 0xffffffffbfc30000ULL
347    
   
348  /*  HPCmips:  */  /*  HPCmips:  */
 /*  Machine types:  */  
349  #define MACHINE_HPCMIPS_CASIO_BE300             1  #define MACHINE_HPCMIPS_CASIO_BE300             1
350  #define MACHINE_HPCMIPS_CASIO_E105              2  #define MACHINE_HPCMIPS_CASIO_E105              2
351  #define MACHINE_HPCMIPS_NEC_MOBILEPRO_770       3  #define MACHINE_HPCMIPS_NEC_MOBILEPRO_770       3
# Line 292  struct machine { Line 355  struct machine {
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
# Line 307  struct machine { Line 378  struct machine {
378  #define MACHINE_ARC_JAZZ_M700           7  #define MACHINE_ARC_JAZZ_M700           7
379  #define MACHINE_ARC_NEC_R96             8  #define MACHINE_ARC_NEC_R96             8
380    
381    /*  EVBMIPS:  */
382    #define MACHINE_EVBMIPS_MALTA           1
383    #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
388  #define MACHINE_MACPPC_G5               2  #define MACHINE_MACPPC_G5               2
389    
390    /*  X86:  */
391    #define MACHINE_X86_GENERIC             1
392    #define MACHINE_X86_XT                  2
393    
394    
395  /*  /*
396   *  Problem: kernels seem to be loaded at low addresses in RAM, so   *  Problem: kernels seem to be loaded at low addresses in RAM, so
# Line 345  void store_string(struct cpu *cpu, uint6 Line 425  void store_string(struct cpu *cpu, uint6
425  int store_64bit_word(struct cpu *cpu, uint64_t addr, uint64_t data64);  int store_64bit_word(struct cpu *cpu, uint64_t addr, uint64_t data64);
426  int store_32bit_word(struct cpu *cpu, uint64_t addr, uint64_t data32);  int store_32bit_word(struct cpu *cpu, uint64_t addr, uint64_t data32);
427  int store_16bit_word(struct cpu *cpu, uint64_t addr, uint64_t data16);  int store_16bit_word(struct cpu *cpu, uint64_t addr, uint64_t data16);
428    void store_byte(struct cpu *cpu, uint64_t addr, uint8_t data);
429  void store_64bit_word_in_host(struct cpu *cpu, unsigned char *data,  void store_64bit_word_in_host(struct cpu *cpu, unsigned char *data,
430          uint64_t data32);          uint64_t data32);
431  void store_32bit_word_in_host(struct cpu *cpu, unsigned char *data,  void store_32bit_word_in_host(struct cpu *cpu, unsigned char *data,

Legend:
Removed from v.4  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26