summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-11-11 00:45:17 +0000
committerneel <neel@FreeBSD.org>2013-11-11 00:45:17 +0000
commit2731ea86242e7700708f848ff78174bc27b24a8e (patch)
tree76249441ab115abdc1e8d37168eba0661afddcc5 /usr.sbin
parentb5ebe2e35e78b419af1fd73654a125ae8a4b14de (diff)
downloadFreeBSD-src-2731ea86242e7700708f848ff78174bc27b24a8e.zip
FreeBSD-src-2731ea86242e7700708f848ff78174bc27b24a8e.tar.gz
x86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) to
pin 2 of the IOAPIC. Add an 'Interrupt Source Override' entry to the MADT to describe this and start asserting interrupts on pin 2 in the 8254 device model. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/acpi.c12
-rw-r--r--usr.sbin/bhyve/pit_8254.c4
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c
index 820394b..66c99fe 100644
--- a/usr.sbin/bhyve/acpi.c
+++ b/usr.sbin/bhyve/acpi.c
@@ -259,7 +259,17 @@ basl_fwrite_madt(FILE *fp)
EFPRINTF(fp, "[0004]\t\tInterrupt : 00000000\n");
EFPRINTF(fp, "\n");
- /* Override the 8259 chained vector. XXX maybe not needed */
+ /* Legacy IRQ0 is connected to pin 2 of the IOAPIC */
+ EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
+ EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
+ EFPRINTF(fp, "[0001]\t\tBus : 00\n");
+ EFPRINTF(fp, "[0001]\t\tSource : 00\n");
+ EFPRINTF(fp, "[0004]\t\tInterrupt : 00000002\n");
+ EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0005\n");
+ EFPRINTF(fp, "\t\t\tPolarity : 1\n");
+ EFPRINTF(fp, "\t\t\tTrigger Mode : 1\n");
+ EFPRINTF(fp, "\n");
+
EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
EFPRINTF(fp, "[0001]\t\tBus : 00\n");
diff --git a/usr.sbin/bhyve/pit_8254.c b/usr.sbin/bhyve/pit_8254.c
index 3987da3..88c2d22 100644
--- a/usr.sbin/bhyve/pit_8254.c
+++ b/usr.sbin/bhyve/pit_8254.c
@@ -106,8 +106,8 @@ pit_mevent_cb(int fd, enum ev_type type, void *param)
pit_mev_count++;
- ioapic_assert_pin(c->ctx, 0);
- ioapic_deassert_pin(c->ctx, 0);
+ ioapic_assert_pin(c->ctx, 2);
+ ioapic_deassert_pin(c->ctx, 2);
/*
* Delete the timer for one-shots
OpenPOWER on IntegriCloud