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

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

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_dec_ioasic.c,v 1.17 2007/01/28 14:15:30 debug Exp $   *  $Id: dev_dec_ioasic.c,v 1.18 2007/06/15 18:44:19 debug Exp $
29   *     *
30   *  DECstation "3MIN" and "3MAX" IOASIC device.   *  COMMENT: IOASIC device used in the DECstation "3MIN" and "3MAX" machines
31   *   *
32   *  TODO:  Lots of stuff, such as DMA and all bits in the control registers.   *  TODO:  Lots of stuff, such as DMA and all bits in the control registers.
33   */   */
# Line 47  Line 47 
47  #define IOASIC_DEBUG  #define IOASIC_DEBUG
48  /* #define debug fatal */  /* #define debug fatal */
49    
50  /*  
  *  dev_dec_ioasic_access():  
  */  
51  DEVICE_ACCESS(dec_ioasic)  DEVICE_ACCESS(dec_ioasic)
52  {  {
53          struct dec_ioasic_data *d = (struct dec_ioasic_data *) extra;          struct dec_ioasic_data *d = extra;
54          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
55          uint64_t curptr;          uint64_t curptr;
         int dma_len, dma_res;  
56          uint32_t csr;          uint32_t csr;
57          int regnr;          int dma_len, dma_res, regnr;
58    
59          if (writeflag == MEM_WRITE)          if (writeflag == MEM_WRITE)
60                  idata = memory_readmax64(cpu, data, len);                  idata = memory_readmax64(cpu, data, len);
# Line 254  abort(); Line 251  abort();
251  struct dec_ioasic_data *dev_dec_ioasic_init(struct cpu *cpu,  struct dec_ioasic_data *dev_dec_ioasic_init(struct cpu *cpu,
252          struct memory *mem, uint64_t baseaddr, int rackmount_flag)          struct memory *mem, uint64_t baseaddr, int rackmount_flag)
253  {  {
254          struct dec_ioasic_data *d = malloc(sizeof(struct dec_ioasic_data));          struct dec_ioasic_data *d;
255          if (d == NULL) {  
256                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct dec_ioasic_data)));
                 exit(1);  
         }  
257          memset(d, 0, sizeof(struct dec_ioasic_data));          memset(d, 0, sizeof(struct dec_ioasic_data));
258    
259          d->rackmount_flag = rackmount_flag;          d->rackmount_flag = rackmount_flag;
# Line 266  struct dec_ioasic_data *dev_dec_ioasic_i Line 261  struct dec_ioasic_data *dev_dec_ioasic_i
261          memory_device_register(mem, "dec_ioasic", baseaddr,          memory_device_register(mem, "dec_ioasic", baseaddr,
262              DEV_DEC_IOASIC_LENGTH, dev_dec_ioasic_access, (void *)d,              DEV_DEC_IOASIC_LENGTH, dev_dec_ioasic_access, (void *)d,
263              DM_DEFAULT, NULL);              DM_DEFAULT, NULL);
264    
265          return d;          return d;
266  }  }
267    

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26