/[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 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 28 by dpavlin, Mon Oct 8 16:20:26 2007 UTC
# Line 2  Line 2 
2  #define DEVICES_H  #define DEVICES_H
3    
4  /*  /*
5   *  Copyright (C) 2003-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2003-2006  Anders Gavare.  All rights reserved.
6   *   *
7   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
8   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: devices.h,v 1.194 2005/11/22 02:07:40 debug Exp $   *  $Id: devices.h,v 1.213 2006/07/08 12:30:03 debug Exp $
32   *   *
33   *  Memory mapped devices.   *  Memory mapped devices.
34   *   *
# Line 76  struct dec_ioasic_data { Line 76  struct dec_ioasic_data {
76  int dev_dec_ioasic_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_dec_ioasic_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
77  struct dec_ioasic_data *dev_dec_ioasic_init(struct cpu *cpu, struct memory *mem, uint64_t baseaddr, int rackmount_flag);  struct dec_ioasic_data *dev_dec_ioasic_init(struct cpu *cpu, struct memory *mem, uint64_t baseaddr, int rackmount_flag);
78    
79    /*  dev_algor.c:  */
80    struct algor_data {
81            uint64_t        base_addr;
82    };
83    
84  /*  dev_asc.c:  */  /*  dev_asc.c:  */
85  #define DEV_ASC_DEC_LENGTH              0x40000  #define DEV_ASC_DEC_LENGTH              0x40000
86  #define DEV_ASC_PICA_LENGTH             0x1000  #define DEV_ASC_PICA_LENGTH             0x1000
# Line 143  void dev_bt459_init(struct machine *mach Line 148  void dev_bt459_init(struct machine *mach
148          int color_fb_flag, int irq_nr, int type);          int color_fb_flag, int irq_nr, int type);
149    
150  /*  dev_cons.c:  */  /*  dev_cons.c:  */
 #define DEV_CONS_ADDRESS                0x0000000010000000  
 #define DEV_CONS_LENGTH                 0x0000000000000020  
 #define     DEV_CONS_PUTGETCHAR             0x0000  
 #define     DEV_CONS_HALT                   0x0010  
151  struct cons_data {  struct cons_data {
152          int     console_handle;          int     console_handle;
153          int     irq_nr;          int     irq_nr;
154            int     in_use;
155  };  };
156    
157  /*  dev_colorplanemask.c:  */  /*  dev_colorplanemask.c:  */
# Line 195  void dev_deccca_init(struct memory *mem, Line 197  void dev_deccca_init(struct memory *mem,
197  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 *);
198  void dev_decxmi_init(struct memory *mem, uint64_t baseaddr);  void dev_decxmi_init(struct memory *mem, uint64_t baseaddr);
199    
 /*  dev_disk.c:  */  
 #define DEV_DISK_ADDRESS                0x13000000  
   
200  /*  dev_eagle.c:  */  /*  dev_eagle.c:  */
201  struct pci_data *dev_eagle_init(struct machine *machine, struct memory *mem,  struct pci_data *dev_eagle_init(struct machine *machine, struct memory *mem,
202          int irqbase, int pciirq);          int irqbase, int pciirq);
203    
 /*  dev_ether.c:  */  
 #define DEV_ETHER_ADDRESS               0x14000000  
 #define DEV_ETHER_LENGTH                0x8000  
   
204  /*  dev_fb.c:  */  /*  dev_fb.c:  */
 #define DEV_FB_ADDRESS          0x12000000      /*  Default for testmips  */  
