|
|
1.1.1.2 ! root 1: From c09142004a409bf27070939f470c5e0b37595a5a Mon Sep 17 00:00:00 2001 ! 2: From: Beth Kon <[email protected]> ! 3: Date: Fri, 19 Jun 2009 14:22:00 -0400 ! 4: Subject: [PATCH] Fix non-ACPI Timer Interrupt Routing - v3 1.1 root 5: 6: Replicate ACPI irq0->inti2 override in mp table for non-acpi case. 7: 8: v1 -> v2 adds comment suggested by Ryan. 1.1.1.2 ! root 9: v2 -> v3 clarifies comment and corrects entry count 1.1 root 10: 11: Signed-off-by: Beth Kon <[email protected]> 12: Signed-off-by: Anthony Liguori <[email protected]> 1.1.1.2 ! root 13: --- ! 14: bios/rombios32.c | 14 ++++++++++++++ ! 15: 1 files changed, 14 insertions(+), 0 deletions(-) 1.1 root 16: 17: diff --git a/bios/rombios32.c b/bios/rombios32.c 1.1.1.2 ! root 18: index 1a1ed64..d789e20 100644 1.1 root 19: --- a/bios/rombios32.c 20: +++ b/bios/rombios32.c 1.1.1.2 ! root 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) 1.1 root 34: 35: /* irqs */ 36: for(i = 0; i < 16; i++) { 37: +#ifdef BX_QEMU 1.1.1.2 ! root 38: + /* One entry per ioapic interrupt destination. Destination 2 is covered ! 39: + by irq0->inti2 override (i == 0). Source IRQ 2 is unused */ 1.1 root 40: + if (i == 2) 41: + continue; 1.1.1.2 ! root 42: +#endif 1.1 root 43: putb(&q, 3); /* entry type = I/O interrupt */ 44: putb(&q, 0); /* interrupt type = vectored interrupt */ 45: putb(&q, 0); /* flags: po=0, el=0 */ 1.1.1.2 ! root 46: @@ -1173,7 +1183,11 @@ static void mptable_init(void) 1.1 root 47: putb(&q, 0); /* source bus ID = ISA */ 48: putb(&q, i); /* source bus IRQ */ 49: putb(&q, ioapic_id); /* dest I/O APIC ID */ 50: +#ifdef BX_QEMU 51: + putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */ 52: +#else 53: putb(&q, i); /* dest I/O APIC interrupt in */ 1.1.1.2 ! root 54: +#endif 1.1 root 55: } 56: /* patch length */ 57: len = q - mp_config_table; 1.1.1.2 ! root 58: -- ! 59: 1.6.2.5 ! 60:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.