aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-10-24 13:35:10 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-10-24 13:35:10 -0700
commit65d20f17cb5a9d75371cd709bfbad0fff8bcb6f7 (patch)
tree45b48d460e1600e7a255a7fabc6ebd6becf33464 /hw
parent79570c3532503840855517494978082a99543a30 (diff)
downloadexternal_qemu-65d20f17cb5a9d75371cd709bfbad0fff8bcb6f7.zip
external_qemu-65d20f17cb5a9d75371cd709bfbad0fff8bcb6f7.tar.gz
external_qemu-65d20f17cb5a9d75371cd709bfbad0fff8bcb6f7.tar.bz2
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
Diffstat (limited to 'hw')
-rw-r--r--hw/pc.c14
1 files changed, 14 insertions, 0 deletions
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);
}