root / pc-bios / bios-pq / 0013_fix-non-acpi-timer-interrupt-routing.patch @ c6d25871
History | View | Annotate | Download (1.2 kB)
1 |
Fix non-ACPI Timer Interrupt Routing (Beth Kon)
|
---|---|
2 |
|
3 |
Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
|
4 |
|
5 |
v1 -> v2 adds comment suggested by Ryan.
|
6 |
|
7 |
Signed-off-by: Beth Kon <eak@us.ibm.com>
|
8 |
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
9 |
|
10 |
diff --git a/bios/rombios32.c b/bios/rombios32.c
|
11 |
index 7be4216..dc7b5f3 100644
|
12 |
--- a/bios/rombios32.c
|
13 |
+++ b/bios/rombios32.c
|
14 |
@@ -1168,6 +1168,12 @@ static void mptable_init(void) |
15 |
|
16 |
/* irqs */
|
17 |
for(i = 0; i < 16; i++) { |
18 |
+#ifdef BX_QEMU
|
19 |
+ /* One entry per ioapic input. Input 2 is covered by
|
20 |
+ irq0->inti2 override (i == 0). irq 2 is unused */
|
21 |
+ if (i == 2)
|
22 |
+ continue;
|
23 |
+#endif
|
24 |
putb(&q, 3); /* entry type = I/O interrupt */ |
25 |
putb(&q, 0); /* interrupt type = vectored interrupt */ |
26 |
putb(&q, 0); /* flags: po=0, el=0 */ |
27 |
@@ -1175,7 +1181,11 @@ static void mptable_init(void) |
28 |
putb(&q, 0); /* source bus ID = ISA */ |
29 |
putb(&q, i); /* source bus IRQ */
|
30 |
putb(&q, ioapic_id); /* dest I/O APIC ID */
|
31 |
+#ifdef BX_QEMU
|
32 |
+ putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
|
33 |
+#else
|
34 |
putb(&q, i); /* dest I/O APIC interrupt in */
|
35 |
+#endif
|
36 |
} |
37 |
/* patch length */
|
38 |
len = q - mp_config_table; |