/[gxemul]/trunk/src/include/devices.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/devices.h

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

revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: devices.h,v 1.171 2005/06/24 09:33:37 debug Exp $   *  $Id: devices.h,v 1.188 2005/10/26 14:37:06 debug Exp $
32   *   *
33   *  Memory mapped devices.   *  Memory mapped devices.
34   *   *
# Line 137  void dev_bt459_init(struct machine *mach Line 137  void dev_bt459_init(struct machine *mach
137  #define DEV_CONS_LENGTH                 0x0000000000000020  #define DEV_CONS_LENGTH                 0x0000000000000020
138  #define     DEV_CONS_PUTGETCHAR             0x0000  #define     DEV_CONS_PUTGETCHAR             0x0000
139  #define     DEV_CONS_HALT                   0x0010  #define     DEV_CONS_HALT                   0x0010
140  int dev_cons_access(struct cpu *cpu, struct memory *mem,  struct cons_data {
141          uint64_t relative_addr, unsigned char *data, size_t len,          int     console_handle;
142          int writeflag, void *);          int     irq_nr;
143  int dev_cons_init(struct machine *machine, struct memory *mem,  };
         uint64_t baseaddr, char *name, int irq_nr);  
144    
145  /*  dev_colorplanemask.c:  */  /*  dev_colorplanemask.c:  */
146  #define DEV_COLORPLANEMASK_LENGTH       0x0000000000000010  #define DEV_COLORPLANEMASK_LENGTH       0x0000000000000010
# Line 178  void dev_deccca_init(struct memory *mem, Line 177  void dev_deccca_init(struct memory *mem,
177  int dev_decxmi_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_decxmi_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
178  void dev_decxmi_init(struct memory *mem, uint64_t baseaddr);  void dev_decxmi_init(struct memory *mem, uint64_t baseaddr);
179    
180    /*  dev_disk.c:  */
181    #define DEV_DISK_ADDRESS                0x13000000
182    
183    /*  dev_ether.c:  */
184    #define DEV_ETHER_ADDRESS               0x14000000
185    #define DEV_ETHER_LENGTH                0x8000
186    
187  /*  dev_fb.c:  */  /*  dev_fb.c:  */
188  #define DEV_FB_LENGTH                   0x3c0000        /*  3c0000 to not colide with turbochannel rom, otherwise size = (4*1024*1024)  */  #define DEV_FB_ADDRESS          0x12000000      /*  Default for testmips  */
189  #define VFB_GENERIC                     0  #define DEV_FB_LENGTH           0x3c0000        /*  3c0000 to not colide with */
190  #define VFB_HPCMIPS                     1                                                  /*  turbochannel rom,         */
191  #define VFB_DEC_VFB01                   2                                                  /*  otherwise size = 4MB      */
192  #define VFB_DEC_VFB02                   3  #define VFB_GENERIC             0
193  #define VFB_DEC_MAXINE                  4  #define VFB_HPC                 1
194  #define VFB_PLAYSTATION2                5  #define VFB_DEC_VFB01           2
195    #define VFB_DEC_VFB02           3
196    #define VFB_DEC_MAXINE          4
197    #define VFB_PLAYSTATION2        5
198  struct vfb_data {  struct vfb_data {
199          int             vfb_type;          int             vfb_type;
200    
# Line 228  void framebuffer_blockcopyfill(struct vf Line 237  void framebuffer_blockcopyfill(struct vf
237          int fill_g, int fill_b, int x1, int y1, int x2, int y2,          int fill_g, int fill_b, int x1, int y1, int x2, int y2,
238          int from_x, int from_y);          int from_x, int from_y);
239  void dev_fb_tick(struct cpu *, void *);  void dev_fb_tick(struct cpu *, void *);
240  int dev_fb_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_fb_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
241  struct vfb_data *dev_fb_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int vfb_type,          unsigned char *data, size_t len, int writeflag, void *);
242          int visible_xsize, int visible_ysize, int xsize, int ysize, int bit_depth, char *name, int logo);  struct vfb_data *dev_fb_init(struct machine *machine, struct memory *mem,
243            uint64_t baseaddr, int vfb_type, int visible_xsize, int visible_ysize,
244            int xsize, int ysize, int bit_depth, char *name);
245    
246    /*  dev_footbridge:  */
247    #define N_FOOTBRIDGE_TIMERS             4
248    struct footbridge_data {
249            struct pci_data *pcibus;
250    
251            int             console_handle;
252    
253            int             timer_tick_countdown[N_FOOTBRIDGE_TIMERS];
254            uint32_t        timer_load[N_FOOTBRIDGE_TIMERS];
255            uint32_t        timer_value[N_FOOTBRIDGE_TIMERS];
256            uint32_t        timer_control[N_FOOTBRIDGE_TIMERS];
257            int             timer_being_read;
258            int             timer_poll_mode;
259    
260            uint32_t        irq_status;
261            uint32_t        irq_enable;
262    
263            uint32_t        fiq_status;
264            uint32_t        fiq_enable;
265    };
266    
267  /*  dev_gt.c:  */  /*  dev_gt.c:  */
268  #define DEV_GT_LENGTH                   0x1000  #define DEV_GT_LENGTH                   0x1000
# Line 328  int dev_m700_fb_access(struct cpu *cpu, Line 360  int dev_m700_fb_access(struct cpu *cpu,
360  void dev_m700_fb_init(struct machine *machine, struct memory *mem,  void dev_m700_fb_init(struct machine *machine, struct memory *mem,
361          uint64_t baseaddr, uint64_t baseaddr2);          uint64_t baseaddr, uint64_t baseaddr2);
362    
 /*  dev_ns16550.c:  */  
 #define DEV_NS16550_LENGTH              0x0000000000000008  
 /*  see comreg.h and ns16550reg.h for more info  */  
 int dev_ns16550_access(struct cpu *cpu, struct memory *mem,  
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *);  
 int dev_ns16550_init(struct machine *machine, struct memory *mem,  
         uint64_t baseaddr, int irq_nr, int addrmult, int in_use, char *name);  
   
