Revision b8c0e7d7

b/pc-bios/bios-pq/0013_fix-non-acpi-timer-interrupt-routing.patch
1
Fix non-ACPI Timer Interrupt Routing (Beth Kon)
1
From c09142004a409bf27070939f470c5e0b37595a5a Mon Sep 17 00:00:00 2001
2
From: Beth Kon <eak@us.ibm.com>
3
Date: Fri, 19 Jun 2009 14:22:00 -0400
4
Subject: [PATCH] Fix non-ACPI Timer Interrupt Routing - v3
2 5

  
3 6
Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
4 7

  
5 8
v1 -> v2 adds comment suggested by Ryan.
9
v2 -> v3 clarifies comment and corrects entry count
6 10

  
7 11
Signed-off-by: Beth Kon <eak@us.ibm.com>
8 12
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13
---
14
 bios/rombios32.c |   14 ++++++++++++++
15
 1 files changed, 14 insertions(+), 0 deletions(-)
9 16

  
10 17
diff --git a/bios/rombios32.c b/bios/rombios32.c
11
index 7be4216..dc7b5f3 100644
18
index 1a1ed64..d789e20 100644
12 19
--- a/bios/rombios32.c
13 20
+++ b/bios/rombios32.c
14
@@ -1168,6 +1168,12 @@ static void mptable_init(void)
21
@@ -1124,7 +1124,11 @@ static void mptable_init(void)
22
     putstr(&q, "0.1         "); /* vendor id */
23
     putle32(&q, 0); /* OEM table ptr */
24
     putle16(&q, 0); /* OEM table size */
25
+#ifdef BX_QEMU
26
+    putle16(&q, smp_cpus + 17); /* entry count */
27
+#else
28
     putle16(&q, smp_cpus + 18); /* entry count */
29
+#endif
30
     putle32(&q, 0xfee00000); /* local APIC addr */
31
     putle16(&q, 0); /* ext table length */
32
     putb(&q, 0); /* ext table checksum */
33
@@ -1166,6 +1170,12 @@ static void mptable_init(void)
15 34
 
16 35
     /* irqs */
17 36
     for(i = 0; i < 16; i++) {
18 37
+#ifdef BX_QEMU
19
+        /* One entry per ioapic input. Input 2 is covered by 
20
+           irq0->inti2 override (i == 0). irq 2 is unused */
38
+        /* One entry per ioapic interrupt destination. Destination 2 is covered
39
+           by irq0->inti2 override (i == 0). Source IRQ 2 is unused */
21 40
+        if (i == 2)
22 41
+            continue;
23
+#endif        
42
+#endif
24 43
         putb(&q, 3); /* entry type = I/O interrupt */
25 44
         putb(&q, 0); /* interrupt type = vectored interrupt */
26 45
         putb(&q, 0); /* flags: po=0, el=0 */
27
@@ -1175,7 +1181,11 @@ static void mptable_init(void)
46
@@ -1173,7 +1183,11 @@ static void mptable_init(void)
28 47
         putb(&q, 0); /* source bus ID = ISA */
29 48
         putb(&q, i); /* source bus IRQ */
30 49
         putb(&q, ioapic_id); /* dest I/O APIC ID */
......
32 51
+        putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
33 52
+#else
34 53
         putb(&q, i); /* dest I/O APIC interrupt in */
35
+#endif        
54
+#endif
36 55
     }
37 56
     /* patch length */
38 57
     len = q - mp_config_table;
58
-- 
59
1.6.2.5
60

  

Also available in: Unified diff