--- trunk/src/machines/machine_algor.c 2007/10/08 16:19:37 22 +++ trunk/src/machines/machine_algor.c 2007/10/08 16:20:58 32 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: machine_algor.c,v 1.5 2006/02/18 17:55:25 debug Exp $ + * $Id: machine_algor.c,v 1.11 2006/09/26 08:49:18 debug Exp $ */ #include @@ -45,6 +45,8 @@ MACHINE_SETUP(algor) { + machine->emulated_hz = 166560000; + switch (machine->machine_subtype) { case MACHINE_ALGOR_P4032: machine->machine_name = "Algor P4032"; @@ -56,10 +58,20 @@ exit(1); } + /* + * Algor CPU interrupts: + * + * 7 = CPU count/compare + * 4 = Local + * 3 = PCI + * 2 = ISA + */ + machine->md_int.v3_data = dev_v3_init(machine, machine->memory); machine->md_interrupt = isa8_interrupt; - machine->isa_pic_data.native_irq = 6; - /* Hm. ISA interrupts at 6, but "local" at 2! */ + machine->isa_pic_data.native_irq = 2; /* Primary: ISA */ + machine->isa_pic_data.secondary_mask1 = 0x18; + machine->isa_pic_data.native_secondary_irq = 4; /* Secondary: Local */ device_add(machine, "algor addr=0x1ff00000"); @@ -87,7 +99,7 @@ store_string(cpu, (int32_t)0x9fc01040, machine->bootstr); store_string(cpu, (int32_t)0x9fc01200, machine->bootarg); - /* a2 = (yamon_env_var *)envp */ + /* a2 = pointer to environment strings */ cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; { char tmps[50]; @@ -112,15 +124,14 @@ MACHINE_REGISTER(algor) { - MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR, - 1, 2); - me->aliases[0] = "algor"; - me->subtype[0] = machine_entry_subtype_new("P4032", - MACHINE_ALGOR_P4032, 1); - me->subtype[0]->aliases[0] = "p4032"; - me->subtype[1] = machine_entry_subtype_new("P5064", - MACHINE_ALGOR_P5064, 1); - me->subtype[1]->aliases[0] = "p5064"; - machine_entry_add(me, ARCH_MIPS); + MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR); + + machine_entry_add_alias(me, "algor"); + + machine_entry_add_subtype(me, "P4032", MACHINE_ALGOR_P4032, + "p4032", NULL); + + machine_entry_add_subtype(me, "P5064", MACHINE_ALGOR_P5064, + "p5064", NULL); }