From eddbd288a04d26852a9b5e3598eb90cd8ff5505f Mon Sep 17 00:00:00 2001 From: ths Date: Sat, 23 Dec 2006 00:23:19 +0000 Subject: [PATCH] More serial ports for the mips machine. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2271 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mips_r4k.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 1f779b2ff6..cf52a03586 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -24,6 +24,9 @@ static const int ide_iobase[2] = { 0x1f0, 0x170 }; static const int ide_iobase2[2] = { 0x3f6, 0x376 }; static const int ide_irq[2] = { 14, 15 }; +static int serial_io[MAX_SERIAL_PORTS] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; +static int serial_irq[MAX_SERIAL_PORTS] = { 4, 3, 4, 3 }; + extern FILE *logfile; static PITState *pit; /* PIT i8254 */ @@ -195,7 +198,13 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, 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]); + for(i = 0; i < MAX_SERIAL_PORTS; i++) { + if (serial_hds[i]) { + serial_init(&pic_set_irq_new, isa_pic, + serial_io[i], serial_irq[i], serial_hds[i]); + } + } + isa_vga_init(ds, phys_ram_base + ram_size, ram_size, vga_ram_size); -- GitLab