qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Add more devices to MIPS system emulation


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH] Add more devices to MIPS system emulation
Date: Wed, 6 Dec 2006 23:35:32 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]