363  /*  dev_malta.c:  */  /*  dev_malta.c:  */
364  struct malta_data {  struct malta_data {
365          uint8_t         assert_lo;          uint8_t         assert_lo;
# Line 353  struct malta_data { Line 376  struct malta_data {
376  #define MC146818_ARC_NEC        2  #define MC146818_ARC_NEC        2
377  #define MC146818_ARC_JAZZ       3  #define MC146818_ARC_JAZZ       3
378  #define MC146818_SGI            4  #define MC146818_SGI            4
379    #define MC146818_CATS           5
380  /*  see mc146818reg.h for more info  */  /*  see mc146818reg.h for more info  */
381  void dev_mc146818_tick(struct cpu *cpu, void *);  void dev_mc146818_tick(struct cpu *cpu, void *);
382  int dev_mc146818_access(struct cpu *cpu, struct memory *mem,  int dev_mc146818_access(struct cpu *cpu, struct memory *mem,
# Line 434  struct px_data { Line 458  struct px_data {
458  #define DEV_PX_TYPE_PXGPLUS             2  #define DEV_PX_TYPE_PXGPLUS             2
459  #define DEV_PX_TYPE_PXGPLUSTURBO        3  #define DEV_PX_TYPE_PXGPLUSTURBO        3
460  #define DEV_PX_LENGTH                   0x3c0000  #define DEV_PX_LENGTH                   0x3c0000
461  int dev_px_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_px_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
462  void dev_px_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int px_type, int irq_nr);          unsigned char *data, size_t len, int writeflag, void *);
463    void dev_px_init(struct machine *machine, struct memory *mem, uint64_t baseaddr,
464            int px_type, int irq_nr);
465    
466  /*  dev_ram.c:  */  /*  dev_ram.c:  */
467  #define DEV_RAM_RAM             0  #define DEV_RAM_RAM                             0
468  #define DEV_RAM_MIRROR          1  #define DEV_RAM_MIRROR                          1
469  int dev_ram_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  #define DEV_RAM_MIGHT_POINT_TO_DEVICES          0x10
470  void dev_ram_init(struct memory *mem, uint64_t baseaddr, uint64_t length, int mode, uint64_t otheraddr);  int dev_ram_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
471            unsigned char *data, size_t len, int writeflag, void *);
472    void dev_ram_init(struct machine *machine, uint64_t baseaddr, uint64_t length,
473            int mode, uint64_t otheraddr);
474    
475  /*  dev_scc.c:  */  /*  dev_scc.c:  */
476  #define DEV_SCC_LENGTH                  0x1000  #define DEV_SCC_LENGTH                  0x1000
477  int dev_scc_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_scc_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
478  int dev_scc_dma_func(struct cpu *cpu, void *extra, uint64_t addr, size_t dma_len, int tx);          unsigned char *data, size_t len, int writeflag, void *);
479  void *dev_scc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int irq_nr, int use_fb, int scc_nr, int addrmul);  int dev_scc_dma_func(struct cpu *cpu, void *extra, uint64_t addr,
480            size_t dma_len, int tx);
481    void *dev_scc_init(struct machine *machine, struct memory *mem,
482            uint64_t baseaddr, int irq_nr, int use_fb, int scc_nr, int addrmul);
483    
484  /*  dev_sfb.c:  */  /*  dev_sfb.c:  */
485  #define DEV_SFB_LENGTH          0x400000  #define DEV_SFB_LENGTH          0x400000
486  int dev_sfb_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_sfb_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
487  void dev_sfb_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, struct vfb_data *vfb_data);          unsigned char *data, size_t len, int writeflag, void *);
488    void dev_sfb_init(struct machine *machine, struct memory *mem,
489            uint64_t baseaddr, struct vfb_data *vfb_data);
490    
491  /*  dev_sgi_gbe.c:  */  /*  dev_sgi_gbe.c:  */
492  #define DEV_SGI_GBE_LENGTH              0x1000000  #define DEV_SGI_GBE_LENGTH              0x1000000
493  int dev_sgi_gbe_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_sgi_gbe_access(struct cpu *cpu, struct memory *mem,
494  void dev_sgi_gbe_init(struct machine *machine, struct memory *mem, uint64_t baseaddr);          uint64_t relative_addr, unsigned char *data, size_t len, int writeflag,
495            void *);
496    void dev_sgi_gbe_init(struct machine *machine, struct memory *mem,
497            uint64_t baseaddr);
498    
499  /*  dev_sgi_ip20.c:  */  /*  dev_sgi_ip20.c:  */
500  #define DEV_SGI_IP20_LENGTH             0x40  #define DEV_SGI_IP20_LENGTH             0x40
# Line 597  int dev_vr41xx_access(struct cpu *cpu, s Line 634  int dev_vr41xx_access(struct cpu *cpu, s
634  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,
635          struct memory *mem, int cpumodel);          struct memory *mem, int cpumodel);
636    
 /*  dev_wdc.c:  */  
 #define DEV_WDC_LENGTH                  0x8  
 int dev_wdc_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  
 void dev_wdc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int irq_nr, int base_drive);  
   
637  /*  dev_wdsc.c:  */  /*  dev_wdsc.c:  */
638  #define DEV_WDSC_NREGS                  0x100           /*  8-bit register select  */  #define DEV_WDSC_NREGS                  0x100           /*  8-bit register select  */
639  #define DEV_WDSC_LENGTH                 0x10  #define DEV_WDSC_LENGTH                 0x10

Legend:
Removed from v.10  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26