Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 2010 08:23:34 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        David Naylor <naylor.b.david@gmail.com>
Cc:        freebsd-current@freebsd.org, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: Safe-mode on amd64 broken
Message-ID:  <4CA41ED6.5060208@FreeBSD.org>
In-Reply-To: <201009292048.11194.naylor.b.david@gmail.com>
References:  <201009291207.53146.naylor.b.david@gmail.com> <201009291820.02401.naylor.b.david@gmail.com> <4CA36869.7040205@FreeBSD.org> <201009292048.11194.naylor.b.david@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------070406070505010906060903
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 7bit

David Naylor wrote:
> On Wednesday 29 September 2010 18:25:13 Alexander Motin wrote:
>> David Naylor wrote:
>>> On Wednesday 29 September 2010 16:19:08 Andriy Gapon wrote:
>>>> What do you try to actually achieve?
>>> I was trying to boot a system and it was panicking due to stray
>>> interrupts. It turned out to be caused by HPET.  I found
>>> `hint.hpet.0.clock=0' which fixed the problem.
>>>
>>> This means HPET does not work on any of my machines.  The other one's
>>> symptoms are hda losing interrupts after a period of up-time.
>> What chipset do you use? Nvidia MCP5x? Could you send me your verbose
>> dmesg?
> 
> Yes, the one is a MCP51, the other is a ICH8M.  
> 
> The desktop is a Gigabyte N650SLI-DS4L.  Its symptom is hda losing interrupts 
> after a period of time.  

There are too many reports about different lost interrupts problems on
different controllers of MCP5x. I don't know the reason. Attached patch
should disable using regular HPET interrupts on NVidia chipsets. I hope
it will work as workaround. May be it is too aggressive, but better to
be safe then sorry. I assume that legacy_route mode may still work fine
there. It would be nice to test it.

> The laptop is a Acer 2920.  Its symptom for a GENERIC is a panic saying stray 
> interrupt (irq7), with a custom kernel booting stalls.  

This is strange, as my Acer with the same ICH8M works fine in all
possible modes. Also IMHO stray interrupts are not a reason to panic.
Could you show what it looks like?

-- 
Alexander Motin

--------------070406070505010906060903
Content-Type: text/plain;
 name="hpet.nonv.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="hpet.nonv.patch"

--- acpi_hpet.c.prev	2010-09-13 10:25:36.000000000 +0300
+++ acpi_hpet.c	2010-09-30 08:09:34.000000000 +0300
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD: head/sys/dev/acpica/
 
 #define HPET_VENDID_AMD		0x4353
 #define HPET_VENDID_INTEL	0x8086
+#define HPET_VENDID_NVIDIA	0x10de
 
 ACPI_SERIAL_DECL(hpet, "ACPI HPET support");
 
@@ -492,6 +493,12 @@ hpet_attach(device_t dev)
 	if (vendor == HPET_VENDID_AMD)
 		sc->allowed_irqs = 0x00000000;
 	/*
+	 * NVidia MCP5x chipsets have number of unexplained interrupt
+	 * problems. For some reason, using HPET interrupts breaks HDA sound.
+	 */
+	if (vendor == HPET_VENDID_NVIDIA && rev <= 0x01)
+		sc->allowed_irqs = 0x00000000;
+	/*
 	 * Neither QEMU nor VirtualBox report supported IRQs correctly.
 	 * The only way to use HPET there is to specify IRQs manually
 	 * and/or use legacy_route. Legacy_route mode work on both.

--------------070406070505010906060903--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CA41ED6.5060208>