--- trunk/src/machines/machine_evbmips.c 2007/10/08 16:19:37 22 +++ trunk/src/machines/machine_evbmips.c 2007/10/08 16:19:56 24 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: machine_evbmips.c,v 1.2 2006/01/08 11:05:03 debug Exp $ + * $Id: machine_evbmips.c,v 1.6 2006/05/21 11:35:58 debug Exp $ */ #include @@ -97,6 +97,42 @@ device_add(machine, "malta_lcd addr=0x1f000400"); break; + case MACHINE_EVBMIPS_MESHCUBE: + machine->machine_name = "Meshcube"; + + /* See: http://mail-index.netbsd.org/port-evbmips/2006/ + 02/23/0000.html */ + + if (machine->physical_ram_in_mb != 64) + fprintf(stderr, "WARNING! MeshCubes are supposed to " + "have exactly 64 MB RAM. Continuing anyway.\n"); + if (machine->use_x11) + fprintf(stderr, "WARNING! MeshCube with -X is " + "meaningless. Continuing anyway.\n"); + + /* First of all, the MeshCube has an Au1500 in it: */ + machine->md_interrupt = au1x00_interrupt; + machine->md_int.au1x00_ic_data = dev_au1x00_init(machine, + machine->memory); + + /* + * TODO: Which non-Au1500 devices, and at what addresses? + * + * "4G Systems MTX-1 Board" at ? + * 1017fffc, 14005004, 11700000, 11700008, 11900014, + * 1190002c, 11900100, 11900108, 1190010c, + * 10400040 - 10400074, + * 14001000 (possibly LCD?) + * 11100028 (possibly ttySx?) + * + * "usb_ohci=base:0x10100000,len:0x100000,irq:26" + */ + + /* Linux reads this during startup... */ + device_add(machine, "random addr=0x1017fffc len=4"); + + break; + case MACHINE_EVBMIPS_PB1000: machine->machine_name = "PB1000 (evbmips)"; cpu->byte_order = EMUL_BIG_ENDIAN; @@ -165,6 +201,11 @@ for (i=0; i<0x100; i+=4) store_32bit_word(cpu, (int64_t)(int32_t)0x9fc00500 + i, (int64_t)(int32_t)0x9fc00800 + i); + + /* "Magic trap" PROM instructions at 0x9fc008xx: */ + for (i=0; i<0x100; i+=4) + store_32bit_word(cpu, (int64_t)(int32_t)0x9fc00800 + i, + 0x00c0de0c); } @@ -175,6 +216,9 @@ case MACHINE_EVBMIPS_MALTA_BE: machine->cpu_name = strdup("5Kc"); break; + case MACHINE_EVBMIPS_MESHCUBE: + machine->cpu_name = strdup("AU1500"); + break; case MACHINE_EVBMIPS_PB1000: machine->cpu_name = strdup("AU1000"); break; @@ -186,6 +230,8 @@ MACHINE_DEFAULT_RAM(evbmips) { + /* MeshCube is always (?) 64 MB, and the others work fine + with 64 MB too. */ machine->physical_ram_in_mb = 64; } @@ -193,19 +239,27 @@ MACHINE_REGISTER(evbmips) { MR_DEFAULT(evbmips, "MIPS evaluation boards (evbmips)", ARCH_MIPS, - MACHINE_EVBMIPS, 1, 3); + MACHINE_EVBMIPS, 1, 4); me->aliases[0] = "evbmips"; + me->subtype[0] = machine_entry_subtype_new("Malta", MACHINE_EVBMIPS_MALTA, 1); me->subtype[0]->aliases[0] = "malta"; + me->subtype[1] = machine_entry_subtype_new("Malta (Big-Endian)", MACHINE_EVBMIPS_MALTA_BE, 1); me->subtype[1]->aliases[0] = "maltabe"; - me->subtype[2] = machine_entry_subtype_new("PB1000", + + me->subtype[2] = machine_entry_subtype_new("MeshCube", + MACHINE_EVBMIPS_MESHCUBE, 1); + me->subtype[2]->aliases[0] = "meshcube"; + + me->subtype[3] = machine_entry_subtype_new("PB1000", MACHINE_EVBMIPS_PB1000, 1); - me->subtype[2]->aliases[0] = "pb1000"; + me->subtype[3]->aliases[0] = "pb1000"; + machine_entry_add(me, ARCH_MIPS); + me->set_default_ram = machine_default_ram_evbmips; - machine_entry_add(me, ARCH_ARM); }