svn commit: r257933 - head/usr.sbin/bhyve
Neel Natu
neel at FreeBSD.org
Mon Nov 11 00:45:18 UTC 2013
Author: neel
Date: Mon Nov 11 00:45:17 2013
New Revision: 257933
URL: http://svnweb.freebsd.org/changeset/base/257933
Log:
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 at pluribusnetworks.com)
Modified:
head/usr.sbin/bhyve/acpi.c
head/usr.sbin/bhyve/pit_8254.c
Modified: head/usr.sbin/bhyve/acpi.c
==============================================================================
--- head/usr.sbin/bhyve/acpi.c Sun Nov 10 23:48:16 2013 (r257932)
+++ head/usr.sbin/bhyve/acpi.c Mon Nov 11 00:45:17 2013 (r257933)
@@ -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");
Modified: head/usr.sbin/bhyve/pit_8254.c
==============================================================================
--- head/usr.sbin/bhyve/pit_8254.c Sun Nov 10 23:48:16 2013 (r257932)
+++ head/usr.sbin/bhyve/pit_8254.c Mon Nov 11 00:45:17 2013 (r257933)
@@ -106,8 +106,8 @@ pit_mevent_cb(int fd, enum ev_type type,
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
More information about the svn-src-head
mailing list