Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1XQ6-0004sS-5d for qemu-devel@nongnu.org; Sun, 09 Dec 2007 20:26:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1XQ5-0004sG-DH for qemu-devel@nongnu.org; Sun, 09 Dec 2007 20:26:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1XQ5-0004sD-9f for qemu-devel@nongnu.org; Sun, 09 Dec 2007 20:26:53 -0500 Received: from pop-tawny.atl.sa.earthlink.net ([207.69.195.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1XQ4-0005h3-WA for qemu-devel@nongnu.org; Sun, 09 Dec 2007 20:26:53 -0500 Received: from user-142h2k8.cable.mindspring.com ([72.40.138.136] helo=earthlink.net) by pop-tawny.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1J1XQ4-00079m-00 for qemu-devel@nongnu.org; Sun, 09 Dec 2007 20:26:52 -0500 Message-ID: <475C961A.6000304@earthlink.net> Date: Sun, 09 Dec 2007 20:27:54 -0500 From: Robert Reif MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090801070603020806060209" Subject: [Qemu-devel] [PATCH] sparc32 add SPARCstation 20 machine type Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------090801070603020806060209 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit --------------090801070603020806060209 Content-Type: text/plain; name="ss20.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ss20.diff.txt" Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.377 diff -p -u -r1.377 vl.c --- vl.c 6 Dec 2007 22:11:20 -0000 1.377 +++ vl.c 10 Dec 2007 01:17:59 -0000 @@ -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); Index: hw/boards.h =================================================================== RCS file: /sources/qemu/qemu/hw/boards.h,v retrieving revision 1.4 diff -p -u -r1.4 boards.h --- hw/boards.h 25 Nov 2007 01:57:38 -0000 1.4 +++ hw/boards.h 10 Dec 2007 01:17:59 -0000 @@ -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; Index: hw/sun4m.c =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.c,v retrieving revision 1.68 diff -p -u -r1.68 sun4m.c --- hw/sun4m.c 9 Dec 2007 17:03:50 -0000 1.68 +++ hw/sun4m.c 10 Dec 2007 01:17:59 -0000 @@ -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, i 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, +}; + --------------090801070603020806060209--