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 |
* |
* |
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; |
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: */ |
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. */ |