25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_evbmips.c,v 1.8 2006/07/26 08:02:31 debug Exp $ |
* $Id: machine_evbmips.c,v 1.11 2006/09/23 03:52:10 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
48 |
MACHINE_SETUP(evbmips) |
MACHINE_SETUP(evbmips) |
49 |
{ |
{ |
50 |
char tmpstr[1000]; |
char tmpstr[1000]; |
|
char tmps[50]; |
|
|
uint64_t env, tmpptr; |
|
51 |
struct pci_data *pci_data; |
struct pci_data *pci_data; |
52 |
int i; |
int i; |
53 |
|
|
56 |
switch (machine->machine_subtype) { |
switch (machine->machine_subtype) { |
57 |
case MACHINE_EVBMIPS_MALTA: |
case MACHINE_EVBMIPS_MALTA: |
58 |
case MACHINE_EVBMIPS_MALTA_BE: |
case MACHINE_EVBMIPS_MALTA_BE: |
59 |
|
if (machine->emulated_hz == 0) |
60 |
|
machine->emulated_hz = 33000000; |
61 |
cpu->byte_order = EMUL_LITTLE_ENDIAN; |
cpu->byte_order = EMUL_LITTLE_ENDIAN; |
62 |
machine->machine_name = "MALTA (evbmips, little endian)"; |
machine->machine_name = "MALTA (evbmips, little endian)"; |
63 |
machine->stable = 1; |
machine->stable = 1; |
94 |
bus_pci_add(machine, pci_data, machine->memory, |
bus_pci_add(machine, pci_data, machine->memory, |
95 |
0, 9, 1, "piix4_ide"); |
0, 9, 1, "piix4_ide"); |
96 |
|
|
97 |
bus_pci_add(machine, pci_data, machine->memory, |
/* pcn: Not yet, since it is just a bogus device, so far. */ |
98 |
0, 11, 0, "pcn"); |
/* bus_pci_add(machine, pci_data, machine->memory, |
99 |
|
0, 11, 0, "pcn"); */ |
100 |
|
|
101 |
device_add(machine, "malta_lcd addr=0x1f000400"); |
device_add(machine, "malta_lcd addr=0x1f000400"); |
102 |
break; |
break; |
174 |
/* a2 = (yamon_env_var *)envp */ |
/* a2 = (yamon_env_var *)envp */ |
175 |
cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; |
cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; |
176 |
|
|
177 |
env = cpu->cd.mips.gpr[MIPS_GPR_A2]; |
yamon_machine_setup(machine, cpu->cd.mips.gpr[MIPS_GPR_A2]); |
|
tmpptr = 0xffffffff9fc01c00ULL; |
|
|
|
|
|
snprintf(tmps, sizeof(tmps), "0x%08x", machine->physical_ram_in_mb<<20); |
|
|
add_environment_string_dual(cpu, &env, &tmpptr, "memsize", tmps); |
|
|
|
|
|
add_environment_string_dual(cpu, &env, &tmpptr, "yamonrev", "02.06"); |
|
|
|
|
|
/* End of env: */ |
|
|
tmpptr = 0; |
|
|
add_environment_string_dual(cpu, |
|
|
&env, &tmpptr, NULL, NULL); |
|
178 |
|
|
179 |
/* a3 = memsize */ |
/* a3 = memsize */ |
180 |
cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576; |
cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576; |