From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Add more devices to MIPS system emulation
Date: Wed, 6 Dec 2006 23:35:32 +0100 [thread overview]
Message-ID: <20061206223532.GB12170@bode.aurel32.net> (raw)
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
next reply other threads:[~2006-12-06 22:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 22:35 Aurelien Jarno [this message]
2006-12-06 23:19 ` [Qemu-devel] [PATCH] Add more devices to MIPS system emulation Thiemo Seufer
2006-12-06 23:29 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061206223532.GB12170@bode.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).