Subject: Re: apic timing/clock problem in 4.0_RC3, MacBook 2x2.0
To: None <email@example.com>
From: Marco Trillo <firstname.lastname@example.org>
Date: 11/10/2007 11:30:16
On 11/3/07, Marco Trillo <email@example.com> wrote:
> I have collected more information about the issue: I found a Linux
> bugreport of a similar problem (APIC timing calibration problem) which
> contained a possible cause: some feature of the Intel ICH7 called
> "LEGACY_USB" which "causes legacy USB circuit to cause SMI";
> apparently such SMIs in the middle of the calibration process botch
> Based on such report, I have added a quirk at the start of the
> initrtclock() function in src/sys/arch/x86/isa/clock.c to disable the
> LEGACY_USB SMI bit:
> outl(0x430, inl(0x430) & ~8);
> Indeed, the quirk appears to be working:
More news about the issue: as I reported before, that patch indeed
appears to resolve all the issues (thanks to Ryan Lortie for finding
the cause of the problem).
The problem is that adding this line to a generic kernel is quirky and
may affect negatively to other (non-MacBook) systems.
There was some discussion on FreeBSD lists about how to implement this
in a portable and clean way. It seems that the MacBook can be detected
using a SMBIOS 'system product' string:
What do you think of applying a similar patch to NetBSD?
By the way, I sent a PR describing the issue and the fix as "port-i386/37305".