25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $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 $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
45 |
|
|
46 |
MACHINE_SETUP(algor) |
MACHINE_SETUP(algor) |
47 |
{ |
{ |
48 |
|
machine->emulated_hz = 166560000; |
49 |
|
|
50 |
switch (machine->machine_subtype) { |
switch (machine->machine_subtype) { |
51 |
case MACHINE_ALGOR_P4032: |
case MACHINE_ALGOR_P4032: |
52 |
machine->machine_name = "Algor P4032"; |
machine->machine_name = "Algor P4032"; |
58 |
exit(1); |
exit(1); |
59 |
} |
} |
60 |
|
|
61 |
|
/* |
62 |
|
* Algor CPU interrupts: |
63 |
|
* |
64 |
|
* 7 = CPU count/compare |
65 |
|
* 4 = Local |
66 |
|
* 3 = PCI |
67 |
|
* 2 = ISA |
68 |
|
*/ |
69 |
|
|
70 |
machine->md_int.v3_data = dev_v3_init(machine, machine->memory); |
machine->md_int.v3_data = dev_v3_init(machine, machine->memory); |
71 |
machine->md_interrupt = isa8_interrupt; |
machine->md_interrupt = isa8_interrupt; |
72 |
machine->isa_pic_data.native_irq = 6; |
machine->isa_pic_data.native_irq = 2; /* Primary: ISA */ |
73 |
/* Hm. ISA interrupts at 6, but "local" at 2! */ |
machine->isa_pic_data.secondary_mask1 = 0x18; |
74 |
|
machine->isa_pic_data.native_secondary_irq = 4; /* Secondary: Local */ |
75 |
|
|
76 |
device_add(machine, "algor addr=0x1ff00000"); |
device_add(machine, "algor addr=0x1ff00000"); |
77 |
|
|
99 |
store_string(cpu, (int32_t)0x9fc01040, machine->bootstr); |
store_string(cpu, (int32_t)0x9fc01040, machine->bootstr); |
100 |
store_string(cpu, (int32_t)0x9fc01200, machine->bootarg); |
store_string(cpu, (int32_t)0x9fc01200, machine->bootarg); |
101 |
|
|
102 |
/* a2 = (yamon_env_var *)envp */ |
/* a2 = pointer to environment strings */ |
103 |
cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; |
cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; |
104 |
{ |
{ |
105 |
char tmps[50]; |
char tmps[50]; |
124 |
|
|
125 |
MACHINE_REGISTER(algor) |
MACHINE_REGISTER(algor) |
126 |
{ |
{ |
127 |
MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR, |
MR_DEFAULT(algor, "Algor evaluation board", ARCH_MIPS, MACHINE_ALGOR); |
128 |
1, 2); |
|
129 |
me->aliases[0] = "algor"; |
machine_entry_add_alias(me, "algor"); |
130 |
me->subtype[0] = machine_entry_subtype_new("P4032", |
|
131 |
MACHINE_ALGOR_P4032, 1); |
machine_entry_add_subtype(me, "P4032", MACHINE_ALGOR_P4032, |
132 |
me->subtype[0]->aliases[0] = "p4032"; |
"p4032", NULL); |
133 |
me->subtype[1] = machine_entry_subtype_new("P5064", |
|
134 |
MACHINE_ALGOR_P5064, 1); |
machine_entry_add_subtype(me, "P5064", MACHINE_ALGOR_P5064, |
135 |
me->subtype[1]->aliases[0] = "p5064"; |
"p5064", NULL); |
|
machine_entry_add(me, ARCH_MIPS); |
|
136 |
} |
} |
137 |
|
|