25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_test.c,v 1.18 2006/07/25 19:35:28 debug Exp $ |
* $Id: machine_test.c,v 1.22 2006/10/25 09:24:06 debug Exp $ |
29 |
* |
* |
30 |
* Various "test" machines (bare machines with just a CPU, or a bare machine |
* Various "test" machines (bare machines with just a CPU, or a bare machine |
31 |
* plus some experimental devices). |
* plus some experimental devices). |
46 |
#include "testmachine/dev_ether.h" |
#include "testmachine/dev_ether.h" |
47 |
#include "testmachine/dev_fb.h" |
#include "testmachine/dev_fb.h" |
48 |
#include "testmachine/dev_mp.h" |
#include "testmachine/dev_mp.h" |
49 |
|
#include "testmachine/dev_rtc.h" |
50 |
|
|
51 |
|
|
52 |
static void default_test(struct machine *machine, struct cpu *cpu) |
static void default_test(struct machine *machine, struct cpu *cpu) |
72 |
snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=0", |
snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=0", |
73 |
(uint64_t) DEV_ETHER_ADDRESS); |
(uint64_t) DEV_ETHER_ADDRESS); |
74 |
device_add(machine, tmpstr); |
device_add(machine, tmpstr); |
75 |
|
|
76 |
|
snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=0", |
77 |
|
(uint64_t) DEV_RTC_ADDRESS); |
78 |
|
device_add(machine, tmpstr); |
79 |
} |
} |
80 |
|
|
81 |
|
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
|
MACHINE_SETUP(bareavr32) |
190 |
|
{ |
191 |
|
machine->machine_name = "Generic \"bare\" AVR32 machine"; |
192 |
|
machine->stable = 1; |
193 |
|
} |
194 |
|
|
195 |
|
|
196 |
|
MACHINE_SETUP(testavr32) |
197 |
|
{ |
198 |
|
machine->machine_name = "AVR32 test machine"; |
199 |
|
machine->stable = 1; |
200 |
|
|
201 |
|
/* TODO: interrupts */ |
202 |
|
|
203 |
|
default_test(machine, cpu); |
204 |
|
} |
205 |
|
|
206 |
|
|
207 |
|
MACHINE_DEFAULT_CPU(bareavr32) |
208 |
|
{ |
209 |
|
machine->cpu_name = strdup("AVR32A"); |
210 |
|
} |
211 |
|
|
212 |
|
|
213 |
|
MACHINE_DEFAULT_CPU(testavr32) |
214 |
|
{ |
215 |
|
machine->cpu_name = strdup("AVR32A"); |
216 |
|
} |
217 |
|
|
218 |
|
|
219 |
|
MACHINE_REGISTER(bareavr32) |
220 |
|
{ |
221 |
|
MR_DEFAULT(bareavr32, "Generic \"bare\" AVR32 machine", |
222 |
|
ARCH_AVR32, MACHINE_BAREAVR32); |
223 |
|
|
224 |
|
machine_entry_add_alias(me, "bareavr32"); |
225 |
|
} |
226 |
|
|
227 |
|
|
228 |
|
MACHINE_REGISTER(testavr32) |
229 |
|
{ |
230 |
|
MR_DEFAULT(testavr32, "Test-machine for AVR32", |
231 |
|
ARCH_AVR32, MACHINE_TESTAVR32); |
232 |
|
|
233 |
|
machine_entry_add_alias(me, "testavr32"); |
234 |
|
} |
235 |
|
|
236 |
|
|
237 |
MACHINE_SETUP(barehppa) |
MACHINE_SETUP(barehppa) |
238 |
{ |
{ |
239 |
machine->machine_name = "Generic \"bare\" HPPA machine"; |
machine->machine_name = "Generic \"bare\" HPPA machine"; |
444 |
* 7 CPU counter |
* 7 CPU counter |
445 |
* 6 SMP IPIs |
* 6 SMP IPIs |
446 |
* 5 not used yet |
* 5 not used yet |
447 |
* 4 not used yet |
* 4 rtc |
448 |
* 3 ethernet |
* 3 ethernet |
449 |
* 2 serial console |
* 2 serial console |
450 |
*/ |
*/ |
474 |
snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=3", |
snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=3", |
475 |
(uint64_t) DEV_ETHER_ADDRESS); |
(uint64_t) DEV_ETHER_ADDRESS); |
476 |
device_add(machine, tmpstr); |
device_add(machine, tmpstr); |
477 |
|
|
478 |
|
snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=4", |
479 |
|
(uint64_t) DEV_RTC_ADDRESS); |
480 |
|
device_add(machine, tmpstr); |
481 |
} |
} |
482 |
|
|
483 |
|
|
578 |
|
|
579 |
MACHINE_DEFAULT_CPU(baresh) |
MACHINE_DEFAULT_CPU(baresh) |
580 |
{ |
{ |
581 |
machine->cpu_name = strdup("SH5"); |
machine->cpu_name = strdup("SH7750"); |
582 |
} |
} |
583 |
|
|
584 |
|
|
585 |
MACHINE_DEFAULT_CPU(testsh) |
MACHINE_DEFAULT_CPU(testsh) |
586 |
{ |
{ |
587 |
machine->cpu_name = strdup("SH5"); |
machine->cpu_name = strdup("SH7750"); |
588 |
} |
} |
589 |
|
|
590 |
|
|