205  #define DEV_FB_LENGTH           0x3c0000        /*  3c0000 to not colide with */  #define DEV_FB_LENGTH           0x3c0000        /*  3c0000 to not colide with */
206                                                  /*  turbochannel rom,         */                                                  /*  turbochannel rom,         */
207                                                  /*  otherwise size = 4MB      */                                                  /*  otherwise size = 4MB      */
208    /*  Type:  */
209  #define VFB_GENERIC             0  #define VFB_GENERIC             0
210  #define VFB_HPC                 1  #define VFB_HPC                 1
211  #define VFB_DEC_VFB01           2  #define VFB_DEC_VFB01           2
212  #define VFB_DEC_VFB02           3  #define VFB_DEC_VFB02           3
213  #define VFB_DEC_MAXINE          4  #define VFB_DEC_MAXINE          4
214  #define VFB_PLAYSTATION2        5  #define VFB_PLAYSTATION2        5
215    /*  Extra flags:  */
216    #define VFB_REVERSE_START       0x10000
217  struct vfb_data {  struct vfb_data {
218            struct memory   *memory;
219          int             vfb_type;          int             vfb_type;
220    
221          int             vfb_scaledown;          int             vfb_scaledown;
# Line 226  struct vfb_data { Line 224  struct vfb_data {
224          int             ysize;          int             ysize;
225          int             bit_depth;          int             bit_depth;
226          int             color32k;       /*  hack for 16-bit HPCmips  */          int             color32k;       /*  hack for 16-bit HPCmips  */
227          int             psp_15bit;      /*  plastation portable hack  */          int             psp_15bit;      /*  playstation portable hack  */
228    
229          unsigned char   color_plane_mask;          unsigned char   color_plane_mask;
230    
# Line 243  struct vfb_data { Line 241  struct vfb_data {
241          /*  RGB palette for <= 8 bit modes:  (r,g,b bytes for each)  */          /*  RGB palette for <= 8 bit modes:  (r,g,b bytes for each)  */
242          unsigned char   rgb_palette[256 * 3];          unsigned char   rgb_palette[256 * 3];
243    
244            char            *name;
245            char            title[100];
246    
247            void (*redraw_func)(struct vfb_data *, int, int);
248    
249          /*  These should always be in sync:  */          /*  These should always be in sync:  */
250          unsigned char   *framebuffer;          unsigned char   *framebuffer;
251          struct fb_window *fb_window;          struct fb_window *fb_window;
# Line 286  struct footbridge_data { Line 289  struct footbridge_data {
289          uint32_t        fiq_enable;          uint32_t        fiq_enable;
290  };  };
291    
292    /*  dev_gc.c:  */
293    struct gc_data {
294            int             reassert_irq;
295            uint32_t        status_hi;
296            uint32_t        status_lo;
297            uint32_t        enable_hi;
298            uint32_t        enable_lo;
299    };
300    struct gc_data *dev_gc_init(struct machine *, struct memory *, uint64_t addr,
301            int reassert_irq);
302    
303  /*  dev_gt.c:  */  /*  dev_gt.c:  */
304  #define DEV_GT_LENGTH                   0x1000  #define DEV_GT_LENGTH                   0x1000
305  int dev_gt_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,  int dev_gt_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,
# Line 293  int dev_gt_access(struct cpu *cpu, struc Line 307  int dev_gt_access(struct cpu *cpu, struc
307  struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem,  struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem,
308          uint64_t baseaddr, int irq_nr, int pciirq, int type);          uint64_t baseaddr, int irq_nr, int pciirq, int type);
309    
310    /*  dev_i80321.c:  */
311    struct i80321_data {
312            /*  Interrupt Controller  */
313            int             reassert_irq;
314            uint32_t        status;
315            uint32_t        enable;
316    
317            uint32_t        pci_addr;
318            struct pci_data *pci_bus;
319    
320            /*  Memory Controller:  */
321            uint32_t        mcu_reg[0x100 / sizeof(uint32_t)];
322    };
323    
324  /*  dev_jazz.c:  */  /*  dev_jazz.c:  */
325  #define DEV_JAZZ_LENGTH                 0x280  #define DEV_JAZZ_LENGTH                 0x280
326  struct jazz_data {  struct jazz_data {
# Line 346  void dev_vdac_init(struct memory *mem, u Line 374  void dev_vdac_init(struct memory *mem, u
374  /*  dev_kn02.c:  */  /*  dev_kn02.c:  */
375  struct kn02_csr {  struct kn02_csr {
376          uint8_t         csr[sizeof(uint32_t)];          uint8_t         csr[sizeof(uint32_t)];
377          uint8_t         filler[4096 - sizeof(uint32_t)];  /*  for bintrans mapping  */          uint8_t         filler[4096 - sizeof(uint32_t)];  /*  for dyntrans mapping  */
378  };  };
379  int dev_kn02_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_kn02_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
380  struct kn02_csr *dev_kn02_init(struct cpu *cpu, struct memory *mem,  struct kn02_csr *dev_kn02_init(struct cpu *cpu, struct memory *mem,
# Line 593  int dev_mace_access(struct cpu *cpu, str Line 621  int dev_mace_access(struct cpu *cpu, str
621  struct mace_data *dev_mace_init(struct memory *mem, uint64_t baseaddr, int irqnr);  struct mace_data *dev_mace_init(struct memory *mem, uint64_t baseaddr, int irqnr);
622  #define DEV_MACEPCI_LENGTH              0x1000  #define DEV_MACEPCI_LENGTH              0x1000
623  int dev_macepci_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_macepci_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
624  struct pci_data *dev_macepci_init(struct memory *mem, uint64_t baseaddr, int pciirq);  struct pci_data *dev_macepci_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int pciirq);
625  #define DEV_SGI_MEC_LENGTH              0x1000  #define DEV_SGI_MEC_LENGTH              0x1000
626  int dev_sgi_mec_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_sgi_mec_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
627  void dev_sgi_mec_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int irq_nr, unsigned char *macaddr);  void dev_sgi_mec_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int irq_nr, unsigned char *macaddr);
# Line 624  void dev_turbochannel_init(struct machin Line 652  void dev_turbochannel_init(struct machin
652          int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name,          int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name,
653          int irq);          int irq);
654    
655    /*  dev_uninorth.c:  */
656    struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem,
657            uint64_t addr, int irqbase, int pciirq);
658    
659    /*  dev_v3.c:  */
660    struct v3_data {
661            struct pci_data *pci_data;
662            uint16_t        lb_map0;
663    };
664    struct v3_data *dev_v3_init(struct machine *, struct memory *);
665    
666  /*  dev_vga.c:  */  /*  dev_vga.c:  */
667  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,
668          unsigned char *data, size_t len, int writeflag, void *);          unsigned char *data, size_t len, int writeflag, void *);
# Line 636  struct vr41xx_data { Line 675  struct vr41xx_data {
675          int             cpumodel;          int             cpumodel;
676    
677          int             kiu_console_handle;          int             kiu_console_handle;
678          int             kiu_offset;          uint32_t        kiu_offset;
679          int             kiu_irq_nr;          int             kiu_irq_nr;
680          int             kiu_int_assert;          int             kiu_int_assert;
681          int             d0;          int             d0;
# Line 669  struct vr41xx_data *dev_vr41xx_init(stru Line 708  struct vr41xx_data *dev_vr41xx_init(stru
708  int dev_wdsc_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);  int dev_wdsc_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *);
709  void dev_wdsc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int controller_nr, int irq_nr);  void dev_wdsc_init(struct machine *machine, struct memory *mem, uint64_t baseaddr, int controller_nr, int irq_nr);
710    
 /*  dev_zs.c:  */  
 #define DEV_ZS_LENGTH                   0x10  
 int dev_zs_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr,  
         unsigned char *data, size_t len, int writeflag, void *);  
 int dev_zs_init(struct machine *machine, struct memory *mem, uint64_t baseaddr,  
         int irq_nr, int addrmult, char *name);  
   
711  /*  lk201.c:  */  /*  lk201.c:  */
712  struct lk201_data {  struct lk201_data {
713          int                     use_fb;          int                     use_fb;

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

  ViewVC Help
Powered by ViewVC 1.1.26