mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
Fix non-ACPI Timer Interrupt Routing - v3
v1 -> v2 adds comment suggested by Ryan. v2 -> v3 clarifies comment and corrects entry count Signed-off-by: Beth Kon <eak@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d8d2e079fa
commit
b8c0e7d7c4
@ -1,30 +1,49 @@
|
|||||||
Fix non-ACPI Timer Interrupt Routing (Beth Kon)
|
From c09142004a409bf27070939f470c5e0b37595a5a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Beth Kon <eak@us.ibm.com>
|
||||||
|
Date: Fri, 19 Jun 2009 14:22:00 -0400
|
||||||
|
Subject: [PATCH] Fix non-ACPI Timer Interrupt Routing - v3
|
||||||
|
|
||||||
Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
|
Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
|
||||||
|
|
||||||
v1 -> v2 adds comment suggested by Ryan.
|
v1 -> v2 adds comment suggested by Ryan.
|
||||||
|
v2 -> v3 clarifies comment and corrects entry count
|
||||||
|
|
||||||
Signed-off-by: Beth Kon <eak@us.ibm.com>
|
Signed-off-by: Beth Kon <eak@us.ibm.com>
|
||||||
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
||||||
|
---
|
||||||
|
bios/rombios32.c | 14 ++++++++++++++
|
||||||
|
1 files changed, 14 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
diff --git a/bios/rombios32.c b/bios/rombios32.c
|
diff --git a/bios/rombios32.c b/bios/rombios32.c
|
||||||
index 7be4216..dc7b5f3 100644
|
index 1a1ed64..d789e20 100644
|
||||||
--- a/bios/rombios32.c
|
--- a/bios/rombios32.c
|
||||||
+++ b/bios/rombios32.c
|
+++ b/bios/rombios32.c
|
||||||
@@ -1168,6 +1168,12 @@ static void mptable_init(void)
|
@@ -1124,7 +1124,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 */
|
||||||
|
@@ -1166,6 +1170,12 @@ static void mptable_init(void)
|
||||||
|
|
||||||
/* irqs */
|
/* irqs */
|
||||||
for(i = 0; i < 16; i++) {
|
for(i = 0; i < 16; i++) {
|
||||||
+#ifdef BX_QEMU
|
+#ifdef BX_QEMU
|
||||||
+ /* One entry per ioapic input. Input 2 is covered by
|
+ /* One entry per ioapic interrupt destination. Destination 2 is covered
|
||||||
+ irq0->inti2 override (i == 0). irq 2 is unused */
|
+ by irq0->inti2 override (i == 0). Source IRQ 2 is unused */
|
||||||
+ if (i == 2)
|
+ if (i == 2)
|
||||||
+ continue;
|
+ continue;
|
||||||
+#endif
|
+#endif
|
||||||
putb(&q, 3); /* entry type = I/O interrupt */
|
putb(&q, 3); /* entry type = I/O interrupt */
|
||||||
putb(&q, 0); /* interrupt type = vectored interrupt */
|
putb(&q, 0); /* interrupt type = vectored interrupt */
|
||||||
putb(&q, 0); /* flags: po=0, el=0 */
|
putb(&q, 0); /* flags: po=0, el=0 */
|
||||||
@@ -1175,7 +1181,11 @@ static void mptable_init(void)
|
@@ -1173,7 +1183,11 @@ static void mptable_init(void)
|
||||||
putb(&q, 0); /* source bus ID = ISA */
|
putb(&q, 0); /* source bus ID = ISA */
|
||||||
putb(&q, i); /* source bus IRQ */
|
putb(&q, i); /* source bus IRQ */
|
||||||
putb(&q, ioapic_id); /* dest I/O APIC ID */
|
putb(&q, ioapic_id); /* dest I/O APIC ID */
|
||||||
@ -32,7 +51,10 @@ index 7be4216..dc7b5f3 100644
|
|||||||
+ putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
|
+ putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
|
||||||
+#else
|
+#else
|
||||||
putb(&q, i); /* dest I/O APIC interrupt in */
|
putb(&q, i); /* dest I/O APIC interrupt in */
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
/* patch length */
|
/* patch length */
|
||||||
len = q - mp_config_table;
|
len = q - mp_config_table;
|
||||||
|
--
|
||||||
|
1.6.2.5
|
||||||
|
|
||||||
|
BIN
pc-bios/bios.bin
BIN
pc-bios/bios.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user