--- trunk/src/machines/machine_evbmips.c 2007/10/08 16:21:17 34 +++ trunk/src/machines/machine_evbmips.c 2007/10/08 16:22:56 44 @@ -25,7 +25,9 @@ * SUCH DAMAGE. * * - * $Id: machine_evbmips.c,v 1.19 2007/01/28 00:41:17 debug Exp $ + * $Id: machine_evbmips.c,v 1.30 2007/06/17 02:17:45 debug Exp $ + * + * COMMENT: MIPS evaluation boards (e.g. Malta) */ #include @@ -50,16 +52,16 @@ struct pci_data *pci_data; int i; - /* See http://www.netbsd.org/Ports/evbmips/ for more info. */ + /* See http://www.netbsd.org/ports/evbmips/ for more info. */ 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; if (machine->machine_subtype == MACHINE_EVBMIPS_MALTA_BE) { machine->machine_name = "MALTA (evbmips, big endian)"; @@ -84,7 +86,7 @@ pci_data = dev_gt_init(machine, machine->memory, 0x1be00000, tmpstr, tmpstr2, 120); - if (machine->use_x11) { + if (machine->x11_md.in_use) { if (strlen(machine->boot_string_argument) < 3) { fatal("WARNING: remember to use -o 'console=" "tty0' if you are emulating Linux. (Not" @@ -106,49 +108,6 @@ 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: */ - device_add(machine, "au1x00"); - - /* - * 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; - - device_add(machine, "au1x00"); - - /* TODO */ - break; - default:fatal("Unimplemented EVBMIPS model.\n"); exit(1); } @@ -182,13 +141,7 @@ cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576; /* Hm. Linux ignores a3. */ - /* - * TODO: - * Core ID numbers. - * How much of this is not valid for PBxxxx? - * - * See maltareg.h for more info. - */ + /* Set the Core ID. See maltareg.h for more info. */ store_32bit_word(cpu, (int32_t)(0x80000000 + MALTA_REVISION), (1 << 10) + 0x26); @@ -207,16 +160,13 @@ MACHINE_DEFAULT_CPU(evbmips) { switch (machine->machine_subtype) { + case MACHINE_EVBMIPS_MALTA: case MACHINE_EVBMIPS_MALTA_BE: + /* 5Kc = MIPS64 rev 1, 5KE = MIPS64 rev 2 */ 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; + default:fatal("Unimplemented evbmips subtype.\n"); exit(1); } @@ -225,9 +175,7 @@ MACHINE_DEFAULT_RAM(evbmips) { - /* MeshCube is always (?) 64 MB, and the others work fine - with 64 MB too. */ - machine->physical_ram_in_mb = 64; + machine->physical_ram_in_mb = 128; } @@ -244,12 +192,6 @@ machine_entry_add_subtype(me, "Malta (Big-Endian)", MACHINE_EVBMIPS_MALTA_BE, "maltabe", NULL); - machine_entry_add_subtype(me, "MeshCube", MACHINE_EVBMIPS_MESHCUBE, - "meshcube", NULL); - - machine_entry_add_subtype(me, "PB1000", MACHINE_EVBMIPS_PB1000, - "pb1000", NULL); - me->set_default_ram = machine_default_ram_evbmips; }