--- trunk/src/machines/machine_evbmips.c 2007/10/08 16:20:40 30 +++ trunk/src/machines/machine_evbmips.c 2007/10/08 16:20:58 32 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $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 $ */ #include @@ -48,8 +48,6 @@ MACHINE_SETUP(evbmips) { char tmpstr[1000]; - char tmps[50]; - uint64_t env, tmpptr; struct pci_data *pci_data; int i; @@ -58,6 +56,8 @@ switch (machine->machine_subtype) { case MACHINE_EVBMIPS_MALTA: case MACHINE_EVBMIPS_MALTA_BE: + if (machine->emulated_hz == 0) + machine->emulated_hz = 33000000; cpu->byte_order = EMUL_LITTLE_ENDIAN; machine->machine_name = "MALTA (evbmips, little endian)"; machine->stable = 1; @@ -94,8 +94,9 @@ bus_pci_add(machine, pci_data, machine->memory, 0, 9, 1, "piix4_ide"); - bus_pci_add(machine, pci_data, machine->memory, - 0, 11, 0, "pcn"); + /* pcn: Not yet, since it is just a bogus device, so far. */ + /* bus_pci_add(machine, pci_data, machine->memory, + 0, 11, 0, "pcn"); */ device_add(machine, "malta_lcd addr=0x1f000400"); break; @@ -173,18 +174,7 @@ /* a2 = (yamon_env_var *)envp */ cpu->cd.mips.gpr[MIPS_GPR_A2] = (int32_t)0x9fc01800; - env = 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); + yamon_machine_setup(machine, cpu->cd.mips.gpr[MIPS_GPR_A2]); /* a3 = memsize */ cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576;