diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-10-24 13:35:10 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-10-24 18:15:04 -0700 |
commit | d1d5c771c0df561fe612de0d2cd515de32c6e630 (patch) | |
tree | 688cbbe35403888bf34a6a24da7ceddbc24ec820 | |
parent | 29d70d00e46149368a14b90ef868787ed061cbe2 (diff) | |
download | qemu-tools_r15.tar.gz |
Cherry-pick 65d20f17 from master to r15. do not merge.tools_r15
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: I321c68eb5a152cb8bc166decd9b605942c50fc13
-rw-r--r-- | hw/pc.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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); } |