25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_evbmips.c,v 1.2 2006/01/08 11:05:03 debug Exp $ |
* $Id: machine_evbmips.c,v 1.6 2006/05/21 11:35:58 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
97 |
device_add(machine, "malta_lcd addr=0x1f000400"); |
device_add(machine, "malta_lcd addr=0x1f000400"); |
98 |
break; |
break; |
99 |
|
|
100 |
|
case MACHINE_EVBMIPS_MESHCUBE: |
101 |
|
machine->machine_name = "Meshcube"; |
102 |
|
|
103 |
|
/* See: http://mail-index.netbsd.org/port-evbmips/2006/ |
104 |
|
02/23/0000.html */ |
105 |
|
|
106 |
|
if (machine->physical_ram_in_mb != 64) |
107 |
|
fprintf(stderr, "WARNING! MeshCubes are supposed to " |
108 |
|
"have exactly 64 MB RAM. Continuing anyway.\n"); |
109 |
|
if (machine->use_x11) |
110 |
|
fprintf(stderr, "WARNING! MeshCube with -X is " |
111 |
|
"meaningless. Continuing anyway.\n"); |
112 |
|
|
113 |
|
/* First of all, the MeshCube has an Au1500 in it: */ |
114 |
|
machine->md_interrupt = au1x00_interrupt; |
115 |
|
machine->md_int.au1x00_ic_data = dev_au1x00_init(machine, |
116 |
|
machine->memory); |
117 |
|
|
118 |
|
/* |
119 |
|
* TODO: Which non-Au1500 devices, and at what addresses? |
120 |
|
* |
121 |
|
* "4G Systems MTX-1 Board" at ? |
122 |
|
* 1017fffc, 14005004, 11700000, 11700008, 11900014, |
123 |
|
* 1190002c, 11900100, 11900108, 1190010c, |
124 |
|
* 10400040 - 10400074, |
125 |
|
* 14001000 (possibly LCD?) |
126 |
|
* 11100028 (possibly ttySx?) |
127 |
|
* |
128 |
|
* "usb_ohci=base:0x10100000,len:0x100000,irq:26" |
129 |
|
*/ |
130 |
|
|
131 |
|
/* Linux reads this during startup... */ |
132 |
|
device_add(machine, "random addr=0x1017fffc len=4"); |
133 |
|
|
134 |
|
break; |
135 |
|
|
136 |
case MACHINE_EVBMIPS_PB1000: |
case MACHINE_EVBMIPS_PB1000: |
137 |
machine->machine_name = "PB1000 (evbmips)"; |
machine->machine_name = "PB1000 (evbmips)"; |
138 |
cpu->byte_order = EMUL_BIG_ENDIAN; |
cpu->byte_order = EMUL_BIG_ENDIAN; |
201 |
for (i=0; i<0x100; i+=4) |
for (i=0; i<0x100; i+=4) |
202 |
store_32bit_word(cpu, (int64_t)(int32_t)0x9fc00500 + i, |
store_32bit_word(cpu, (int64_t)(int32_t)0x9fc00500 + i, |
203 |
(int64_t)(int32_t)0x9fc00800 + i); |
(int64_t)(int32_t)0x9fc00800 + i); |
204 |
|
|
205 |
|
/* "Magic trap" PROM instructions at 0x9fc008xx: */ |
206 |
|
for (i=0; i<0x100; i+=4) |
207 |
|
store_32bit_word(cpu, (int64_t)(int32_t)0x9fc00800 + i, |
208 |
|
0x00c0de0c); |
209 |
} |
} |
210 |
|
|
211 |
|
|
216 |
case MACHINE_EVBMIPS_MALTA_BE: |
case MACHINE_EVBMIPS_MALTA_BE: |
217 |
machine->cpu_name = strdup("5Kc"); |
machine->cpu_name = strdup("5Kc"); |
218 |
break; |
break; |
219 |
|
case MACHINE_EVBMIPS_MESHCUBE: |
220 |
|
machine->cpu_name = strdup("AU1500"); |
221 |
|
break; |
222 |
case MACHINE_EVBMIPS_PB1000: |
case MACHINE_EVBMIPS_PB1000: |
223 |
machine->cpu_name = strdup("AU1000"); |
machine->cpu_name = strdup("AU1000"); |
224 |
break; |
break; |
230 |
|
|
231 |
MACHINE_DEFAULT_RAM(evbmips) |
MACHINE_DEFAULT_RAM(evbmips) |
232 |
{ |
{ |
233 |
|
/* MeshCube is always (?) 64 MB, and the others work fine |
234 |
|
with 64 MB too. */ |
235 |
machine->physical_ram_in_mb = 64; |
machine->physical_ram_in_mb = 64; |
236 |
} |
} |
237 |
|
|
239 |
MACHINE_REGISTER(evbmips) |
MACHINE_REGISTER(evbmips) |
240 |
{ |
{ |
241 |
MR_DEFAULT(evbmips, "MIPS evaluation boards (evbmips)", ARCH_MIPS, |
MR_DEFAULT(evbmips, "MIPS evaluation boards (evbmips)", ARCH_MIPS, |
242 |
MACHINE_EVBMIPS, 1, 3); |
MACHINE_EVBMIPS, 1, 4); |
243 |
me->aliases[0] = "evbmips"; |
me->aliases[0] = "evbmips"; |
244 |
|
|
245 |
me->subtype[0] = machine_entry_subtype_new("Malta", |
me->subtype[0] = machine_entry_subtype_new("Malta", |
246 |
MACHINE_EVBMIPS_MALTA, 1); |
MACHINE_EVBMIPS_MALTA, 1); |
247 |
me->subtype[0]->aliases[0] = "malta"; |
me->subtype[0]->aliases[0] = "malta"; |
248 |
|
|
249 |
me->subtype[1] = machine_entry_subtype_new("Malta (Big-Endian)", |
me->subtype[1] = machine_entry_subtype_new("Malta (Big-Endian)", |
250 |
MACHINE_EVBMIPS_MALTA_BE, 1); |
MACHINE_EVBMIPS_MALTA_BE, 1); |
251 |
me->subtype[1]->aliases[0] = "maltabe"; |
me->subtype[1]->aliases[0] = "maltabe"; |
252 |
me->subtype[2] = machine_entry_subtype_new("PB1000", |
|
253 |
|
me->subtype[2] = machine_entry_subtype_new("MeshCube", |
254 |
|
MACHINE_EVBMIPS_MESHCUBE, 1); |
255 |
|
me->subtype[2]->aliases[0] = "meshcube"; |
256 |
|
|
257 |
|
me->subtype[3] = machine_entry_subtype_new("PB1000", |
258 |
MACHINE_EVBMIPS_PB1000, 1); |
MACHINE_EVBMIPS_PB1000, 1); |
259 |
me->subtype[2]->aliases[0] = "pb1000"; |
me->subtype[3]->aliases[0] = "pb1000"; |
260 |
|
|
261 |
machine_entry_add(me, ARCH_MIPS); |
machine_entry_add(me, ARCH_MIPS); |
262 |
|
|
263 |
me->set_default_ram = machine_default_ram_evbmips; |
me->set_default_ram = machine_default_ram_evbmips; |
|
machine_entry_add(me, ARCH_ARM); |
|
264 |
} |
} |
265 |
|
|