From 65d20f17cb5a9d75371cd709bfbad0fff8bcb6f7 Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Mon, 24 Oct 2011 13:35:10 -0700 Subject: Scrap IRQs for x86 system image. This is a temporary fix that enables GoogleTV emulation on tools R15+ The permanent solution would be to increase number of available IRQs from 16 to something more appropriate. For now just: 1. Use IRQ3 for the events device. 2. Decrease number of TTY ports from 4 to 2. These two measures would free up 3 IRQs, so the chances of running out of available IRQs are significantly decreased. Change-Id: Ie788880935d6e15f1f02f61e862c8727c8690b4a --- hw/pc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hw') diff --git a/hw/pc.c b/hw/pc.c index f44c44e..a8d609a 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -857,6 +857,11 @@ static struct goldfish_device event0_device = { .name = "goldfish_events", .id = 0, .size = 0x1000, + /* FIXME: This is just a work around before we have a permanent fix on + * increasing number of IRQs available for x86 sysimages. IRQ3 is normally + * assigned to COM2/COM4, and we have our own custom IRQs for those. So, + * it's safe to reserve it for the events device. */ + .irq = 3, .irq_count = 1 }; @@ -1115,7 +1120,16 @@ static void pc_init1(ram_addr_t ram_size, } goldfish_tty_add(serial_hds[0], 0, 0, 0); + /* FIXME: This is just a work around before we have a permanent fix on + * increasing number of IRQs available for x86 sysimages. In order to free up + * some IRQs for a better use, we limit number of TTY devices by 2. Normally + * we don't need more than that, so always having 4 of them would waste two + * precious IRQs. */ +#if 0 for(i = 1; i < MAX_SERIAL_PORTS; i++) { +#else + for(i = 1; i < 2; i++) { +#endif if(serial_hds[i]) { goldfish_tty_add(serial_hds[i], i, 0, 0); } -- cgit v1.1