/[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 12 by dpavlin, Mon Oct 8 16:18:38 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.67 2005/08/16 05:37:13 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 "arcbios.h"
40    #include "machine_x86.h"
41    
42  #define MAX_BREAKPOINTS         8  #define MAX_BREAKPOINTS         8
43  #define BREAKPOINT_FLAG_R       1  #define BREAKPOINT_FLAG_R       1
# Line 55  struct dec_ioasic_data; Line 57  struct dec_ioasic_data;
57  struct ps2_data;  struct ps2_data;
58  struct dec5800_data;  struct dec5800_data;
59  struct au1x00_ic_data;  struct au1x00_ic_data;
60    struct malta_data;
61  struct vr41xx_data;  struct vr41xx_data;
62  struct jazz_data;  struct jazz_data;
63  struct crime_data;  struct crime_data;
# Line 62  struct mace_data; Line 65  struct mace_data;
65  struct sgi_ip20_data;  struct sgi_ip20_data;
66  struct sgi_ip22_data;  struct sgi_ip22_data;
67  struct sgi_ip30_data;  struct sgi_ip30_data;
68    struct isa_pic_data {
69            struct pic8259_data *pic1;
70            struct pic8259_data *pic2;
71    };
72    
73    
74    #define MACHINE_NAME_MAXBUF             200
75    
76  struct machine {  struct machine {
77          /*  Pointer back to the emul struct we are in:  */          /*  Pointer back to the emul struct we are in:  */
# Line 116  struct machine { Line 126  struct machine {
126          struct cpu **cpus;          struct cpu **cpus;
127    
128          /*  These are used by stuff in cpu.c, mostly:  */          /*  These are used by stuff in cpu.c, mostly:  */
         struct timeval starttime;  
129          int64_t ncycles;          int64_t ncycles;
130          int64_t ncycles_show;          int64_t ncycles_show;
131          int64_t ncycles_flush;          int64_t ncycles_flush;
132            int64_t ncycles_since_gettimeofday;
133            struct timeval starttime;
134          int     a_few_cycles;          int     a_few_cycles;
135          int     a_few_instrs;          int     a_few_instrs;
136    
# Line 132  struct machine { Line 143  struct machine {
143          int     memory_offset_in_mb;          int     memory_offset_in_mb;
144          int     prom_emulation;          int     prom_emulation;
145          int     register_dump;          int     register_dump;
146            int     arch_pagesize;
147    
148          int     n_breakpoints;          int     n_breakpoints;
149          char    *breakpoint_string[MAX_BREAKPOINTS];          char    *breakpoint_string[MAX_BREAKPOINTS];
# Line 148  struct machine { Line 160  struct machine {
160          int     cache_secondary_linesize;          int     cache_secondary_linesize;
161    
162          int     dbe_on_nonexistant_memaccess;          int     dbe_on_nonexistant_memaccess;
163            int     dyntrans_alignment_check;
164          int     bintrans_enable;          int     bintrans_enable;
165          int     old_bintrans_enable;          int     old_bintrans_enable;
166          int     bintrans_enabled_from_start;          int     bintrans_enabled_from_start;
# Line 173  struct machine { Line 186  struct machine {
186    
187          int     n_gfx_cards;          int     n_gfx_cards;
188    
189          /*  Yuck, this is ugly:  */          /*  Machine-dependent: (PROM stuff, etc.)  */
190          struct kn230_csr *kn230_csr;          union {
191          struct kn02_csr *kn02_csr;                  struct machine_arcbios  arc;
192          struct dec_ioasic_data *dec_ioasic_data;                  struct machine_pc       pc;
193          struct ps2_data *ps2_data;          } md;
194          struct dec5800_data *dec5800_csr;  
195          struct au1x00_ic_data *au1x00_ic_data;          /*  Machine-dependent interrupt specific structs:  */
196          struct vr41xx_data *vr41xx_data;                union {
197          struct jazz_data *jazz_data;                  struct kn230_csr *kn230_csr;
198          struct crime_data *crime_data;                  struct kn02_csr *kn02_csr;
199          struct mace_data *mace_data;                  struct dec_ioasic_data *dec_ioasic_data;
200          struct sgi_ip20_data *sgi_ip20_data;                  struct ps2_data *ps2_data;
201          struct sgi_ip22_data *sgi_ip22_data;                  struct dec5800_data *dec5800_csr;
202          struct sgi_ip30_data *sgi_ip30_data;                  struct au1x00_ic_data *au1x00_ic_data;
203                    struct vr41xx_data *vr41xx_data;      
204                    struct jazz_data *jazz_data;
205                    struct malta_data *malta_data;
206                    struct isa_pic_data isa_pic_data;
207                    struct sgi_ip20_data *sgi_ip20_data;
208                    struct sgi_ip22_data *sgi_ip22_data;
209                    struct sgi_ip30_data *sgi_ip30_data;
210                    struct {
211                            struct crime_data *crime_data;
212                            struct mace_data *mace_data;
213                    } ip32;
214            } md_int;
215    
216          /*  X11/framebuffer stuff:  */          /*  X11/framebuffer stuff:  */
217          int     use_x11;          int     use_x11;
# Line 208  struct machine { Line 233  struct machine {
233  #define ARCH_MIPS               1  #define ARCH_MIPS               1
234  #define ARCH_PPC                2  #define ARCH_PPC                2
235  #define ARCH_SPARC              3  #define ARCH_SPARC              3
236  #define ARCH_URISC              4  #define ARCH_ALPHA              4
237  #define ARCH_HPPA               5  #define ARCH_X86                5
238  #define ARCH_ALPHA              6  #define ARCH_ARM                6
239  #define ARCH_X86                7  #define ARCH_IA64               7
240    #define ARCH_M68K               8
241    
242  /*  MIPS:  */  /*  MIPS:  */
243  #define MACHINE_BAREMIPS        1000  #define MACHINE_BAREMIPS        1000
# Line 224  struct machine { Line 250  struct machine {
250  #define MACHINE_ARC             1007  #define MACHINE_ARC             1007
251  #define MACHINE_MESHCUBE        1008  #define MACHINE_MESHCUBE        1008
252  #define MACHINE_NETGEAR         1009  #define MACHINE_NETGEAR         1009
253  #define MACHINE_WRT54G          1010  #define MACHINE_SONYNEWS        1010
254  #define MACHINE_SONYNEWS        1011  #define MACHINE_EVBMIPS         1011
255    #define MACHINE_PSP             1012
256    
257  /*  PPC:  */  /*  PPC:  */
258  #define MACHINE_BAREPPC         2000  #define MACHINE_BAREPPC         2000
# Line 240  struct machine { Line 267  struct machine {
267    
268  /*  SPARC:  */  /*  SPARC:  */
269  #define MACHINE_BARESPARC       3000  #define MACHINE_BARESPARC       3000
270  #define MACHINE_ULTRA1          3001  #define MACHINE_TESTSPARC       3001
271    #define MACHINE_ULTRA1          3002
 /*  URISC:  */  
 #define MACHINE_BAREURISC       4000  
 #define MACHINE_TESTURISC       4001  
   
 /*  HPPA:  */  
 #define MACHINE_BAREHPPA        5000  
 #define MACHINE_TESTHPPA        5001  
272    
273  /*  Alpha:  */  /*  Alpha:  */
274  #define MACHINE_BAREALPHA       6000  #define MACHINE_BAREALPHA       4000
275  #define MACHINE_TESTALPHA       6001  #define MACHINE_TESTALPHA       4001
276    #define MACHINE_ALPHA           4002
277    
278  /*  X86:  */  /*  X86:  */
279  #define MACHINE_BAREX86         7000  #define MACHINE_BAREX86         5000
280  #define MACHINE_X86             7001  #define MACHINE_X86             5001
281    
282    /*  ARM:  */
283    #define MACHINE_BAREARM         6000
284    #define MACHINE_TESTARM         6001
285    
286    /*  IA64:  */
287    #define MACHINE_BAREIA64        7000
288    #define MACHINE_TESTIA64        7001
289    
290    /*  M68K:  */
291    #define MACHINE_BAREM68K        8000
292    #define MACHINE_TESTM68K        8001
293    
294  /*  Other "pseudo"-machines:  */  /*  Other "pseudo"-machines:  */
295  #define MACHINE_NONE            0  #define MACHINE_NONE            0
# Line 280  struct machine { Line 313  struct machine {
313  #define DEC_PROM_TCINFO                 0xffffffffbfc2c000ULL  #define DEC_PROM_TCINFO                 0xffffffffbfc2c000ULL
314  #define DEC_MEMMAP_ADDR                 0xffffffffbfc30000ULL  #define DEC_MEMMAP_ADDR                 0xffffffffbfc30000ULL
315    
   
316  /*  HPCmips:  */  /*  HPCmips:  */
 /*  Machine types:  */  
317  #define MACHINE_HPCMIPS_CASIO_BE300             1  #define MACHINE_HPCMIPS_CASIO_BE300             1
318  #define MACHINE_HPCMIPS_CASIO_E105              2  #define MACHINE_HPCMIPS_CASIO_E105              2
319  #define MACHINE_HPCMIPS_NEC_MOBILEPRO_770       3  #define MACHINE_HPCMIPS_NEC_MOBILEPRO_770       3
# Line 307  struct machine { Line 338  struct machine {
338  #define MACHINE_ARC_JAZZ_M700           7  #define MACHINE_ARC_JAZZ_M700           7
339  #define MACHINE_ARC_NEC_R96             8  #define MACHINE_ARC_NEC_R96             8
340    
341    /*  EVBMIPS:  */
342    #define MACHINE_EVBMIPS_MALTA           1
343    #define MACHINE_EVBMIPS_MALTA_BE        2
344    #define MACHINE_EVBMIPS_PB1000          3
345    
346  /*  MacPPC:  TODO: Real model names  */  /*  MacPPC:  TODO: Real model names  */
347  #define MACHINE_MACPPC_G4               1  #define MACHINE_MACPPC_G4               1
348  #define MACHINE_MACPPC_G5               2  #define MACHINE_MACPPC_G5               2
349    
350    /*  X86:  */
351    #define MACHINE_X86_GENERIC             1
352    #define MACHINE_X86_XT                  2
353    
354    
355  /*  /*
356   *  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 385  void store_string(struct cpu *cpu, uint6
385  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);
386  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);
387  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);
388    void store_byte(struct cpu *cpu, uint64_t addr, uint8_t data);
389  void store_64bit_word_in_host(struct cpu *cpu, unsigned char *data,  void store_64bit_word_in_host(struct cpu *cpu, unsigned char *data,
390          uint64_t data32);          uint64_t data32);
391  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.12

  ViewVC Help
Powered by ViewVC 1.1.26