From owner-svn-src-all@FreeBSD.ORG Mon Nov 11 00:45:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5BDE9AAD; Mon, 11 Nov 2013 00:45:18 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA582D42; Mon, 11 Nov 2013 00:45:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAB0jI9r014365; Mon, 11 Nov 2013 00:45:18 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAB0jH0i014363; Mon, 11 Nov 2013 00:45:17 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311110045.rAB0jH0i014363@svn.freebsd.org> From: Neel Natu Date: Mon, 11 Nov 2013 00:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257933 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 00:45:18 -0000 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@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