/[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 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 16 by dpavlin, Mon Oct 8 16:19:01 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: devices.h,v 1.162 2005/04/11 20:44:40 debug Exp $   *  $Id: devices.h,v 1.185 2005/10/08 22:54:04 debug Exp $
32   *   *
33   *  Memory mapped devices.   *  Memory mapped devices.
34   *   *
# Line 48  struct pci_data; Line 48  struct pci_data;
48  #include <X11/Xlib.h>  #include <X11/Xlib.h>
49  #endif */  #endif */
50    
51    /*  dev_8259.c:  */
52    struct pic8259_data {
53            int             irq_nr;         /*  if connected to another 8259  */
54    
55            int             irq_base;
56            int             current_command;
57    
58            int             init_state;
59    
60            int             priority_reg;
61            uint8_t         irr;            /*  interrupt request register  */
62            uint8_t         isr;            /*  interrupt in-service register  */
63            uint8_t         ier;            /*  interrupt enable register  */
64    };
65    
66  /*  dev_dec_ioasic.c:  */  /*  dev_dec_ioasic.c:  */
67  #define DEV_DEC_IOASIC_LENGTH           0x80100  #define DEV_DEC_IOASIC_LENGTH           0x80100
# Line 123  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 164  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_HPCMIPS             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 180  struct vfb_data { Line 203  struct vfb_data {
203          int             xsize;          int             xsize;
204          int             ysize;          int             ysize;
205          int             bit_depth;          int             bit_depth;
206          int             color32k;          int             color32k;       /*  hack for 16-bit HPCmips  */
207            int             psp_15bit;      /*  plastation portable hack  */
208    
209          unsigned char   color_plane_mask;          unsigned char   color_plane_mask;
210    
# Line 206  struct vfb_data { Line 230  struct vfb_data {
230  #define VFB_MFB_VRAM                    0x200000  #define VFB_MFB_VRAM                    0x200000
231  #define VFB_CFB_BT459                   0x200000  #define VFB_CFB_BT459                   0x200000
232  void set_grayscale_palette(struct vfb_data *d, int ncolors);  void set_grayscale_palette(struct vfb_data *d, int ncolors);
233    void dev_fb_resize(struct vfb_data *d, int new_xsize, int new_ysize);
234  void dev_fb_setcursor(struct vfb_data *d, int cursor_x, int cursor_y, int on,  void dev_fb_setcursor(struct vfb_data *d, int cursor_x, int cursor_y, int on,
235          int cursor_xsize, int cursor_ysize);          int cursor_xsize, int cursor_ysize);
236  void framebuffer_blockcopyfill(struct vfb_data *d, int fillflag, int fill_r,  void framebuffer_blockcopyfill(struct vfb_data *d, int fillflag, int fill_r,
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    
258            uint32_t        irq_status;
259            uint32_t        irq_enable;
260    
261            uint32_t        fiq_status;
262            uint32_t        fiq_enable;
263    };
264    
265  /*  dev_gt.c:  */  /*  dev_gt.c:  */
266  #define DEV_GT_LENGTH                   0x0000000000001000  #define DEV_GT_LENGTH                   0x1000
267  int dev_gt_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_gt_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
268  struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int irq_nr, int pciirq);          unsigned char *data, size_t len, int writeflag, void *);
269    struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem,
270            uint64_t baseaddr, int irq_nr, int pciirq, int type);
271    
272  /*  dev_jazz.c:  */  /*  dev_jazz.c:  */
273  #define DEV_JAZZ_LENGTH                 0x280  #define DEV_JAZZ_LENGTH                 0x280
# Line 310  int dev_m700_fb_access(struct cpu *cpu, Line 358  int dev_m700_fb_access(struct cpu *cpu,
358  void dev_m700_fb_init(struct machine *machine, struct memory *mem,  void dev_m700_fb_init(struct machine *machine, struct memory *mem,
359          uint64_t baseaddr, uint64_t baseaddr2);          uint64_t baseaddr, uint64_t baseaddr2);
360    
361  /*  dev_ns16550.c:  */  /*  dev_malta.c:  */
362  #define DEV_NS16550_LENGTH              0x0000000000000008  struct malta_data {
363  /*  see comreg.h and ns16550reg.h for more info  */          uint8_t         assert_lo;
364  int dev_ns16550_access(struct cpu *cpu, struct memory *mem,          uint8_t         assert_hi;
365          uint64_t relative_addr, unsigned char *data, size_t len,          uint8_t         disable_lo;
366          int writeflag, void *);          uint8_t         disable_hi;
367  int dev_ns16550_init(struct machine *machine, struct memory *mem,          int             poll_mode;
368          uint64_t baseaddr, int irq_nr, int addrmult, int in_use, char *name);  };
369    
370  /*  dev_mc146818.c:  */  /*  dev_mc146818.c:  */
371  #define DEV_MC146818_LENGTH             0x0000000000000100  #define DEV_MC146818_LENGTH             0x0000000000000100
# Line 326  int dev_ns16550_init(struct machine *mac Line 374  int dev_ns16550_init(struct machine *mac
374  #define MC146818_ARC_NEC        2  #define MC146818_ARC_NEC        2
375  #define MC146818_ARC_JAZZ       3  #define MC146818_ARC_JAZZ       3
376  #define MC146818_SGI            4  #define MC146818_SGI            4
377    #define MC146818_CATS           5
378  /*  see mc146818reg.h for more info  */  /*  see mc146818reg.h for more info  */
379  void dev_mc146818_tick(struct cpu *cpu, void *);  void dev_mc146818_tick(struct cpu *cpu, void *);
380  int dev_mc146818_access(struct cpu *cpu, struct memory *mem,  int dev_mc146818_access(struct cpu *cpu, struct memory *mem,
# Line 344  int dev_pckbc_access(struct cpu *cpu, st Line 393  int dev_pckbc_access(struct cpu *cpu, st
393          int writeflag, void *);          int writeflag, void *);
394  int dev_pckbc_init(struct machine *machine, struct memory *mem,  int dev_pckbc_init(struct machine *machine, struct memory *mem,
395          uint64_t baseaddr, int type, int keyboard_irqnr, int mouse_irqnr,          uint64_t baseaddr, int type, int keyboard_irqnr, int mouse_irqnr,
396          int in_use);          int in_use, int pc_style_flag);
397    
398  /*  dev_pmppc.c:  */  /*  dev_pmppc.c:  */
399  int dev_pmppc_board_access(struct cpu *cpu, struct memory *mem,  int dev_pmppc_board_access(struct cpu *cpu, struct memory *mem,
# Line 524  void dev_ssc_init(struct machine *machin Line 573  void dev_ssc_init(struct machine *machin
573    
574  /*  dev_turbochannel.c:  */  /*  dev_turbochannel.c:  */
575  #define DEV_TURBOCHANNEL_LEN            0x0470  #define DEV_TURBOCHANNEL_LEN            0x0470
576  int dev_turbochannel_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_turbochannel_access(struct cpu *cpu, struct memory *mem,
577  void dev_turbochannel_init(struct machine *machine, struct memory *mem, int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name, int irq);          uint64_t relative_addr, unsigned char *data, size_t len,
578            int writeflag, void *);
579    void dev_turbochannel_init(struct machine *machine, struct memory *mem,
580            int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name,
581            int irq);
582    
583  /*  dev_vga.c:  */  /*  dev_vga.c:  */
584  int dev_vga_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,  int dev_vga_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
585          unsigned char *data, size_t len, int writeflag, void *);          unsigned char *data, size_t len, int writeflag, void *);
586  void dev_vga_init(struct machine *machine, struct memory *mem,  void dev_vga_init(struct machine *machine, struct memory *mem,
587          uint64_t videomem_base, uint64_t control_base, int max_x, int max_y,          uint64_t videomem_base, uint64_t control_base, char *name);
         char *name);  
588    
589  /*  dev_vr41xx.c:  */  /*  dev_vr41xx.c:  */
590  #define DEV_VR41XX_LENGTH               0x800           /*  TODO?  */  #define DEV_VR41XX_LENGTH               0x800           /*  TODO?  */
# Line 567  int dev_vr41xx_access(struct cpu *cpu, s Line 619  int dev_vr41xx_access(struct cpu *cpu, s
619  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,
620          struct memory *mem, int cpumodel);          struct memory *mem, int cpumodel);
621    
 /*  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);  
   
622  /*  dev_wdsc.c:  */  /*  dev_wdsc.c:  */
623  #define DEV_WDSC_NREGS                  0x100           /*  8-bit register select  */  #define DEV_WDSC_NREGS                  0x100           /*  8-bit register select  */
624  #define DEV_WDSC_LENGTH                 0x10  #define DEV_WDSC_LENGTH                 0x10

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

  ViewVC Help
Powered by ViewVC 1.1.26