/[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 24 by dpavlin, Mon Oct 8 16:19:56 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.212 2006/06/16 18:31:26 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          int             vfb_type;          int             vfb_type;
219    
# Line 226  struct vfb_data { Line 223  struct vfb_data {
223          int             ysize;          int             ysize;
224          int             bit_depth;          int             bit_depth;
225          int             color32k;       /*  hack for 16-bit HPCmips  */          int             color32k;       /*  hack for 16-bit HPCmips  */
226          int             psp_15bit;      /*  plastation portable hack  */          int             psp_15bit;      /*  playstation portable hack  */
227    
228          unsigned char   color_plane_mask;          unsigned char   color_plane_mask;
229    
# Line 243  struct vfb_data { Line 240  struct vfb_data {
240          /*  RGB palette for <= 8 bit modes:  (r,g,b bytes for each)  */          /*  RGB palette for <= 8 bit modes:  (r,g,b bytes for each)  */
241          unsigned char   rgb_palette[256 * 3];          unsigned char   rgb_palette[256 * 3];
242    
243            void (*redraw_func)(struct vfb_data *, int, int);
244    
245          /*  These should always be in sync:  */          /*  These should always be in sync:  */
246          unsigned char   *framebuffer;          unsigned char   *framebuffer;
247          struct fb_window *fb_window;          struct fb_window *fb_window;
# Line 286  struct footbridge_data { Line 285  struct footbridge_data {
285          uint32_t        fiq_enable;          uint32_t        fiq_enable;
286  };  };
287    
288    /*  dev_gc.c:  */
289    struct gc_data {
290            int             reassert_irq;
291            uint32_t        status_hi;
292            uint32_t        status_lo;
293            uint32_t        enable_hi;
294            uint32_t        enable_lo;
295    };
296    struct gc_data *dev_gc_init(struct machine *, struct memory *, uint64_t addr,
297            int reassert_irq);
298    
299  /*  dev_gt.c:  */  /*  dev_gt.c:  */
300  #define DEV_GT_LENGTH                   0x1000  #define DEV_GT_LENGTH                   0x1000
301  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 303  int dev_gt_access(struct cpu *cpu, struc
303  struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem,  struct pci_data *dev_gt_init(struct machine *machine, struct memory *mem,
304          uint64_t baseaddr, int irq_nr, int pciirq, int type);          uint64_t baseaddr, int irq_nr, int pciirq, int type);
305    
306    /*  dev_i80321.c:  */
307    struct i80321_data {
308            /*  Interrupt Controller  */
309            int             reassert_irq;
310            uint32_t        status;
311            uint32_t        enable;
312    
313            uint32_t        pci_addr;
314            struct pci_data *pci_bus;
315    
316            /*  Memory Controller:  */
317            uint32_t        mcu_reg[0x100 / sizeof(uint32_t)];
318    };
319    
320  /*  dev_jazz.c:  */  /*  dev_jazz.c:  */
321  #define DEV_JAZZ_LENGTH                 0x280  #define DEV_JAZZ_LENGTH                 0x280
322  struct jazz_data {  struct jazz_data {
# Line 346  void dev_vdac_init(struct memory *mem, u Line 370  void dev_vdac_init(struct memory *mem, u
370  /*  dev_kn02.c:  */  /*  dev_kn02.c:  */
371  struct kn02_csr {  struct kn02_csr {
372          uint8_t         csr[sizeof(uint32_t)];          uint8_t         csr[sizeof(uint32_t)];
373          uint8_t         filler[4096 - sizeof(uint32_t)];  /*  for bintrans mapping  */          uint8_t         filler[4096 - sizeof(uint32_t)];  /*  for dyntrans mapping  */
374  };  };
375  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 *);
376  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 617  int dev_mace_access(struct cpu *cpu, str
617  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);
618  #define DEV_MACEPCI_LENGTH              0x1000  #define DEV_MACEPCI_LENGTH              0x1000
619  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 *);
620  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);
621  #define DEV_SGI_MEC_LENGTH              0x1000  #define DEV_SGI_MEC_LENGTH              0x1000
622  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 *);
623  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 648  void dev_turbochannel_init(struct machin
648          int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name,          int slot_nr, uint64_t baseaddr, uint64_t endaddr, char *device_name,
649          int irq);          int irq);
650    
651    /*  dev_uninorth.c:  */
652    struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem,
653            uint64_t addr, int irqbase, int pciirq);
654    
655    /*  dev_v3.c:  */
656    struct v3_data {
657            struct pci_data *pci_data;
658            uint16_t        lb_map0;
659    };
660    struct v3_data *dev_v3_init(struct machine *, struct memory *);
661    
662  /*  dev_vga.c:  */  /*  dev_vga.c:  */
663  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,
664          unsigned char *data, size_t len, int writeflag, void *);          unsigned char *data, size_t len, int writeflag, void *);
# Line 636  struct vr41xx_data { Line 671  struct vr41xx_data {
671          int             cpumodel;          int             cpumodel;
672    
673          int             kiu_console_handle;          int             kiu_console_handle;
674          int             kiu_offset;          uint32_t        kiu_offset;
675          int             kiu_irq_nr;          int             kiu_irq_nr;
676          int             kiu_int_assert;          int             kiu_int_assert;
677          int             d0;          int             d0;
# Line 669  struct vr41xx_data *dev_vr41xx_init(stru Line 704  struct vr41xx_data *dev_vr41xx_init(stru
704  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 *);
705  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);
706    
 /*  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);  
   
707  /*  lk201.c:  */  /*  lk201.c:  */
708  struct lk201_data {  struct lk201_data {
709          int                     use_fb;          int                     use_fb;

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

  ViewVC Help
Powered by ViewVC 1.1.26