From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 11 17:41:26 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A555872 for ; Thu, 11 Jul 2013 17:41:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 420D81C2D for ; Thu, 11 Jul 2013 17:41:26 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8B569B999; Thu, 11 Jul 2013 13:41:25 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: Intel D2500CC serial ports Date: Thu, 11 Jul 2013 10:14:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307111014.42903.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 11 Jul 2013 13:41:25 -0400 (EDT) Cc: Robert Ames X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 17:41:26 -0000 On Sunday, June 30, 2013 1:24:27 pm Robert Ames wrote: > I just picked up an Intel D2500CCE motherboard and was disappointed > to find the serial ports didn't work. There has been discussion > about this problem here: > > http://lists.freebsd.org/pipermail/freebsd-current/2013-April/040897.html > http://lists.freebsd.org/pipermail/freebsd-current/2013-May/042088.html > > As seen in the second link, Juergen Weiss was able to work around > the problem. This patch (for 8.4-RELEASE amd64) makes all 4 serial > ports functional. > > --- /usr/src/sys/amd64/amd64/io_apic.c.orig 2013-06-02 13:23:05.000000000 -0500 > +++ /usr/src/sys/amd64/amd64/io_apic.c 2013-06-28 18:52:03.000000000 -0500 > @@ -452,6 +452,10 @@ > KASSERT(!(trig == INTR_TRIGGER_CONFORM || pol == INTR_POLARITY_CONFORM), > ("%s: Conforming trigger or polarity\n", __func__)); > > + if (trig == INTR_TRIGGER_EDGE && pol == INTR_POLARITY_LOW) { > + pol = INTR_POLARITY_HIGH; > + } > + Hmm, so this is your BIOS doing the wrong thing in its ASL. Maybe try this: --- //depot/user/jhb/acpipci/dev/acpica/acpi_resource.c 2011-07-22 17:59:31.000000000 0000 +++ /home/jhb/work/p4/acpipci/dev/acpica/acpi_resource.c 2011-07-22 17:59:31.000000000 0000 @@ -141,6 +141,10 @@ default: panic("%s: bad resource type %u", __func__, res->Type); } +#if defined(__amd64__) || defined(__i386__) + if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW) + pol = ACPI_ACTIVE_HIGH; +#endif BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ? INTR_POLARITY_HIGH : INTR_POLARITY_LOW); -- John Baldwin