--- trunk/src/machines/machine_test.c 2007/10/08 16:20:40 30 +++ trunk/src/machines/machine_test.c 2007/10/08 16:20:58 32 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $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 $ * * Various "test" machines (bare machines with just a CPU, or a bare machine * plus some experimental devices). @@ -46,6 +46,7 @@ #include "testmachine/dev_ether.h" #include "testmachine/dev_fb.h" #include "testmachine/dev_mp.h" +#include "testmachine/dev_rtc.h" static void default_test(struct machine *machine, struct cpu *cpu) @@ -71,6 +72,10 @@ snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=0", (uint64_t) DEV_ETHER_ADDRESS); device_add(machine, tmpstr); + + snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=0", + (uint64_t) DEV_RTC_ADDRESS); + device_add(machine, tmpstr); } @@ -181,6 +186,54 @@ +MACHINE_SETUP(bareavr32) +{ + machine->machine_name = "Generic \"bare\" AVR32 machine"; + machine->stable = 1; +} + + +MACHINE_SETUP(testavr32) +{ + machine->machine_name = "AVR32 test machine"; + machine->stable = 1; + + /* TODO: interrupts */ + + default_test(machine, cpu); +} + + +MACHINE_DEFAULT_CPU(bareavr32) +{ + machine->cpu_name = strdup("AVR32A"); +} + + +MACHINE_DEFAULT_CPU(testavr32) +{ + machine->cpu_name = strdup("AVR32A"); +} + + +MACHINE_REGISTER(bareavr32) +{ + MR_DEFAULT(bareavr32, "Generic \"bare\" AVR32 machine", + ARCH_AVR32, MACHINE_BAREAVR32); + + machine_entry_add_alias(me, "bareavr32"); +} + + +MACHINE_REGISTER(testavr32) +{ + MR_DEFAULT(testavr32, "Test-machine for AVR32", + ARCH_AVR32, MACHINE_TESTAVR32); + + machine_entry_add_alias(me, "testavr32"); +} + + MACHINE_SETUP(barehppa) { machine->machine_name = "Generic \"bare\" HPPA machine"; @@ -391,7 +444,7 @@ * 7 CPU counter * 6 SMP IPIs * 5 not used yet - * 4 not used yet + * 4 rtc * 3 ethernet * 2 serial console */ @@ -421,6 +474,10 @@ snprintf(tmpstr, sizeof(tmpstr), "ether addr=0x%"PRIx64" irq=3", (uint64_t) DEV_ETHER_ADDRESS); device_add(machine, tmpstr); + + snprintf(tmpstr, sizeof(tmpstr), "rtc addr=0x%"PRIx64" irq=4", + (uint64_t) DEV_RTC_ADDRESS); + device_add(machine, tmpstr); } @@ -521,13 +578,13 @@ MACHINE_DEFAULT_CPU(baresh) { - machine->cpu_name = strdup("SH5"); + machine->cpu_name = strdup("SH7750"); } MACHINE_DEFAULT_CPU(testsh) { - machine->cpu_name = strdup("SH5"); + machine->cpu_name = strdup("SH7750"); }