* [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v3
@ 2009-04-22 2:43 Beth Kon
0 siblings, 0 replies; only message in thread
From: Beth Kon @ 2009-04-22 2:43 UTC (permalink / raw)
To: qemu-devel, bochs-developers
[-- Attachment #1: Type: text/plain, Size: 315 bytes --]
Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
v1 -> v2 adds comment suggested by Ryan.
v2 -> v3 clarifies comment and corrects entry count for non-ACPI case
Anthony, the old version of this patch needs to be removed and replaced
with this version.
Signed-off-by: Beth Kon <eak@us.ibm.com>
[-- Attachment #2: non_acpi_irqrouting.patch --]
[-- Type: text/x-diff, Size: 1670 bytes --]
diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest
index ebec71b..56b17f5 100644
Binary files a/bios/BIOS-bochs-latest and b/bios/BIOS-bochs-latest differ
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 7be4216..e0e2a95 100644
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -1126,7 +1126,11 @@ static void mptable_init(void)
putstr(&q, "0.1 "); /* vendor id */
putle32(&q, 0); /* OEM table ptr */
putle16(&q, 0); /* OEM table size */
+#ifdef BX_QEMU
+ putle16(&q, smp_cpus + 17); /* entry count */
+#else
putle16(&q, smp_cpus + 18); /* entry count */
+#endif
putle32(&q, 0xfee00000); /* local APIC addr */
putle16(&q, 0); /* ext table length */
putb(&q, 0); /* ext table checksum */
@@ -1168,6 +1172,12 @@ static void mptable_init(void)
/* irqs */
for(i = 0; i < 16; i++) {
+#ifdef BX_QEMU
+ /* One entry per ioapic interrupt destination. Destination 2 is covered
+ by irq0->inti2 override (i == 0). Source IRQ 2 is unused */
+ if (i == 2)
+ continue;
+#endif
putb(&q, 3); /* entry type = I/O interrupt */
putb(&q, 0); /* interrupt type = vectored interrupt */
putb(&q, 0); /* flags: po=0, el=0 */
@@ -1175,7 +1185,11 @@ static void mptable_init(void)
putb(&q, 0); /* source bus ID = ISA */
putb(&q, i); /* source bus IRQ */
putb(&q, ioapic_id); /* dest I/O APIC ID */
+#ifdef BX_QEMU
+ putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
+#else
putb(&q, i); /* dest I/O APIC interrupt in */
+#endif
}
/* patch length */
len = q - mp_config_table;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-22 2:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-22 2:43 [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v3 Beth Kon
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).