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

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

revision 17 by dpavlin, Mon Oct 8 16:18:51 2007 UTC revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_sgi_ip32.c,v 1.32 2005/08/19 09:43:35 debug Exp $   *  $Id: dev_sgi_ip32.c,v 1.34 2005/10/27 14:01:14 debug Exp $
29   *     *  
30   *  SGI IP32 devices.   *  SGI IP32 devices.
31   *   *
# Line 110  int dev_crime_access(struct cpu *cpu, st Line 110  int dev_crime_access(struct cpu *cpu, st
110          uint64_t relative_addr, unsigned char *data, size_t len,          uint64_t relative_addr, unsigned char *data, size_t len,
111          int writeflag, void *extra)          int writeflag, void *extra)
112  {  {
         int i;  
113          struct crime_data *d = extra;          struct crime_data *d = extra;
114          uint64_t idata;          uint64_t idata = 0;
115            int i;
116    
117          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
118                    idata = memory_readmax64(cpu, data, len);
119    
120          /*          /*
121           *  Set crime version/revision:           *  Set crime version/revision:
122           *           *
123           *  This might not be the most elegant or correct solution,           *  This might not be the most elegant or correct solution, but it
124           *  but it seems that the IP32 PROM likes 0x11 for machines           *  seems that the IP32 PROM likes 0x11 for machines without graphics,
125           *  without graphics, and 0xa1 for machines with graphics.           *  and 0xa1 for machines with graphics.
          *  
          *  NetBSD 2.0 complains about "unknown" crime for 0x11,  
          *  but I guess that's something one has to live with.  
126           *           *
127           *  (TODO?)           *  NetBSD 2.0 complains about "unknown" crime for 0x11, but I guess
128             *  that's something one has to live with.  (TODO?)
129           */           */
130          d->reg[4] = 0x00; d->reg[5] = 0x00; d->reg[6] = 0x00;          d->reg[4] = 0x00; d->reg[5] = 0x00; d->reg[6] = 0x00;
131          d->reg[7] = d->use_fb? 0xa1 : 0x11;          d->reg[7] = d->use_fb? 0xa1 : 0x11;
# Line 344  int dev_macepci_access(struct cpu *cpu, Line 343  int dev_macepci_access(struct cpu *cpu,
343          uint64_t idata = 0, odata=0;          uint64_t idata = 0, odata=0;
344          int regnr, res = 1;          int regnr, res = 1;
345    
346          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
347                    idata = memory_readmax64(cpu, data, len);
348    
349          regnr = relative_addr / sizeof(uint32_t);          regnr = relative_addr / sizeof(uint32_t);
350    
351          /*  Read from/write to the macepci:  */          /*  Read from/write to the macepci:  */
# Line 775  int dev_sgi_mec_access(struct cpu *cpu, Line 776  int dev_sgi_mec_access(struct cpu *cpu,
776          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
777          int regnr;          int regnr;
778    
779          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
780                    idata = memory_readmax64(cpu, data, len);
781    
782          regnr = relative_addr / sizeof(uint64_t);          regnr = relative_addr / sizeof(uint64_t);
783    
784          /*  Treat most registers as read/write, by default.  */          /*  Treat most registers as read/write, by default.  */

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26