diff --git a/hw/boards.h b/hw/boards.h index 6374dd1b2c..712d3cd39b 100644 --- a/hw/boards.h +++ b/hw/boards.h @@ -52,7 +52,7 @@ extern QEMUMachine shix_machine; extern QEMUMachine r2d_machine; /* sun4m.c */ -extern QEMUMachine ss5_machine, ss10_machine, ss600mp_machine; +extern QEMUMachine ss5_machine, ss10_machine, ss600mp_machine, ss20_machine; /* sun4u.c */ extern QEMUMachine sun4u_machine; diff --git a/hw/sun4m.c b/hw/sun4m.c index 3385adb915..693fa696ac 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -600,6 +600,44 @@ static const struct hwdef hwdefs[] = { .max_mem = 0xffffffff, // XXX actually first 62GB ok .default_cpu_model = "TI SuperSparc II", }, + /* SS-20 */ + { + .iommu_base = 0xfe0000000ULL, + .tcx_base = 0xe20000000ULL, + .cs_base = -1, + .slavio_base = 0xff0000000ULL, + .ms_kb_base = 0xff1000000ULL, + .serial_base = 0xff1100000ULL, + .nvram_base = 0xff1200000ULL, + .fd_base = 0xff1700000ULL, + .counter_base = 0xff1300000ULL, + .intctl_base = 0xff1400000ULL, + .dma_base = 0xef0400000ULL, + .esp_base = 0xef0800000ULL, + .le_base = 0xef0c00000ULL, + .power_base = 0xefa000000ULL, + .ecc_base = 0xf00000000ULL, + .ecc_version = 0x20000000, // version 0, implementation 2 + .vram_size = 0x00100000, + .nvram_size = 0x2000, + .esp_irq = 18, + .le_irq = 16, + .clock_irq = 7, + .clock1_irq = 19, + .ms_kb_irq = 14, + .ser_irq = 15, + .fd_irq = 22, + .me_irq = 30, + .cs_irq = -1, + .machine_id = 0x72, + .iommu_version = 0x13000000, + .intbit_to_level = { + 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12, + 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0, + }, + .max_mem = 0xffffffff, // XXX actually first 62GB ok + .default_cpu_model = "TI SuperSparc II", + }, }; /* SPARCstation 5 hardware initialisation */ @@ -632,6 +670,16 @@ static void ss600mp_init(int RAM_size, int vga_ram_size, kernel_cmdline, initrd_filename, cpu_model); } +/* SPARCstation 20 hardware initialisation */ +static void ss20_init(int RAM_size, int vga_ram_size, + const char *boot_device, DisplayState *ds, + const char *kernel_filename, const char *kernel_cmdline, + const char *initrd_filename, const char *cpu_model) +{ + sun4m_hw_init(&hwdefs[3], RAM_size, boot_device, ds, kernel_filename, + kernel_cmdline, initrd_filename, cpu_model); +} + QEMUMachine ss5_machine = { "SS-5", "Sun4m platform, SPARCstation 5", @@ -649,3 +697,10 @@ QEMUMachine ss600mp_machine = { "Sun4m platform, SPARCserver 600MP", ss600mp_init, }; + +QEMUMachine ss20_machine = { + "SS-20", + "Sun4m platform, SPARCstation 20", + ss20_init, +}; + diff --git a/vl.c b/vl.c index 5b7e97e6de..9cb81ce47c 100644 --- a/vl.c +++ b/vl.c @@ -7838,6 +7838,7 @@ static void register_machines(void) qemu_register_machine(&ss5_machine); qemu_register_machine(&ss10_machine); qemu_register_machine(&ss600mp_machine); + qemu_register_machine(&ss20_machine); #endif #elif defined(TARGET_ARM) qemu_register_machine(&integratorcp_machine);