From owner-freebsd-hardware@FreeBSD.ORG Sun Nov 4 15:41:28 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF8E16A41B for ; Sun, 4 Nov 2007 15:41:28 +0000 (UTC) (envelope-from franceschini_a@tiscali.it) Received: from relay-pt3.poste.it (relay-pt3.poste.it [62.241.4.129]) by mx1.freebsd.org (Postfix) with ESMTP id CD18413C4A8 for ; Sun, 4 Nov 2007 15:41:27 +0000 (UTC) (envelope-from franceschini_a@tiscali.it) Received: from knute.cs.poste.it (192.168.44.146) by relay-pt3.poste.it (7.3.122) id 472D0BD900001D50 for freebsd-hardware@freebsd.org; Sun, 4 Nov 2007 16:17:43 +0100 Received: from knute.cs.poste.it (localhost [127.0.0.1]) by knute.cs.poste.it (8.14.1/8.12.10) with ESMTP id lA4FHhMD008340 for ; Sun, 4 Nov 2007 16:17:43 +0100 (CET) (envelope-from franceschini_a@tiscali.it) Received: (from andrea@localhost) by knute.cs.poste.it (8.14.1/8.12.10/Submit) id lA4FHhrZ008339 for freebsd-hardware@freebsd.org; Sun, 4 Nov 2007 16:17:43 +0100 (CET) (envelope-from franceschini_a@tiscali.it) X-Authentication-Warning: knute.cs.poste.it: andrea set sender to franceschini_a@tiscali.it using -f Date: Sun, 4 Nov 2007 16:17:42 +0100 From: franceschini_a@tiscali.it To: freebsd-hardware@freebsd.org Message-ID: <20071104151742.GA8181@postecom.it> Mail-Followup-To: freebsd-hardware@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: DWL-G510 aka rt61 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 15:41:28 -0000 Hi All, I recently bought a DWL-G510 because i thought it was supported on freebsd 6.2 trough ral device. Unfortunately it happens that this card is a rev C2 model and, as I found later , this seem to not be correctly handled :( This is how the card is seen by the system: 00:13.0 Network controller: RaLink RT2561/RT61 rev B 802.11g Subsystem: D-Link System Inc DWL-G510 Rev C Flags: bus master, slow devsel, latency 32, IRQ 255 Memory at f4800000 (32-bit, non-prefetchable) [disabled] Capabilities: [40] Power Management version 2 Actually the if_ral module loads but it fails to associate: ral0: flags=8843 mtu 1500 ether 00:15:e9:b3:79:14 media: IEEE 802.11 Wireless Ethernet autoselect (DS/1Mbps) status: no carrier ssid homenet channel 5 authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit wepkey 2:40-bit wepkey 3:40-bit wepkey 4:40-bit txpowmax 100 bmiss 7 protmode CTS bintval 100 it keeps searching for the channel (it changes every time I do an ifconfig ral0) I saw that someone has filed a bug report on it (kern/109227), but no progress so far. The bug reports stats that the cards works on FreeBSD 7.0, but as far as I tried it doesn't work for me. I tried with ndisgen too without success. The cards comes up but It doesn't associate. Does anyone have any hint? Thanks in advance Andrea. From owner-freebsd-hardware@FreeBSD.ORG Sun Nov 4 16:16:13 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from misaki (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with SMTP id 6026D16A418; Sun, 4 Nov 2007 16:16:12 +0000 (UTC) (envelope-from ariff@FreeBSD.org) Date: Mon, 5 Nov 2007 00:16:08 +0800 From: Ariff Abdullah To: franceschini_a@tiscali.it Message-Id: <20071105001608.0dec24e1.ariff@FreeBSD.org> In-Reply-To: <20071104151742.GA8181@postecom.it> References: <20071104151742.GA8181@postecom.it> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__5_Nov_2007_00_16_08_+0800_Abw3Ji101kx6dLoK" Cc: freebsd-hardware@freebsd.org Subject: Re: DWL-G510 aka rt61 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 16:16:13 -0000 --Signature=_Mon__5_Nov_2007_00_16_08_+0800_Abw3Ji101kx6dLoK Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 4 Nov 2007 16:17:42 +0100 franceschini_a@tiscali.it wrote: > Hi All, >=20 > I recently bought a DWL-G510 because i thought it > was supported on freebsd 6.2 trough ral device. >=20 > Unfortunately it happens that this card is a rev C2 > model and, as I found later , this seem to not be > correctly handled :( >=20 > This is how the card is seen by the system: >=20 > 00:13.0 Network controller: RaLink RT2561/RT61 rev B 802.11g > Subsystem: D-Link System Inc DWL-G510 Rev C > Flags: bus master, slow devsel, latency 32, IRQ 255 > Memory at f4800000 (32-bit, non-prefetchable) [disabled] > Capabilities: [40] Power Management version 2 >=20 > Actually the if_ral module loads but it fails to associate: >=20 > ral0: flags=3D8843 mtu 1500 > ether 00:15:e9:b3:79:14 > media: IEEE 802.11 Wireless Ethernet autoselect (DS/1Mbps) > status: no carrier > ssid homenet channel 5 > authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit wepkey > 2:40-bit wepkey 3:40-bit wepkey 4:40-bit txpowmax 100 bmiss > 7 protmode CTS bintval 100 >=20 > =09 > it keeps searching for the channel (it changes every time I do > an ifconfig ral0) >=20 > I saw that someone has filed a bug report on it (kern/109227), > but no progress so far. > =09 > The bug reports stats that the cards works on FreeBSD 7.0,=20 > but as far as I tried it doesn't work for me. >=20 > I tried with ndisgen too without success. >=20 > The cards comes up but It doesn't associate. >=20 > Does anyone have any hint? >=20 About the simmilar case as of me. Try using ndisgen + Win9x drivers (rt61_9x.sys/inf from the driver CD). Works for me (well, for now at least..). -- Ariff Abdullah FreeBSD ... Recording in stereo is obviously too advanced and confusing for us idiot ***** users :P ........ --Signature=_Mon__5_Nov_2007_00_16_08_+0800_Abw3Ji101kx6dLoK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHLfBIlr+deMUwTNoRAjewAJ4mUPeGzGEJH0VH+gf2Ih8JQGmWmgCgo17V 83qhPFu0ZU1lTnEXvXwAUTE= =6KL3 -----END PGP SIGNATURE----- --Signature=_Mon__5_Nov_2007_00_16_08_+0800_Abw3Ji101kx6dLoK-- From owner-freebsd-hardware@FreeBSD.ORG Sun Nov 4 19:53:26 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D73CE16A421 for ; Sun, 4 Nov 2007 19:53:26 +0000 (UTC) (envelope-from lothlorien@tochka.ru) Received: from smtp04.mtu.ru (smtp04.mtu.ru [62.5.255.51]) by mx1.freebsd.org (Postfix) with ESMTP id 7942213C4A8 for ; Sun, 4 Nov 2007 19:53:24 +0000 (UTC) (envelope-from lothlorien@tochka.ru) Received: from ABBEYROAD (unknown [91.77.118.222]) by smtp04.mtu.ru (Postfix) with ESMTP id A727B7F1753 for ; Sun, 4 Nov 2007 22:17:27 +0300 (MSK) Date: Sun, 4 Nov 2007 22:17:24 +0300 From: Gennady Kudryashoff X-Mailer: The Bat! (v2.10.03) UNREG / CD5BF9353B3B7091 Organization: UFMS of Moscow / Home X-Priority: 3 (Normal) Message-ID: <1369686293.20071104221724@tochka.ru> To: freebsd-hardware@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: atacontrol fails to set up WDMA2 mode for PIIX3 controller on 5.5-Release X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gennady Kudryashoff List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 19:53:26 -0000 Hi. I've installed FreeBSD 5.5-Release on old-stoned motherboard on Triton chipset with Intel PIIX3 (supports WDMA2) controller and 40GB WD Harddisk. Everything was fine (in place of FreeBSD 6.2 Release, where BTX hangs), however I can't set WDMA2 mode, atacontrol mode 0 WDMA2 PIO4 just does nothing. What can I do with this situation? All looks like this: [root@fido /home/gk]# uname -a FreeBSD fido.local 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Tue May 23 14:58:27 UTC 2006 root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 [root@fido /home/gk]# dmesg >[skip]< atapci0: port 0x3000-0x300f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 7.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 >[skip]< ad0: 38166MB [77545/16/63] at ata0-master BIOSPIO >[skip]< [root@fido /home/gk]# sysctl hw.ata.ata_dma hw.ata.ata_dma: 1 [root@fido /home/gk]# atacontrol cap 0 0 ATA channel 0, Master, device ad0: Protocol ATA/ATAPI revision 5 device model WDC WD400EB-00CPF0 serial number WD-WCAATD995772 firmware revision 06.04G06 cylinders 16383 heads 16 sectors/track 63 lba supported 78165360 sectors lba48 not supported dma supported overlap not supported Feature Support Enable Value Vendor write cache yes yes read ahead yes yes dma queued no no 0/0x00 SMART yes no microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 [root@fido /home/gk]# atacontrol mode 0 Master = BIOSPIO Slave = BIOSPIO [root@fido /home/gk]# atacontrol mode 0 WDMA2 PIO4 Master = BIOSPIO Slave = BIOSPIO From owner-freebsd-hardware@FreeBSD.ORG Sun Nov 4 22:01:14 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E7C16A46C for ; Sun, 4 Nov 2007 22:01:14 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id AE5A413C491 for ; Sun, 4 Nov 2007 22:01:13 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so978602uge for ; Sun, 04 Nov 2007 14:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer:sender; bh=kM6iUTDUZ29ECWpboDyOzuqgmoAsG2POY3iWwLhgGXw=; b=cXCOGnogeh547p2Be22oIIgmWsEQ49HLTU7lkWglc2KMeP7xK5gphKBA3HfAs8LHLUp/jAv6MUPRn3yeOg/m/3IqW8T96dABl9ZpzVMJGUEp80lEBDHB6L36/+nuqwGpmiYacPUqkR8pQoLPC/ZRp+HAg7IjTgwl1NGKsoyfKXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer:sender; b=r2/Uq4AUZh25cXIR+IyY3vPjniz4cshZlWgQwQEblzWZntoMf/wg1MdaJlvmQYImUBLgSkZWSDSz0tVlH4kCSi2mf44n1x3FpELgbr6fWkjEbxzmjs7VXm91cXz47g6rO18W49rlbMdEMpUJgdnLDjexYeQ0ZtIAlh//hBnLsIo= Received: by 10.67.24.11 with SMTP id b11mr647325ugj.1194209975674; Sun, 04 Nov 2007 12:59:35 -0800 (PST) Received: from epsilon.mshome.net ( [78.130.8.20]) by mx.google.com with ESMTPS id d26sm9969058nfh.2007.11.04.12.59.32 (version=SSLv3 cipher=OTHER); Sun, 04 Nov 2007 12:59:34 -0800 (PST) Message-Id: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> From: Rui Paulo To: freebsd-hardware@FreeBSD.org, freebsd-current@FreeBSD.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Date: Sun, 4 Nov 2007 20:59:28 +0000 X-Mailer: Apple Mail (2.912) Sender: Rui Paulo Cc: Subject: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 22:01:14 -0000 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). Also, please test if there are any USB problems. Note: this is still a hack. I'm still thinking about a way to correctly identify on which systems we need to apply this fix. Regards. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Sun Nov 4 23:31:22 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D8616A474; Sun, 4 Nov 2007 23:31:22 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (thunderstone.rink.nu [80.112.228.34]) by mx1.freebsd.org (Postfix) with ESMTP id AE6B613C4B3; Sun, 4 Nov 2007 23:31:22 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 608D36D435; Mon, 5 Nov 2007 00:14:29 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([127.0.0.1]) by localhost (thunderstone.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xXNH-AOAOEnU; Mon, 5 Nov 2007 00:14:22 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id B75DB6D432; Mon, 5 Nov 2007 00:14:22 +0100 (CET) Date: Mon, 5 Nov 2007 00:14:22 +0100 From: Rink Springer To: Rui Paulo Message-ID: <20071104231422.GA82337@rink.nu> References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-current@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 23:31:23 -0000 Hi Rui, On Sun, Nov 04, 2007 at 08:59:28PM +0000, Rui Paulo wrote: > Note: this is still a hack. I'm still thinking about a way to > correctly identify on which systems we need to apply this fix. This indeed looks hackikly - I don't know whether it's possible to distinguish between a 'normal' PC or a MacBook - but if this is not possible, maybe a kernel option is in order? -- Rink P.W. Springer - http://rink.nu "root is always right" -- the kernel From owner-freebsd-hardware@FreeBSD.ORG Mon Nov 5 00:02:02 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02EA916A46C for ; Mon, 5 Nov 2007 00:02:02 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.freebsd.org (Postfix) with ESMTP id B45A113C4A3 for ; Mon, 5 Nov 2007 00:02:01 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so2834506pyb for ; Sun, 04 Nov 2007 16:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=d1Ei2sEsAYpmCUfnBu/YHm/NaY0ee3U3+pdD6zNouN0=; b=Vsz1SrIocEPg48yTZA//N92vj22fAw8KTkvOUJD6hAm9GM+1+XGINvCKqxv/FZrapaFvfDXJbnQKS0zrftnVRT0TIYJqsTrMkpVj6Z78wpu2pTDRrrADX1P6sfhH8zw+pSkzrzIcb96W/VPf1i7Ur7Ztc60sVW44kGQq6rmUaVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=DH3QQP/w8yTYcN0qrYDZHleXKAGgYE7YMoZ8alGmWdtKapZeJ/0YExp+Zn/Ef5/IaWel+gaKYw9W7PAFpeVhmzFLR4sH6j0A0EWIRcxhRBFtjAvqLzE4syAoyMBq2eW+TOgvq/FeebK0q9ZQSZYNcC4VVq3GoWVEDbjxpBVXMFA= Received: by 10.35.102.1 with SMTP id e1mr5355645pym.1194220543353; Sun, 04 Nov 2007 15:55:43 -0800 (PST) Received: by 10.35.9.16 with HTTP; Sun, 4 Nov 2007 15:55:38 -0800 (PST) Message-ID: Date: Sun, 4 Nov 2007 23:55:38 +0000 From: "Rui Paulo" Sender: rpaulo@gmail.com To: "Rink Springer" In-Reply-To: <20071104231422.GA82337@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> X-Google-Sender-Auth: 9cae1ca62355628d Cc: freebsd-current@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 00:02:02 -0000 On Nov 4, 2007 11:14 PM, Rink Springer wrote: > Hi Rui, > > On Sun, Nov 04, 2007 at 08:59:28PM +0000, Rui Paulo wrote: > > Note: this is still a hack. I'm still thinking about a way to > > correctly identify on which systems we need to apply this fix. > > This indeed looks hackikly - I don't know whether it's possible to > distinguish between a 'normal' PC or a MacBook - but if this is not > possible, maybe a kernel option is in order? It's possible to distinguish between a MacBook and a PeeCee via smbios vendor strings. But what I actually wanted was something more general. Regards. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Mon Nov 5 13:41:19 2007 Return-Path: Delivered-To: freebsd-hardware@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-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware 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 From owner-freebsd-hardware@FreeBSD.ORG Mon Nov 5 18:34:34 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A21F16A41B; Mon, 5 Nov 2007 18:34:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id E933D13C494; Mon, 5 Nov 2007 18:34:33 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lA5IIBFr039029; Mon, 5 Nov 2007 11:18:11 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <472F5E62.4080406@samsco.org> Date: Mon, 05 Nov 2007 11:18:10 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Mon, 05 Nov 2007 11:18:11 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: Rink Springer , freebsd-hardware@freebsd.org, freebsd-current@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 18:34:34 -0000 Rui Paulo wrote: > On Nov 4, 2007 11:14 PM, Rink Springer wrote: >> Hi Rui, >> >> On Sun, Nov 04, 2007 at 08:59:28PM +0000, Rui Paulo wrote: >>> Note: this is still a hack. I'm still thinking about a way to >>> correctly identify on which systems we need to apply this fix. >> This indeed looks hackikly - I don't know whether it's possible to >> distinguish between a 'normal' PC or a MacBook - but if this is not >> possible, maybe a kernel option is in order? > > It's possible to distinguish between a MacBook and a PeeCee via smbios > vendor strings. > But what I actually wanted was something more general. > > Regards. Turning this on universally should only affect USB keyboard operation in KDB early in boot (or if the USB drivers were omitted during boot). It sounds like this affects clock calibration on other systems, not just Macs. So I'd vote for this being made into a negative option, i.e. options ENABLE_ICH_USB_LEGACY That'll at least let people boot with a GENERIC kernel and then decide for themselves if they want it enabled or disabled. It could also be made into tunable and set via the loader menu, but I'd only advocate that if there were found to be other side effects that prevented some users from booting with GENERIC. Anyways, good job figuring this out. Talk about an obscure problem. Now I don't feel so bad about spending days in vain going line-by-line through the AP startup code looking for the problem. Scott From owner-freebsd-hardware@FreeBSD.ORG Mon Nov 5 19:26:05 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D9616A469 for ; Mon, 5 Nov 2007 19:26:05 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.186]) by mx1.freebsd.org (Postfix) with ESMTP id B46A113C4B7 for ; Mon, 5 Nov 2007 19:26:04 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by mu-out-0910.google.com with SMTP id i10so1950728mue for ; Mon, 05 Nov 2007 11:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=9NG9iplxgrl1+uC8iZYnW69jHGkLc/lMEtQarxTwxvk=; b=IlNusnbw+1t+n7ESQQ/yMlviDp3pawNShYYvZyb/MN2qjiTV/XBJ58Ohkw1cwin28vvUfR3GatXaRblhoKgi7lWhyd7UvupSDm62AjR1vcdhj4cX93/qkN1z8Fo9qDoAxptiIhZU10hOkP635OoYgV+Q+ts6+3eFe9guQZbmSgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=G23Sd8eaasrZHoClmVSmbBA6VlDhRyXGo/ceD4+P/jJId5n4hWFTke1JGe92NDNeawTphQwxgcE6TlGlTGkUfnBqIIT/DPkxN6t6+pGGqh+VQwuoa2C+QKYt9iXTZEe9aijndNRyuWqExwfBmKyhj75sqmW2hfLXxgscnJ9bdzc= Received: by 10.86.74.15 with SMTP id w15mr3658424fga.1194290753057; Mon, 05 Nov 2007 11:25:53 -0800 (PST) Received: from ?172.17.14.191? ( [193.136.24.218]) by mx.google.com with ESMTPS id 28sm12858940fkx.2007.11.05.11.25.50 (version=SSLv3 cipher=OTHER); Mon, 05 Nov 2007 11:25:51 -0800 (PST) Message-Id: <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> From: Rui Paulo To: Scott Long In-Reply-To: <472F5E62.4080406@samsco.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Date: Mon, 5 Nov 2007 19:25:48 +0000 References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> X-Mailer: Apple Mail (2.912) Sender: Rui Paulo Cc: Rink Springer , freebsd-current@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 19:26:05 -0000 On 5 Nov 2007, at 18:18, Scott Long wrote: > Rui Paulo wrote: >> On Nov 4, 2007 11:14 PM, Rink Springer wrote: >>> Hi Rui, >>> >>> On Sun, Nov 04, 2007 at 08:59:28PM +0000, Rui Paulo wrote: >>>> Note: this is still a hack. I'm still thinking about a way to >>>> correctly identify on which systems we need to apply this fix. >>> This indeed looks hackikly - I don't know whether it's possible to >>> distinguish between a 'normal' PC or a MacBook - but if this is not >>> possible, maybe a kernel option is in order? >> It's possible to distinguish between a MacBook and a PeeCee via >> smbios >> vendor strings. >> But what I actually wanted was something more general. >> Regards. > > Turning this on universally should only affect USB keyboard > operation in > KDB early in boot (or if the USB drivers were omitted during boot). Hmm. I was never able to interact with DDB early on boot. Only after USB gets probed. > It sounds like this affects clock calibration on other systems, not > just > Macs. So I'd vote for this being made into a negative option, i.e. > > options ENABLE_ICH_USB_LEGACY > > That'll at least let people boot with a GENERIC kernel and then decide > for themselves if they want it enabled or disabled. It could also be > made into tunable and set via the loader menu, but I'd only advocate > that if there were found to be other side effects that prevented some > users from booting with GENERIC. I think a loader variable is the best way to go. As I really don't know how if this will affect negatively other systems I was planning to produce a patch that does something like: usb_legacy = getenv("hw.ich.usb_legacy"); if (!usb_legacy) usb_legacy = 0; usb_legacy_activated = read_bit_from_SMI_EN; // SMI Control and Enable Register if (usb_legacy_activated && usb_legacy == "0") { disable SMI interrupt with USB; } What do you think? > Anyways, good job figuring this out. Talk about an obscure problem. > Now I don't feel so bad about spending days in vain going line-by-line > through the AP startup code looking for the problem. Well, don't thank me. As I said in the first email, someone else working on NetBSD found this issue, not me. Regards. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Tue Nov 6 12:04:09 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F8F516A46D for ; Tue, 6 Nov 2007 12:04:09 +0000 (UTC) (envelope-from cjk32@cam.ac.uk) Received: from ppsw-6.csi.cam.ac.uk (ppsw-6.csi.cam.ac.uk [131.111.8.136]) by mx1.freebsd.org (Postfix) with ESMTP id 014C413C4F4 for ; Tue, 6 Nov 2007 12:04:08 +0000 (UTC) (envelope-from cjk32@cam.ac.uk) X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from gw.cjkey.org.uk ([88.97.163.222]:4177 helo=[192.168.2.186]) by ppsw-6.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:465) with esmtpsa (PLAIN:cjk32) (TLSv1:DHE-RSA-AES256-SHA:256) id 1IpMpv-0006zp-JO (Exim 4.67) (return-path ); Tue, 06 Nov 2007 11:43:15 +0000 Message-ID: <47305327.7050205@cam.ac.uk> Date: Tue, 06 Nov 2007 11:42:31 +0000 From: Christopher Key User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Achilleas Mantzios References: <200711021411.02488.achill@matrix.gatewaynet.com> In-Reply-To: <200711021411.02488.achill@matrix.gatewaynet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hardware@freebsd.org Subject: Re: Implementing a "normally open" relay X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 12:04:09 -0000 Achilleas Mantzios wrote: > Hi, > i am building a home security system based on zoneminder under FreeBSD 6.2. > I think i have it all sorted out, except a way to drive an external alarm upon > camera motion. > > > Have two states: > > a) (normal) Have the two wires isolated from eachother, ground, voltage > b) (alarm) Connect the wires together (shortcircuiting the EOL). > > Could it be done someway with /dev/cuad* /dev/lpt* > > > Probably overkill, but you can buy general purpose relay boards driven from the parallel port, e.g., http://www.electronic-kits-and-projects.com/3074.htm Chris From owner-freebsd-hardware@FreeBSD.ORG Tue Nov 6 13:04:15 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE47E16A420 for ; Tue, 6 Nov 2007 13:04:15 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mx1.freebsd.org (Postfix) with ESMTP id 4C62613C4B6 for ; Tue, 6 Nov 2007 13:04:14 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.13.6/8.13.6) with ESMTP id lA6D3tlZ028267 for ; Tue, 6 Nov 2007 15:03:55 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.13.6/8.13.6/Submit) id lA6D3q9k028266 for freebsd-hardware@freebsd.org; Tue, 6 Nov 2007 15:03:52 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: freebsd-hardware@freebsd.org User-Agent: KMail/1.9.3 References: <200711021411.02488.achill@matrix.gatewaynet.com> <47305327.7050205@cam.ac.uk> In-Reply-To: <47305327.7050205@cam.ac.uk> MIME-Version: 1.0 Content-Disposition: inline Date: Tue, 6 Nov 2007 16:03:52 +0300 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Message-Id: <200711061503.52706.achill@matrix.gatewaynet.com> Subject: Re: Implementing a "normally open" relay X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 13:04:15 -0000 =D3=F4=E9=F2 =D4=F1=DF=F4=E7 06 =CD=EF=DD=EC=E2=F1=E9=EF=F2 2007 13:42, =E3= =F1=DC=F8=E1=F4=E5: > Achilleas Mantzios wrote: > > Hi, > > i am building a home security system based on zoneminder under FreeBSD > > 6.2. I think i have it all sorted out, except a way to drive an external > > alarm upon camera motion. > > > > > > > > Have two states: > > > > a) (normal) Have the two wires isolated from eachother, ground, voltage > > b) (alarm) Connect the wires together (shortcircuiting the EOL). > > > > Could it be done someway with /dev/cuad* /dev/lpt* > > Probably overkill, but you can buy general purpose relay boards driven > from the parallel port, e.g., > > http://www.electronic-kits-and-projects.com/3074.htm Thank you Chris, thats probably a good solution for commercial/industrial applications. Bill (WKK) gave me an excellent idea about using a modem, and it works very good. > > Chris =2D-=20 Achilleas Mantzios From owner-freebsd-hardware@FreeBSD.ORG Tue Nov 6 19:58:56 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9619A16A41A; Tue, 6 Nov 2007 19:58:56 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from av-tac-rtp.cisco.com (hen.cisco.com [64.102.19.198]) by mx1.freebsd.org (Postfix) with ESMTP id 3545B13C49D; Tue, 6 Nov 2007 19:58:56 +0000 (UTC) (envelope-from marcus@FreeBSD.org) X-TACSUNS: Virus Scanned Received: from rooster.cisco.com (localhost [127.0.0.1]) by av-tac-rtp.cisco.com (8.11.7p3+Sun/8.11.7) with ESMTP id lA6JZbJ26742; Tue, 6 Nov 2007 14:35:37 -0500 (EST) Received: from [64.102.220.97] (dhcp-64-102-220-97.cisco.com [64.102.220.97]) by rooster.cisco.com (8.11.7p3+Sun/8.11.7) with ESMTP id lA6JZt626419; Tue, 6 Nov 2007 14:35:55 -0500 (EST) Message-ID: <4730C209.3070703@FreeBSD.org> Date: Tue, 06 Nov 2007 14:35:37 -0500 From: Joe Marcus Clarke Organization: FreeBSD, Inc. User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> In-Reply-To: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 19:58:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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). > > Also, please test if there are any USB problems. > > Note: this is still a hack. I'm still thinking about a way to correctly > identify on which systems we need to apply this fix. I can confirm on my MacBook Pro Core Duo 15", that this patch does fix the second CPU init problem (no more key presses), and kern.hz=1000 works as expected (CPU @ 2.0 GHz). Thanks! Joe - -- Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHMMIIb2iPiv4Uz4cRAlqPAKCZkhhP5QgOHT7N0f1QeTwGMIau1wCgpeDi YysjxnhelxMxC1C2GQtIoik= =fk/Q -----END PGP SIGNATURE----- From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 15:30:36 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50F3116A41B for ; Wed, 7 Nov 2007 15:30:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.freebsd.org (Postfix) with ESMTP id A8C4C13C4BA for ; Wed, 7 Nov 2007 15:30:35 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1768034nfb for ; Wed, 07 Nov 2007 07:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=9vxS6o4N9rJvksxVxpa0oytQmiFaAmzQp7xxp+EghN8=; b=gxqvvkdzMRQOOtd8egnRELdKs6NhU/2xW6gtRrScbxwRlva3lr22SN4AGU7bfRx7Ezq7wn3RkSMKPATHkFKLglmtdDvwpiqpOau7rK4rZFXsy/USycJoUMW2LFyjN4jr8lUZCWVFAYO4nbef6gHtmsQNyYdmZzoGY4yyPnxK4dc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=gTO62O/KzA697fIitVerY/kAOrEs+QCBfsHMj/svqhTegoYJzJSJbYIgn9eyya+z4aLgLXD5WmoZJxdFVZjsRu+qUW7n0Zuo8MQfgV+A/US0M1P4D0PfzaBnumtJgAE4raqBe09gTjSoAw1ryYqKyDwCxT8vV8uK+Hna8d+h/qs= Received: by 10.86.95.20 with SMTP id s20mr5318157fgb.1194449424077; Wed, 07 Nov 2007 07:30:24 -0800 (PST) Received: from ?172.17.0.111? ( [193.136.24.128]) by mx.google.com with ESMTPS id d4sm836544fga.2007.11.07.07.30.10 (version=SSLv3 cipher=OTHER); Wed, 07 Nov 2007 07:30:11 -0800 (PST) Message-Id: From: Rui Paulo To: Scott Long , Rink Springer , freebsd-hardware@freebsd.org, freebsd-current@freebsd.org, freebsd-i386@FreeBSD.org In-Reply-To: <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Date: Wed, 7 Nov 2007 15:30:08 +0000 References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> X-Mailer: Apple Mail (2.912) Sender: Rui Paulo Cc: Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 15:30:36 -0000 I'm requesting review for the following patch: Index: sys/i386/isa/clock.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v retrieving revision 1.240 diff -u -p -r1.240 clock.c --- sys/i386/isa/clock.c 26 Oct 2007 03:23:54 -0000 1.240 +++ sys/i386/isa/clock.c 7 Nov 2007 15:27:21 -0000 @@ -130,6 +130,9 @@ static u_char rtc_statusb = RTCSB_24HR; #define ACQUIRED 2 #define ACQUIRE_PENDING 3 +/* Intel ICH register */ +#define ICH_PMBASE 0x400 + static u_char timer2_state; static unsigned i8254_get_timecount(struct timecounter *tc); @@ -616,11 +619,26 @@ i8254_init(void) void startrtclock() { + char *ichenv; u_int delta, freq; writertc(RTC_STATUSA, rtc_statusa); writertc(RTC_STATUSB, RTCSB_24HR); + /* + * On some systems, namely MacBooks, we need to disallow the + * legacy USB circuit to generate an SMI# because this can + * cause several problems, namely: incorrect CPU frequency + * detection and failure to start the APs. + */ + ichenv = getenv("hw.ich.disable_legacy_usb"); + if (ichenv != NULL) { + if (bootverbose) + printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n"); + outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8); + freeenv(ichsmi); + } + freq = calibrate_clocks(); #ifdef CLK_CALIBRATION_LOOP if (bootverbose) { If you have a MacBook, you now need to set hw.ich.disable_legacy_usb on the boot loader prompt or in loader.conf. I decided to go this route because it seems safer. Imagine the case where there's a port at the same IO address that has nothing to do with the ICH7. If we tried to issue the outl() on every system, something bad could happen. Comments? Regards. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 16:34:05 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDF8216A418 for ; Wed, 7 Nov 2007 16:34:05 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7992813C48E for ; Wed, 7 Nov 2007 16:34:05 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1779754nfb for ; Wed, 07 Nov 2007 08:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=hu0f7Uxm3HduaZ/9OSdOEMP+azwSKK+X40Iloux2geE=; b=JcZ22Yue4iDNfDSSCB9vQEaP3L5yWXQN6mcAzcVKrRNwBe4+2KRIJ30pUatN49c868Y4iBL8jLgojlCdzKf99u+DOqJXFqsA4LLQZjUJcLK3DUm1tfR1S6sM200IaWs4adHgtJ95JlKr0N4McDfnNgxu+4RsjgeNYHOhcDIFI3M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=IZL4ZyeZGewoG7kMOMNsdVwXAFmxDQ9beuJ1S0BINkB27qSOlmkuW0aDA4ysW4N0kWaiC82H9pfeOjI0vGsh//8FW2SB8fG+W7eeQkhTuJcGecjoEZ1hntOw0vufpeWl3oi7O35h5OVe/pys2V5fJPEtOfL6b/Z/tAabmNDGoyg= Received: by 10.86.60.7 with SMTP id i7mr5356411fga.1194451643622; Wed, 07 Nov 2007 08:07:23 -0800 (PST) Received: by 10.86.90.4 with HTTP; Wed, 7 Nov 2007 08:07:23 -0800 (PST) Message-ID: <3bbf2fe10711070807h7e7fb5b8t220ad73dcdcad0c9@mail.gmail.com> Date: Wed, 7 Nov 2007 17:07:23 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Rui Paulo" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> X-Google-Sender-Auth: ada5bcec31041fd8 Cc: Scott Long , Rink Springer , freebsd-i386@freebsd.org, freebsd-current@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 16:34:06 -0000 2007/11/7, Rui Paulo : > > > If you have a MacBook, you now need to set hw.ich.disable_legacy_usb > on the boot loader prompt or in loader.conf. I decided to go this > route because it seems safer. Imagine the case where there's a port at > the same IO address that has nothing to do with the ICH7. If we tried > to issue the outl() on every system, something bad could happen. I would prefer to let it autotune by the system, if possible, in this situation. Great work, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 17:34:28 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D77D216A46D; Wed, 7 Nov 2007 17:34:28 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 68ED213C4C5; Wed, 7 Nov 2007 17:34:28 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lA7HYE8Y069812; Wed, 7 Nov 2007 10:34:15 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4731F712.5000601@samsco.org> Date: Wed, 07 Nov 2007 10:34:10 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 07 Nov 2007 10:34:15 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@FreeBSD.org, Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 17:34:28 -0000 We can probably do a hack early on to see the PCI ID of the chipset. If that's possible, then it can be turned on by default for that case. The problem with tunbles like this is that they are inherently obscure, especially for new users that are most likely to need them. Scott Rui Paulo wrote: > I'm requesting review for the following patch: > > Index: sys/i386/isa/clock.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v > retrieving revision 1.240 > diff -u -p -r1.240 clock.c > --- sys/i386/isa/clock.c 26 Oct 2007 03:23:54 -0000 1.240 > +++ sys/i386/isa/clock.c 7 Nov 2007 15:27:21 -0000 > @@ -130,6 +130,9 @@ static u_char rtc_statusb = RTCSB_24HR; > #define ACQUIRED 2 > #define ACQUIRE_PENDING 3 > > +/* Intel ICH register */ > +#define ICH_PMBASE 0x400 > + > static u_char timer2_state; > > static unsigned i8254_get_timecount(struct timecounter *tc); > @@ -616,11 +619,26 @@ i8254_init(void) > void > startrtclock() > { > + char *ichenv; > u_int delta, freq; > > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); > > + /* > + * On some systems, namely MacBooks, we need to disallow the > + * legacy USB circuit to generate an SMI# because this can > + * cause several problems, namely: incorrect CPU frequency > + * detection and failure to start the APs. > + */ > + ichenv = getenv("hw.ich.disable_legacy_usb"); > + if (ichenv != NULL) { > + if (bootverbose) > + printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n"); > + outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8); > + freeenv(ichsmi); > + } > + > freq = calibrate_clocks(); > #ifdef CLK_CALIBRATION_LOOP > if (bootverbose) { > > > If you have a MacBook, you now need to set hw.ich.disable_legacy_usb on > the boot loader prompt or in loader.conf. I decided to go this route > because it seems safer. Imagine the case where there's a port at the > same IO address that has nothing to do with the ICH7. If we tried to > issue the outl() on every system, something bad could happen. > > Comments? > > Regards. > -- > Rui Paulo > From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 18:39:00 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6CC216A418 for ; Wed, 7 Nov 2007 18:39:00 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 97F8613C49D for ; Wed, 7 Nov 2007 18:39:00 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so4785843pyb for ; Wed, 07 Nov 2007 10:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=UL7547PeGjeUwS8gu7c3SsBKtLJnyjDvDvG/IHNlYjs=; b=kHDqb+Ctwi/9A+OCj2ipFePM3fBz9HwhHOb5xQJGIfLbqk3Tqf4wjgkB5cSywrgtxsPhtTquVJYmY9Ap81GmpiTMOdhGogmLelT9p1qfMLdPT65Y/u2CRab4jWCmtqN3gi4SjdQy7LkjjoEHSPjDSjJfGaBaRR6oByQ897NBjVM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=W6pEU9Oiv1iUKgqERskDP8rJcyCKTntDx49y/cDQ20NFIcY8eTI12W1aA+Xuzw9sp3zPh9v9meHQQAgwCzhZd5xIX0cPXMuWI2AIDcqiS+JT5SEgfnfwgy0IbWM7vTRBQ/TQl30SZBlkO06KvRsJY3xtAK1Tpr/whWdXSM259Q0= Received: by 10.35.86.12 with SMTP id o12mr9204659pyl.1194460310005; Wed, 07 Nov 2007 10:31:50 -0800 (PST) Received: by 10.35.76.2 with HTTP; Wed, 7 Nov 2007 10:31:49 -0800 (PST) Message-ID: Date: Wed, 7 Nov 2007 18:31:49 +0000 From: "Rui Paulo" Sender: rpaulo@gmail.com To: "Scott Long" In-Reply-To: <4731F712.5000601@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4731F712.5000601@samsco.org> X-Google-Sender-Auth: 7c4b8f95959cb311 Cc: Rink Springer , freebsd-i386@freebsd.org, freebsd-current@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 18:39:01 -0000 On Nov 7, 2007 5:34 PM, Scott Long wrote: > We can probably do a hack early on to see the PCI ID of the chipset. > If that's possible, then it can be turned on by default for that case. > The problem with tunbles like this is that they are inherently obscure, > especially for new users that are most likely to need them. Hmm. Well, I don't know about other systems requiring this fix. So, for something more simple I could check the smbios.system.product environment variable and turn the bit off on the MacBooks. I don't feel like this problem is specific to the ICH7 chipset. It seems more like a problem only specific to the MacBooks. What do you think? -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 20:08:21 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 913ED16A47D; Wed, 7 Nov 2007 20:08:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.freebsd.org (Postfix) with ESMTP id 8516B13C4B3; Wed, 7 Nov 2007 20:08:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.3] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id lA7JrkKm054968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Nov 2007 11:53:47 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4732171F.3010803@FreeBSD.org> Date: Wed, 07 Nov 2007 11:50:55 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Scott Long , Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 20:08:21 -0000 I don't really like the fact that it has to be turned on manually. Is it possible to make this automatic based on BIOS Id or something like this? -Maxim Rui Paulo wrote: > I'm requesting review for the following patch: > > Index: sys/i386/isa/clock.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v > retrieving revision 1.240 > diff -u -p -r1.240 clock.c > --- sys/i386/isa/clock.c 26 Oct 2007 03:23:54 -0000 1.240 > +++ sys/i386/isa/clock.c 7 Nov 2007 15:27:21 -0000 > @@ -130,6 +130,9 @@ static u_char rtc_statusb = RTCSB_24HR; > #define ACQUIRED 2 > #define ACQUIRE_PENDING 3 > > +/* Intel ICH register */ > +#define ICH_PMBASE 0x400 > + > static u_char timer2_state; > > static unsigned i8254_get_timecount(struct timecounter *tc); > @@ -616,11 +619,26 @@ i8254_init(void) > void > startrtclock() > { > + char *ichenv; > u_int delta, freq; > > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); > > + /* > + * On some systems, namely MacBooks, we need to disallow the > + * legacy USB circuit to generate an SMI# because this can > + * cause several problems, namely: incorrect CPU frequency > + * detection and failure to start the APs. > + */ > + ichenv = getenv("hw.ich.disable_legacy_usb"); > + if (ichenv != NULL) { > + if (bootverbose) > + printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n"); > + outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8); > + freeenv(ichsmi); > + } > + > freq = calibrate_clocks(); > #ifdef CLK_CALIBRATION_LOOP > if (bootverbose) { > > > If you have a MacBook, you now need to set hw.ich.disable_legacy_usb on > the boot loader prompt or in loader.conf. I decided to go this route > because it seems safer. Imagine the case where there's a port at the > same IO address that has nothing to do with the ICH7. If we tried to > issue the outl() on every system, something bad could happen. > > Comments? > > Regards. > -- > Rui Paulo > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 21:14:04 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C85516A418 for ; Wed, 7 Nov 2007 21:14:04 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id B0AE013C4BE for ; Wed, 7 Nov 2007 21:14:03 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so4877593pyb for ; Wed, 07 Nov 2007 13:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=f5CSuT49nicdp5sfXvjgdbXAGxzrZ7iHPA+UNCTbPbU=; b=SxIrvw+iBXRGD45cBf3frrjH9zmRDN1kU01o9NqDDANdXNpm3036sfU61LnuAsNbDnqeo4/BNhWJkXf73DNbjnskogNNHd9wSAvmzsyVrDulMmruaMMGDqeJOE45Yg5RYBMMWGgaqJVFnNZ280+j3giReFmUSUhhI+wUV7lM6nA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=uJ5XxZpt1fdzzhM/hhzLv4heCr+3aO2b+eR57jaz5ub2NyYVVJWD85l9CS+TEx/ZJ3LNUz8J4WUFS5scyhX2lCivUcrx4zbflkj9nO/78lH/6vOtvzZc05VdFgkAxFOMnoFpjj//VdYbXkMSarwk22V6CWOHGXtEry5+ES4iy/4= Received: by 10.35.128.1 with SMTP id f1mr9343486pyn.1194470029333; Wed, 07 Nov 2007 13:13:49 -0800 (PST) Received: by 10.35.76.2 with HTTP; Wed, 7 Nov 2007 13:13:49 -0800 (PST) Message-ID: Date: Wed, 7 Nov 2007 21:13:49 +0000 From: "Rui Paulo" Sender: rpaulo@gmail.com To: "Maxim Sobolev" In-Reply-To: <4732171F.3010803@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4732171F.3010803@FreeBSD.org> X-Google-Sender-Auth: 70bce21d82e51378 Cc: Scott Long , Rink Springer , freebsd-i386@freebsd.org, freebsd-current@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 21:14:04 -0000 On Nov 7, 2007 7:50 PM, Maxim Sobolev wrote: > I don't really like the fact that it has to be turned on manually. Is it > possible to make this automatic based on BIOS Id or something like this? Yes, I can turn this on for MacBooks. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 21:23:16 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D815C16A420; Wed, 7 Nov 2007 21:23:16 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 82BF413C4B2; Wed, 7 Nov 2007 21:23:16 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id lA7LCCA4041693; Wed, 7 Nov 2007 15:12:12 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1194469932; bh=lk1ecjYPQKXhaQbliufls+MLKKgFqiioqdQ5aIO YVek=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=itE+zmJF rlp67O3xNm+yb5qgFBwW92pRlkSIDR3cMH9l5RpXzwL9KtfgvoaNnIbZ8zD/oLgTfmV gPjoCo1Qd24OqCrxZ1Z/NtffUIK2XmwdVhnjH3NyjVWK60FVAKzOKnwouMePl18m5xI 7bjyyrXeB8DSw3KvLcEAP+ZQQYQ/s= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id lA7LCCJi041692; Wed, 7 Nov 2007 15:12:12 -0600 (CST) (envelope-from tinguely) Date: Wed, 7 Nov 2007 15:12:12 -0600 (CST) From: Mark Tinguely Message-Id: <200711072112.lA7LCCJi041692@casselton.net> To: rpaulo@freebsd.org, sobomax@freebsd.org In-Reply-To: <4732171F.3010803@FreeBSD.org> Cc: rink@freebsd.org, freebsd-current@freebsd.org, freebsd-i386@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 21:23:17 -0000 > I don't really like the fact that it has to be turned on manually. Is it > possible to make this automatic based on BIOS Id or something like this? > > -Maxim (Thread summary because of text removal - "On some systems, namely MacBooks we need to disallow the legacy USB circuit to generate an SMI# because this can cause several problems, namely: incorrect CPU frequency detection and failure to start the APs." - taken from patch explaination). This sounds like a great compiler option / C code definition. It can be compiled into kernel and left as the default if you need it. It should not go into GENERIC. --Mark Tinguely. From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 21:48:39 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FA6D16A46E; Wed, 7 Nov 2007 21:48:39 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id D762D13C4B2; Wed, 7 Nov 2007 21:48:38 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lA7LmSk1071007; Wed, 7 Nov 2007 14:48:28 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <473232A8.3080105@samsco.org> Date: Wed, 07 Nov 2007 14:48:24 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4732171F.3010803@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 07 Nov 2007 14:48:28 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@FreeBSD.org, Maxim Sobolev , Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 21:48:39 -0000 Rui Paulo wrote: > On Nov 7, 2007 7:50 PM, Maxim Sobolev wrote: >> I don't really like the fact that it has to be turned on manually. Is it >> possible to make this automatic based on BIOS Id or something like this? > > Yes, I can turn this on for MacBooks. > Yeah, at least have it on by default for the systems that we know have the problem. I still think that it needs wider application, but as long as the immediate and identifiable issue is addressed, I'm happy. Scott From owner-freebsd-hardware@FreeBSD.ORG Wed Nov 7 21:56:15 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A78E16A46C for ; Wed, 7 Nov 2007 21:56:15 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.freebsd.org (Postfix) with ESMTP id 0FDA813C494 for ; Wed, 7 Nov 2007 21:56:14 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so4904107pyb for ; Wed, 07 Nov 2007 13:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=uEXqwHvUYthFkbXzuLvlHNDKQoF7rWXKPe5QUcm5N78=; b=fxUt7shYzF9iPpcWm+Mz8iXMotWt2u0JgDFqP/Oiv9/qCq3MKxm+YP+Q9MRDUc4P91nkBfZ+ibyIS1pI1ZMSL/ymQoZMr+OZgz/j9dF4iaetB5CoD763a8J/cwLcCihtLYl7yrHWDPgwU5ibf4/13G/Fyk1hJypbVOY9SubKCK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Pn34J2JZECEjTkgS4iDJqRQ2zH8EMCtpZWkR77jAyH41KucF1PHygKgX4EfUqp/ySrpbXnEyYzJAbMvkMlrMYVvQVbb0DZz7VJMgPqYdg9UBMr/hBz0I5YtEvv9tDCzr5jGJMMGYkvvuAXWahdfWlK7lRV0NVTF4XMrGRy7gE1o= Received: by 10.35.91.1 with SMTP id t1mr9433409pyl.1194472170013; Wed, 07 Nov 2007 13:49:30 -0800 (PST) Received: by 10.35.76.2 with HTTP; Wed, 7 Nov 2007 13:49:29 -0800 (PST) Message-ID: Date: Wed, 7 Nov 2007 21:49:29 +0000 From: "Rui Paulo" Sender: rpaulo@gmail.com To: "Mark Tinguely" In-Reply-To: <200711072112.lA7LCCJi041692@casselton.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4732171F.3010803@FreeBSD.org> <200711072112.lA7LCCJi041692@casselton.net> X-Google-Sender-Auth: 24f54e845ec97883 Cc: rink@freebsd.org, sobomax@freebsd.org, freebsd-current@freebsd.org, freebsd-i386@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 21:56:15 -0000 On Nov 7, 2007 9:12 PM, Mark Tinguely wrote: > > > I don't really like the fact that it has to be turned on manually. Is it > > possible to make this automatic based on BIOS Id or something like this? > > > > -Maxim > > (Thread summary because of text removal - "On some systems, namely MacBooks > we need to disallow the legacy USB circuit to generate an SMI# because this > can cause several problems, namely: incorrect CPU frequency detection and > failure to start the APs." - taken from patch explaination). > > This sounds like a great compiler option / C code definition. It can be > compiled into kernel and left as the default if you need it. It should > not go into GENERIC. No, I don't like that because it makes us look very bad if you can't install FreeBSD on a MacBook because the kernel hangs very early on boot. Regards. -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Fri Nov 9 11:41:08 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E5716A417 for ; Fri, 9 Nov 2007 11:41:08 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id 633FD13C4B7 for ; Fri, 9 Nov 2007 11:41:08 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so380559nfb for ; Fri, 09 Nov 2007 03:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=1Mwcp5JNIBhySItAUpV18JEahQZJClmIl3x6Jln9+5w=; b=XYo0jFUWeGd8n13Hej/rxyq6LgFtThF8kKBkwSkYqhCS0F5OZygs6TN0JaaM6pkBktusOTect+LBVhKTOc2f24kEAJBbcLiF1hndnJHu+R6MhYI2OWS4k2CwLeD1UJMjcNNjS4D/04nDc/j/g7pb2WCZgbw9IVe0il9oBHCgFnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=J7YzjSbkekAYATbmzYClsWnZTGV3pmKaJwRlP7ODnKlH2uJtUs6hiSzkOFiysaccot6M6TVg1FOh59juXVCLMJwwdKmjbhq6hy8zEQK/46ak8Bx3jN44WOgVya8m/Od/N/iTi80eR5C8e11oUEAwDelhgcMPer1IdwB7NF+Byf0= Received: by 10.78.132.2 with SMTP id f2mr2240814hud.1194608460305; Fri, 09 Nov 2007 03:41:00 -0800 (PST) Received: from ?172.17.2.171? ( [193.136.24.128]) by mx.google.com with ESMTPS id g8sm4027472muf.2007.11.09.03.40.51 (version=SSLv3 cipher=OTHER); Fri, 09 Nov 2007 03:40:54 -0800 (PST) Message-Id: <5A4AF64C-D70A-4303-8116-D13718EE8BCC@FreeBSD.org> From: Rui Paulo To: Scott Long In-Reply-To: <473232A8.3080105@samsco.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Date: Fri, 9 Nov 2007 11:40:48 +0000 References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4732171F.3010803@FreeBSD.org> <473232A8.3080105@samsco.org> X-Mailer: Apple Mail (2.912) Sender: Rui Paulo Cc: freebsd-current@FreeBSD.org, Maxim Sobolev , Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 11:41:09 -0000 On 7 Nov 2007, at 21:48, Scott Long wrote: > Rui Paulo wrote: >> On Nov 7, 2007 7:50 PM, Maxim Sobolev wrote: >>> I don't really like the fact that it has to be turned on manually. >>> Is it >>> possible to make this automatic based on BIOS Id or something like >>> this? >> Yes, I can turn this on for MacBooks. > > Yeah, at least have it on by default for the systems that we know have > the problem. I still think that it needs wider application, but as > long > as the immediate and identifiable issue is addressed, I'm happy. Ok, if there are no objections, I plan to request approval from my mentor and from re@ for the following patch: Index: clock.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v retrieving revision 1.240 diff -u -p -r1.240 clock.c --- clock.c 26 Oct 2007 03:23:54 -0000 1.240 +++ clock.c 9 Nov 2007 11:34:56 -0000 @@ -130,6 +130,9 @@ static u_char rtc_statusb = RTCSB_24HR; #define ACQUIRED 2 #define ACQUIRE_PENDING 3 +/* Intel ICH register */ +#define ICH_PMBASE 0x400 + static u_char timer2_state; static unsigned i8254_get_timecount(struct timecounter *tc); @@ -616,11 +619,31 @@ i8254_init(void) void startrtclock() { + char *ichenv, *sysenv; u_int delta, freq; writertc(RTC_STATUSA, rtc_statusa); writertc(RTC_STATUSB, RTCSB_24HR); + /* + * On some systems, namely MacBooks, we need to disallow the + * legacy USB circuit to generate an SMI# because this can + * cause several problems, namely: incorrect CPU frequency + * detection and failure to start the APs. + */ + ichenv = getenv("hw.ich.disable_legacy_usb"); + sysenv = getenv("smbios.system.product"); + if ((ichenv != NULL) || (sysenv != NULL && + strncmp(sysenv, "MacBook", 7) == 0)) { + if (bootverbose) + printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n"); + outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8); + if (ichenv) + freeenv(ichenv); + if (sysenv) + freeenv(sysenv); + } + freq = calibrate_clocks(); #ifdef CLK_CALIBRATION_LOOP if (bootverbose) { -- Rui Paulo From owner-freebsd-hardware@FreeBSD.ORG Fri Nov 9 15:04:10 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E1116A418; Fri, 9 Nov 2007 15:04:10 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 5B41D13C4B5; Fri, 9 Nov 2007 15:04:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lA9F3qhc082314; Fri, 9 Nov 2007 08:03:52 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <473476D7.1020609@samsco.org> Date: Fri, 09 Nov 2007 08:03:51 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4732171F.3010803@FreeBSD.org> <473232A8.3080105@samsco.org> <5A4AF64C-D70A-4303-8116-D13718EE8BCC@FreeBSD.org> In-Reply-To: <5A4AF64C-D70A-4303-8116-D13718EE8BCC@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Fri, 09 Nov 2007 08:03:52 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@FreeBSD.org, Maxim Sobolev , Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 15:04:10 -0000 Rui Paulo wrote: > On 7 Nov 2007, at 21:48, Scott Long wrote: > >> Rui Paulo wrote: >>> On Nov 7, 2007 7:50 PM, Maxim Sobolev wrote: >>>> I don't really like the fact that it has to be turned on manually. >>>> Is it >>>> possible to make this automatic based on BIOS Id or something like >>>> this? >>> Yes, I can turn this on for MacBooks. >> >> Yeah, at least have it on by default for the systems that we know have >> the problem. I still think that it needs wider application, but as long >> as the immediate and identifiable issue is addressed, I'm happy. > > > Ok, if there are no objections, I plan to request approval from my > mentor and from re@ for the following patch: > Looks really good, thanks for working on this. Scott From owner-freebsd-hardware@FreeBSD.ORG Fri Nov 9 21:58:03 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0EC16A46C for ; Fri, 9 Nov 2007 21:58:03 +0000 (UTC) (envelope-from mystifs@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.freebsd.org (Postfix) with ESMTP id 495AE13C4C1 for ; Fri, 9 Nov 2007 21:58:03 +0000 (UTC) (envelope-from mystifs@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so552136nfb for ; Fri, 09 Nov 2007 13:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=4toOY4ksYhAGJdn1Npp+7Q6RmesrszeeDnLkpeo1I+c=; b=ONZdTj5Lo3j3M6mQDAFjWL4Rt555noEyrFADHwK7CT+S8AwFgG/czHSbyz6kl4pVlFfkXGZi0v9/0mnDbxAA6brm6nWSov/Ou+dbjdLY3B+rqvJoTpLfH6rIvOW7LODsNTZ0Gu6vZzKfhii045JldsU65VLmVhbn3Nfy8cFz04c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=IpsXmQg+LDHNyhXpFyOLHiIXK1fPYcI8OO2mBrRUQvpIEak4rISk+bYGkNxobQFCnPSz1DYpTLPXOpKeSd0dAAVQnTvG5tkTtps0DnFT0ou9z0f1DAUkCuYeCr1yUNdfu99D0zpLPrRHrKKE88xKOfP3N2ZenEWwyfI4kWDkroI= Received: by 10.67.100.5 with SMTP id c5mr113184ugm.1194643980132; Fri, 09 Nov 2007 13:33:00 -0800 (PST) Received: from ?192.168.1.5? ( [81.251.39.231]) by mx.google.com with ESMTPS id j9sm5276055mue.2007.11.09.13.32.57 (version=SSLv3 cipher=RC4-MD5); Fri, 09 Nov 2007 13:32:58 -0800 (PST) From: Jean-Christophe To: freebsd-hardware Content-Type: text/plain Date: Fri, 09 Nov 2007 22:32:36 +0100 Message-Id: <1194643957.910.26.camel@Asus> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Subject: FreeBSD 6.2 configuration PRO/Wireless 2200BG X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 21:58:03 -0000 Hi, I try to set my wifi up on my laptop (Asus W6A). My AP is a livebox inventel (software version v5.10.7-fr). I use WPA encryption and i don't find the DHCP proprieter for the wireless. I try to connect with WPA security and without security but whaterver configuration i have in my ifconfig : "status: no carrier" this is my last config file : $ uname -a FreeBSD Asus 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 $pciconf -lv ... iwi0@pci1:5:0: class=0x028000 card=0x27018086 chip=0x42208086 rev=0x05 hdr=0x00 vendor = 'Intel Corporation' device = 'PRO/Wireless 2200BG Network Connection' class = network $ cat /boot/loader.conf # Charge le pilote comme module au boot time. legal.intel_iwi.license_ack=1 if_iwi_load="YES" wlan_load="YES" firmware_load="YES" # Dans les deux cas, meme avec compilation dans le noyau: # firmware modules: iwi_bss_load="YES" iwi_ibss_load="YES" iwi_monitor_load="YES" # Chargement de module pour le cryptage WPA #wlan_wep_load="YES" #wlan_ccmp_load="YES" #wlan_tkip_load="YES" rc.conf : #configuration pour la carte wifi ifconfig_iwi0="DHCP WPA" Asus# cat /etc/wpa_supplicant.conf #My wpa_supplicant.conf: # Systeme d'autentification par clef WPA network={ ssid="Livebox-3D40" psk="XXXXXXXXXXXXXX" } Asus# kldstat Id Refs Address Size Name 1 22 0xc0400000 6f6544 kernel 2 1 0xc0af7000 e1a8 if_iwi.ko 3 5 0xc0b06000 2d60 firmware.ko 4 1 0xc0b09000 300fc iwi_bss.ko 5 1 0xc0b3a000 2f0b8 iwi_ibss.ko 6 1 0xc0b6a000 2f44c iwi_monitor.ko 7 1 0xc0b9a000 59f20 acpi.ko 8 1 0xc35e8000 2a000 ipl.ko 9 1 0xc3800000 16000 linux.ko 10 1 0xc389c000 4000 logo_saver.ko 11 1 0xc38d6000 5000 i915.ko 12 1 0xc38eb000 e000 drm.ko ifconfig : iwi0: flags=8843 mtu 1500 inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 ether 00:13:ce:06:19:6e media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel 12 authmode WPA privacy ON deftxkey UNDEF txpowmax 100 bmiss 10 protmode CTS roaming MANUAL bintval 100 Thank for your help Best Regards jean-christophe. From owner-freebsd-hardware@FreeBSD.ORG Sat Nov 10 00:46:26 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6067816A418; Sat, 10 Nov 2007 00:46:26 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5FB13C48D; Sat, 10 Nov 2007 00:46:25 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.3] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id lAA0kHRH025692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Nov 2007 16:46:18 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4734FEAB.2070400@FreeBSD.org> Date: Fri, 09 Nov 2007 16:43:23 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Rui Paulo References: <4A5A9C78-22AC-4480-BDEB-A72F6CF472DB@fnop.net> <20071104231422.GA82337@rink.nu> <472F5E62.4080406@samsco.org> <60C64C73-A019-4C01-85E1-80DF4C76B1AF@freebsd.org> <4732171F.3010803@FreeBSD.org> <473232A8.3080105@samsco.org> <5A4AF64C-D70A-4303-8116-D13718EE8BCC@FreeBSD.org> In-Reply-To: <5A4AF64C-D70A-4303-8116-D13718EE8BCC@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Scott Long , Rink Springer , freebsd-i386@FreeBSD.org, freebsd-hardware@FreeBSD.org Subject: Re: MacBook users: possible fix for the SMP problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2007 00:46:26 -0000 I don't have the original 1st gen MacBook to test this on anymore, but it looks good. Please make sure it gets both into 6.3 and 7.0 releases. Thanks! -Maxim Rui Paulo wrote: > On 7 Nov 2007, at 21:48, Scott Long wrote: > >> Rui Paulo wrote: >>> On Nov 7, 2007 7:50 PM, Maxim Sobolev wrote: >>>> I don't really like the fact that it has to be turned on manually. >>>> Is it >>>> possible to make this automatic based on BIOS Id or something like >>>> this? >>> Yes, I can turn this on for MacBooks. >> >> Yeah, at least have it on by default for the systems that we know have >> the problem. I still think that it needs wider application, but as long >> as the immediate and identifiable issue is addressed, I'm happy. > > > Ok, if there are no objections, I plan to request approval from my > mentor and from re@ for the following patch: > > Index: clock.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v > retrieving revision 1.240 > diff -u -p -r1.240 clock.c > --- clock.c 26 Oct 2007 03:23:54 -0000 1.240 > +++ clock.c 9 Nov 2007 11:34:56 -0000 > @@ -130,6 +130,9 @@ static u_char rtc_statusb = RTCSB_24HR; > #define ACQUIRED 2 > #define ACQUIRE_PENDING 3 > > +/* Intel ICH register */ > +#define ICH_PMBASE 0x400 > + > static u_char timer2_state; > > static unsigned i8254_get_timecount(struct timecounter *tc); > @@ -616,11 +619,31 @@ i8254_init(void) > void > startrtclock() > { > + char *ichenv, *sysenv; > u_int delta, freq; > > writertc(RTC_STATUSA, rtc_statusa); > writertc(RTC_STATUSB, RTCSB_24HR); > > + /* > + * On some systems, namely MacBooks, we need to disallow the > + * legacy USB circuit to generate an SMI# because this can > + * cause several problems, namely: incorrect CPU frequency > + * detection and failure to start the APs. > + */ > + ichenv = getenv("hw.ich.disable_legacy_usb"); > + sysenv = getenv("smbios.system.product"); > + if ((ichenv != NULL) || (sysenv != NULL && > + strncmp(sysenv, "MacBook", 7) == 0)) { > + if (bootverbose) > + printf("Disabling LEGACY_USB_EN bit on Intel ICH.\n"); > + outl(ICH_PMBASE + 0x30, inl(ICH_PMBASE + 0x30) & ~0x8); > + if (ichenv) > + freeenv(ichenv); > + if (sysenv) > + freeenv(sysenv); > + } > + > freq = calibrate_clocks(); > #ifdef CLK_CALIBRATION_LOOP > if (bootverbose) { > > > -- > Rui Paulo >