/[gxemul]/trunk/src/devices/dev_sgi_ip20.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_sgi_ip20.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_sgi_ip20.c,v 1.14 2006/12/30 13:30:59 debug Exp $   *  $Id: dev_sgi_ip20.c,v 1.15 2007/06/15 19:57:34 debug Exp $
29   *     *  
30   *  SGI IP20 stuff.   *  COMMENT: SGI IP20 stuff
31     *
32     *  TODO.
33   */   */
34    
35  #include <stdio.h>  #include <stdio.h>
# Line 42  Line 44 
44  extern int quiet_mode;  extern int quiet_mode;
45    
46    
 /*  
  *  dev_sgi_ip20_access():  
  */  
47  DEVICE_ACCESS(sgi_ip20)  DEVICE_ACCESS(sgi_ip20)
48  {  {
49          /*  struct sgi_ip20_data *d = (struct sgi_ip20_data *) extra;  */          /*  struct sgi_ip20_data *d = extra;  */
50          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
51    
52          if (writeflag == MEM_WRITE)          if (writeflag == MEM_WRITE)
53                  idata = memory_readmax64(cpu, data, len);                  idata = memory_readmax64(cpu, data, len);
54    
55          switch (relative_addr) {          switch (relative_addr) {
56    
57          case 0x38:          case 0x38:
58                  if (writeflag == MEM_WRITE) {                  if (writeflag == MEM_WRITE) {
59                          debug("[ sgi_ip20: write to address 0x%x, "                          debug("[ sgi_ip20: write to address 0x%x, "
# Line 75  DEVICE_ACCESS(sgi_ip20) Line 75  DEVICE_ACCESS(sgi_ip20)
75                              (int)relative_addr, (int)odata);                              (int)relative_addr, (int)odata);
76                  }                  }
77                  break;                  break;
78    
79          default:          default:
80                  if (writeflag == MEM_WRITE) {                  if (writeflag == MEM_WRITE) {
81                          debug("[ sgi_ip20: unimplemented write to address "                          debug("[ sgi_ip20: unimplemented write to address "
# Line 93  DEVICE_ACCESS(sgi_ip20) Line 94  DEVICE_ACCESS(sgi_ip20)
94  }  }
95    
96    
 /*  
  *  dev_sgi_ip20_init():  
  */  
97  struct sgi_ip20_data *dev_sgi_ip20_init(struct cpu *cpu, struct memory *mem,  struct sgi_ip20_data *dev_sgi_ip20_init(struct cpu *cpu, struct memory *mem,
98          uint64_t baseaddr)          uint64_t baseaddr)
99  {  {
100          struct sgi_ip20_data *d = malloc(sizeof(struct sgi_ip20_data));          struct sgi_ip20_data *d;
101          if (d == NULL) {  
102                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct sgi_ip20_data)));
                 exit(1);  
         }  
103          memset(d, 0, sizeof(struct sgi_ip20_data));          memset(d, 0, sizeof(struct sgi_ip20_data));
104    
105          /*          /*

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

  ViewVC Help
Powered by ViewVC 1.1.26