From owner-freebsd-acpi@FreeBSD.ORG Mon Jan 10 21:18:33 2011 Return-Path: Delivered-To: acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2C11106566C; Mon, 10 Jan 2011 21:18:32 +0000 (UTC) (envelope-from arno@heho.snv.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id 702168FC14; Mon, 10 Jan 2011 21:18:32 +0000 (UTC) Received: from heho.snv.jussieu.fr (heho.snv.jussieu.fr [134.157.184.22]) by shiva.jussieu.fr (8.14.4/jtpda-5.4) with ESMTP id p0ALIUdj061118 ; Mon, 10 Jan 2011 22:18:30 +0100 (CET) X-Ids: 165 Received: from heho.snv.jussieu.fr (localhost [127.0.0.1]) by heho.snv.jussieu.fr (8.14.3/8.14.3) with ESMTP id p0ALI8vF021769; Mon, 10 Jan 2011 22:18:08 +0100 (CET) (envelope-from arno@heho.snv.jussieu.fr) Received: (from arno@localhost) by heho.snv.jussieu.fr (8.14.3/8.14.3/Submit) id p0ALI8Z0021766; Mon, 10 Jan 2011 22:18:08 +0100 (CET) (envelope-from arno) To: Alexander Motin From: "Arno J. Klaassen" References: <201101051712.40619.jhb@freebsd.org> <201101070945.57800.jhb@freebsd.org> <4D2894CA.5010004@FreeBSD.org> Date: Mon, 10 Jan 2011 22:18:08 +0100 In-Reply-To: <4D2894CA.5010004@FreeBSD.org> (Alexander Motin's message of "Sat\, 08 Jan 2011 18\:46\:02 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at jchkmail.jussieu.fr with ID 4D2B77A6.001 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4D2B77A6.001/134.157.184.22/heho.snv.jussieu.fr/heho.snv.jussieu.fr/ Cc: acpi@FreeBSD.org, John Baldwin Subject: Re: Tyan S3992-E: hpet no longer working X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 21:18:33 -0000 Alexander Motin writes: > Arno J. Klaassen wrote: >> John Baldwin writes: >>=20 >>> On Thursday, January 06, 2011 5:32:08 pm Arno J. Klaassen wrote: >>>> John Baldwin writes: >>>> >>>>> On Wednesday, January 05, 2011 4:39:24 pm Arno J. Klaassen wrote: >>>>>> Hello, >>>>>> >>>>>> I have (a long-lasting) problem to get hpet attached to a Tyan S3992= -E >>>>>> MB. My last known working kernel is 7.1-PRERELEASE Sep 2 2008" , I >>>>>> rarely cared about this board for a while... >>>>>> >>>>>> At that time the dmesg said : >>>>>> >>>>>> >>>>>> acpi_hpet0: iomem 0xfed00000-0xfed003= ff >>>>>> on acpi0 >>>>>> Timecounter "HPET" frequency 25000000 Hz quality 900 >>>>>> >>>>>> now it says (debug.acpi.hpet_test=3D"1", debug.acpi.layer=3D"ACPI_TI= MER", >>>>>> debug.acpi.level=3D"ACPI_LV_ALL_EXCEPTIONS" enabled) : >>>>>> >>>>>> hpet0: iomem 0xfed00000-0xfed03fff on >>>>>> acpi0 >>>>>> hpet0: vendor 0xffff, rev 0xff, 232831Hz 64bit, 32 timers, legacy = route >>>>>> hpet0: t0: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t1: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t2: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t3: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t4: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t5: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t6: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t7: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t8: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t9: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t10: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t11: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t12: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t13: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t14: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t15: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t16: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t17: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t18: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t19: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t20: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t21: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t22: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t23: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t24: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t25: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t26: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t27: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t28: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t29: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t30: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: t31: irqs 0xffffffff (31), MSI, 64bit, periodic >>>>>> hpet0: 0.000000000: 4294967295 ... 4294967295 =3D 0 >>>>>> hpet0: time per call: 0 ns >>>>>> hpet0: HPET never increments, disabling >>>>>> device_attach: hpet0 attach returned 6 >>>>>> >>>>>> >>>>>> Some things strike me : >>>>>> >>>>>> 'vendor 0xffff, rev 0xf' and '4294967295 (=3D=3D 0xffffffff)' as w= ell >>>>>> as 232831Hz >>>>>> >>>>>> the change in iomem range : >>>>>> >>>>>> OK : iomem 0xfed00000-0xfed003ff >>>>>> KO : iomem 0xfed00000-0xfed03fff >>>>>> ^^^^ >>>>>> >>>>>> I can provide full dmesg and/or other extra needed info. >>>>> Arno sent me his acpidump which includes this: >>>>> >>>>> Device (HPET) >>>>> { >>>>> Name (_HID, EisaId ("PNP0103")) >>>>> Name (_UID, 0x34) >>>>> Method (_STA, 0, NotSerialized) >>>>> { >>>>> Return (0x0F) >>>>> } >>>>> >>>>> Method (_CRS, 0, NotSerialized) >>>>> { >>>>> Return (ResourceTemplate () >>>>> { >>>>> Memory32Fixed (ReadWrite, >>>>> 0xFED00000, // Address Base >>>>> 0x00004000, // Address Length >>>>> ) >>>>> }) >>>>> } >>>>> } >>>>> >>>>> So it does look like we are doing what the DSDT tells us in terms >>>>> of the memory address. >>>> yop. That said, I made yet another copy-paste error: the last known >>>> working kernel is 8.0-CURRENT Mar 1 2009 and the hpet says : >>>> >>>> acpi_hpet0: iomem 0xfed00000-0xfed003ff >>>> on acpi0 >>>> Timecounter "HPET" frequency 14318180 Hz quality 900=20 >>>> >>>> [only the frequency differs, the memory range indeed then was reported= as >>>> 0x400 and not 0x4000 ] >>>> >>>>> Arno, are there any BIOS options that mention the HPET or have you up= dated=20 >>>>> your BIOS since you booted the 7.1 kernel? >>>> yes .. I now use BIOS 1.06 released 06/09/09. >>>> Can I somehow 'overide' the bios and force the driver to use 0X400 as >>>> 'Address Length' in order to test if that makes the driver attach agai= n? >>> Changing the length wouldn't make a difference as we would still read t= he same=20 >>> registers since the start address is identical. I think the length is= =20 >>> symptomatic of the BIOS doing something differently that has disabled t= he=20 >>> HPET. >>=20 >> good point : this failure probably is not related to the FreeBSD-driver >> : in the current BIOS under the submenu 'South Bridge Chipset >> Configuration', the option to enable the HPET has disappeared (no >> mention of that in the release-notes), whilst it was present in the >> original BIOS, *and* disabled by default. >>=20 >> Is it possible to write to some register during hpet_enable() and force >> the timer to tick, regardless of the BIOS? > > Problem seems not about ticking, but about HPET registers working at > all. Returning ffh values for everything more probably tells that HPET > is just not in place where we look for it. [forgive my ignorance, long time since I didn't do any of these hardware architectural things ] I googled around a little bit and found some issues with similar chipsets, e.g. for xen 'enabl[ing] direct device assignment (PCI passthru) on AMD IOMMU platforms.' : http://www.mailinglistarchive.com/html/xen-devel@lists.xensource.com/2008= -07/msg00282.html Two remarks on that (quotes from the above thread) : "Due to some BIOS issues, this patch has a workaround to enable ht1100 ^^^^^^^^^^^ iommu." (patch supposedly for ht1100 chipset, but the guy responding has ht2000/ht1000, as I do) [ from his linux dmesg (under xen I suppose=E0 ] : [ 57.300688] PCI-DMA: Disabling AGP. [ 57.303516] PCI-DMA: aperture base @ c0000000 size 131072 KB [ 57.303656] PCI-DMA: using GART IOMMU. [ 57.303738] PCI-DMA: Reserving 128MB of IOMMU area in the AGP aperture These indeed are BIOS options : "Set GART size" with choice "AGP Present/Disabled, 32MB, 64MB, 128MB [default], ... . (I tried all, no luck) I have "device agp" in my kernel, but no trace of it in dmesg. [ 57.307831] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0 ^^^^^^^^^^^^^^^^^^ Might this imply that it is not the same address-space as where FreeBSD looks for it? again, my $0.01 ... For completenes, the two patches mentioned in the above thread can be found at : http://lists.xensource.com/archives/html/xen-devel/2007-11/txtJD2SnCs5Li.= txt http://lists.xensource.com/archives/html/xen-devel/2007-11/txtYFdQBW9AZT.= txt and both look rather 'hacky' ;-) Thanx, Arno