From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gs5Ma-0008Ss-5T for qemu-devel@nongnu.org; Wed, 06 Dec 2006 17:35:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gs5MV-0008Rr-Or for qemu-devel@nongnu.org; Wed, 06 Dec 2006 17:35:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gs5MV-0008Ro-J3 for qemu-devel@nongnu.org; Wed, 06 Dec 2006 17:35:35 -0500 Received: from [82.232.2.251] (helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gs5MU-0007Kk-Lg for qemu-devel@nongnu.org; Wed, 06 Dec 2006 17:35:35 -0500 Received: from bode.aurel32.net ([2001:618:400:fc13:214:6cff:fe33:3ae9]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Gs5MS-0004Ok-Sh for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:35:32 +0100 Received: from aurel32 by bode.aurel32.net with local (Exim 4.63) (envelope-from ) id 1Gs5MS-0003Au-MG for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:35:32 +0100 Date: Wed, 6 Dec 2006 23:35:32 +0100 From: Aurelien Jarno Message-ID: <20061206223532.GB12170@bode.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Add more devices to MIPS system emulation 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 Hello all, This patch, initially posted by Thiemo Seufer, adds more devices to the MIPS system emulation, most importantly a RTC emulation which e.g. keeps timestamps on a linux filesystem sane. I have only modified it to use the patch I posted on the mailing list a few minutes ago. Aurelien Index: Makefile.target =================================================================== RCS file: /sources/qemu/qemu/Makefile.target,v retrieving revision 1.133 diff -u -d -p -r1.133 Makefile.target --- Makefile.target 6 Dec 2006 21:38:37 -0000 1.133 +++ Makefile.target 6 Dec 2006 22:02:39 -0000 @@ -358,7 +358,7 @@ DEFINES += -DHAS_AUDIO endif ifeq ($(TARGET_ARCH), mips) VL_OBJS+= mips_r4k.o mips_timer.o dma.o vga.o serial.o i8254.o i8259.o ide.o -#VL_OBJS+= #pckbd.o fdc.o m48t59.o +VL_OBJS+= mc146818rtc.o #pckbd.o fdc.o m48t59.o endif ifeq ($(TARGET_BASE_ARCH), sparc) ifeq ($(TARGET_ARCH), sparc64) Index: hw/mips_r4k.c =================================================================== RCS file: /sources/qemu/qemu/hw/mips_r4k.c,v retrieving revision 1.23 diff -u -d -p -r1.23 mips_r4k.c --- hw/mips_r4k.c 6 Dec 2006 21:38:37 -0000 1.23 +++ hw/mips_r4k.c 6 Dec 2006 22:02:39 -0000 @@ -10,7 +10,8 @@ #include "vl.h" #define BIOS_FILENAME "mips_bios.bin" -//#define BIOS_FILENAME "system.bin" +#define LINUX_BOOT_FILENAME "linux_boot.bin" + #define KERNEL_LOAD_ADDR 0x80010000 #define INITRD_LOAD_ADDR 0x80800000 @@ -135,6 +136,7 @@ void mips_r4k_init (int ram_size, int vg unsigned long bios_offset; int ret; CPUState *env; + static RTCState *rtc_state; int i; env = cpu_init(); @@ -179,12 +181,15 @@ void mips_r4k_init (int ram_size, int vg cpu_mips_clock_init(env); cpu_mips_irqctrl_init(); + rtc_state = rtc_init(0x70, 8); + /* Register 64 KB of ISA IO space at 0x14000000 */ isa_mmio_init(0x14000000, 0x00010000); isa_mem_base = 0x10000000; isa_pic = pic_init(pic_irq_request, env); pit = pit_init(0x40, 0); + serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]); isa_vga_init(ds, phys_ram_base + ram_size, ram_size, vga_ram_size); @@ -202,6 +207,9 @@ void mips_r4k_init (int ram_size, int vg for(i = 0; i < 2; i++) isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i], bs_table[2 * i], bs_table[2 * i + 1]); + + kbd_init(); + DMA_init(1); } QEMUMachine mips_machine = { -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net