From owner-freebsd-current@FreeBSD.ORG Mon Nov 5 13:41:19 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AAF716A418; Mon, 5 Nov 2007 13:41:19 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from munchkin.clue.co.za (munchkin.clue.co.za [66.219.59.160]) by mx1.freebsd.org (Postfix) with ESMTP id 1003313C48E; Mon, 5 Nov 2007 13:41:19 +0000 (UTC) (envelope-from ianf@clue.co.za) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=20070313; d=clue.co.za; h=Received:Received:Received:To:cc:From:Subject:In-Reply-To:X-Attribution:Date:Message-Id; b=LRLlUGqSjVpZFSQJB7kJG7Vkl26KEddm+27iVJ9q9ZbstCOdEWiFrk+bA5fFm+7RdrSmrLGRku8dysPkB2tbjqYCg3hqHcNmkFqRjz+RbVlG0hLe3sUSHjMqVkgsVSSuyFEZZKeJTpoW2cZlO8D2rqqYxW/YuVc/0AjV0DFAI7Og7zMiU+TY/dCqSmTw3GhqMghdAwjfUekyeZGU6A45mAUl8wYDtoE+1CuKK7f2C+clAjAxPYm8TtQj/uxlCei2; Received: from uucp by munchkin.clue.co.za with local-rmail (Exim 4.67) (envelope-from ) id 1Ip1x0-0000ew-DT; Mon, 05 Nov 2007 13:25:10 +0000 Received: from ianf.clue.co.za ([10.0.0.6] helo=clue.co.za) by urchin.clue.co.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1Ip1wT-0003l0-1X; Mon, 05 Nov 2007 13:24:37 +0000 Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.68 (FreeBSD)) (envelope-from ) id 1Ip1wR-0000Ik-W4; Mon, 05 Nov 2007 15:24:35 +0200 To: Rui Paulo From: Ian FREISLICH In-Reply-To: Message from Rui Paulo of "Sun, 04 Nov 2007 20:59:28 GMT." <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> X-Attribution: BOFH Date: Mon, 05 Nov 2007 15:24:35 +0200 Message-Id: Cc: freebsd-current@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 13:41:19 -0000 Rui Paulo wrote: > Hi, > I've been contacted by Marco Trillo and I think he has found the > source of the SMP problem. > The problem seems to rely on Intel ICH7. Basically we need to disable > the "LEGACY_USB" bit before we calibrate the clocks. > "LEGACY_USB", according to Marco (I don't have the ICH7 spec at hand), > "causes legacy USB circuit to generate SMIs". > > Please try the following patch: > --- sys/amd64/isa/clock.c.orig 2007-11-04 20:31:09.000000000 +0000 > +++ sys/amd64/isa/clock.c 2007-11-04 20:34:59.000000000 +0000 > @@ -577,6 +577,8 @@ startrtclock() > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); > > + outl(0x430, inl(0x430) & ~0x8); > + > freq = calibrate_clocks(); > #ifdef CLK_CALIBRATION_LOOP > if (bootverbose) { > --- sys/i386/isa/clock.c.orig 2007-11-04 20:34:03.000000000 +0000 > +++ sys/i386/isa/clock.c 2007-11-04 20:34:30.000000000 +0000 > @@ -621,6 +621,8 @@ startrtclock() > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); > > + outl(0x430, inl(0x430) & ~0x8); > + > freq = calibrate_clocks(); > #ifdef CLK_CALIBRATION_LOOP > if (bootverbose) { > > > This should probably fix two issues: > 1) The second core should start without any trick (e.g. key press) > 2) We should be able to run with HZ=1000 (the default) without any > problem. To check if this is indeed the case, try booting with HZ=1000 > (loader.conf variable kern.hz) and check if your CPU clock shows up > correctly in the dmesg. After that, please also check if 'time sleep > 1' takes one second (not more and not less). This indeed fixes the Mc Time problem I was experiencing. How nice not to have to attend the boot :) Now I can power on and turn my attention to the coffee machine first thing in the morning. Thanks! > Also, please test if there are any USB problems. No USB problems that I can tell. Ian -- Ian Freislich