From owner-cvs-src@FreeBSD.ORG Fri Dec 16 22:02:18 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D85416A41F; Fri, 16 Dec 2005 22:02:18 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from centrmmtao02.cox.net (centrmmtao02.cox.net [70.168.83.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 828C743D5E; Fri, 16 Dec 2005 22:02:16 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from mezz.mezzweb.com ([68.103.32.140]) by centrmmtao02.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051216220208.PLER8484.centrmmtao02.cox.net@mezz.mezzweb.com>; Fri, 16 Dec 2005 17:02:08 -0500 Date: Fri, 16 Dec 2005 16:03:00 -0600 To: "Ruslan Ermilov" References: <200512161503.jBGF3GZb075045@repoman.freebsd.org> <200512161039.57740.jhb@freebsd.org> <20051216160946.GF41326@ip.net.ua> <20051216214540.GI41326@ip.net.ua> From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <20051216214540.GI41326@ip.net.ua> User-Agent: Opera M2/8.51 (Linux, build 1462) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, John Baldwin , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/pci amdpm.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 22:02:18 -0000 On Fri, 16 Dec 2005 15:45:40 -0600, Ruslan Ermilov wrote: > On Fri, Dec 16, 2005 at 03:18:22PM -0600, Jeremy Messenger wrote: >> On Fri, 16 Dec 2005 10:09:46 -0600, Ruslan Ermilov >> wrote: >> >> >On Fri, Dec 16, 2005 at 10:39:56AM -0500, John Baldwin wrote: >> >>On Friday 16 December 2005 10:03 am, Ruslan Ermilov wrote: >> >>> ru 2005-12-16 15:03:16 UTC >> >>> >> >>> FreeBSD src repository >> >>> >> >>> Modified files: >> >>> sys/pci amdpm.c >> >>> Log: >> >>> Fix PCI ID of the AMD-8111 System Management controller so it >> >>matches >> >>> SMBus 1.0 and not SMBus 2.0. >> >>> >> >>> AMD-8111 hub (datasheet is publically available) implements both >> >>SMBus >> >>> 2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the >> >>System >> >>> Management Controller device with the base I/O address is >> accessible >> >>> through the CSR 0x58). This driver only supports AMD-756 SMBus >> 1.0 >> >>> compatible devices. >> >>> >> >>> With the patched sysutils/xmbmon port (to also fix PCI ID and to >> >>enable >> >>> smb(4) support), I now get: >> >>> >> >>> pciconf: >> >>> none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 >> >>rev=0x02 >> >>> hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' >> >>> device = 'AMD-8111 SMBus 2.0 Controller' >> >>> class = serial bus >> >>> subclass = SMBus >> >>> amdpm0@pci0:7:3: class=0x068000 card=0x746b1022 >> >>chip=0x746b1022 >> >>> rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' >> >>> device = 'AMD-8111 ACPI System Management Controller' >> >>> class = bridge >> >>> >> >>> dmesg: >> >>> amdpm0: port >> >>> 0x10e0-0x10ff at device 7.3 on pci0 smbus0: >> on >> >>> amdpm0 >> >>> >> >>> # mbmon -A -d >> >>> Summary of Detection: >> >>> * SMB monitor(s)[ioctl:AMD8111]: >> >>> ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50. >> >>> ** Analog Dev. Chip ADM1027 found at slave address: 0x5C. >> >>> * ISA monitor(s): >> >>> ** Winbond Chip W83627HF/THF/THF-A found. >> >>> >> >>> I think the confusion comes from the fact that nobody really tried >> >>> SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come >> with >> >>> SMBus support enabled, neither in FreeBSD 4, nor in later >> versions, >> >>> so mbmon(1) was just showing the values from the Winbond sensors >> >>> accessible through the ISA I/O method (mbmon -I), for me anyway. >> >>> >> >>> On my test machine, the amdpm(4) didn't even attach due to I/O >> port >> >>> allocation failure (who knows what the hell it read from CSR 0x58 >> >>> of the SMBus 2.0 device :-), which isn't in the CSR space). >> >>> >> >>> I've also checked that lm_sensors.org uses correct PCI ID for >> SMBus >> >>> 1.0 of AMD-8111: >> >>> >> >>> i2c-amd756.c: {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, >> PCI_ANY_ID, >> >>0, 0, >> >>> AMD8111 }, >> >>> >> >>> This driver is analogous to our amdpm.c which supports SMBus 1.0 >> >>> AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111. >> >>> >> >>> i2c-amd8111.c: { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 >> }, >> >>> >> >>> This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which >> >>> supports SMBus 2.0, and which our amdpm.c does NOT support >> >>> (SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus). >> >>> At least I know for sure it doesn't work with my nForce3. :-) >> >>> >> >>> (The xmbmon port will be fixed to correct the PCI ID too and to >> >>> enable the smb(4) support.) >> >> >> >>So should the other stuff I just committed be axed then until the ACPI >> >>SMBUS >> >>stuff is added? >> >> >> >I believe so, but I'd like to hear from Igor or anyone with >> >nForce2 first. I suspect that it's a "fake" support now for >> >nForce2/3/4, but my observations are based on reading the >> >Igor's explanations and lm_sensors sources, so I'd like to >> >see the output from "mbmon -A -d" and then "mbmon -S 8" from >> >those with nForce2 who believe this patch is valuable, to be >> >sure. (I don't personally have any nForce2 based machines >> >around here to check it.) >> >> I took amdpm.c from -CURRENT and put in 6.0-STABLE here in my machine. >> >> __FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/pci/amdpm.c,v 1.17 >> 2005/12/16 >> 15:03:16 ru Exp $"); >> >> pciconf: >> ======================================== >> amdpm0@pci0:1:1: class=0x0c0500 card=0x57001462 chip=0x008410de >> rev=0xa1 hdr=0x00 >> vendor = 'NVIDIA Corporation' >> device = 'nForce MCP2S PCI System Management' >> class = serial bus >> subclass = SMBus >> ======================================== >> >> dmesg: >> ======================================== >> amdpm0: port >> 0xc400-0xc41f,0x5000-0x501f irq 23 at device 1.1 on pci0 >> smbus0: on amdpm0 >> smb0: on smbus0 >> amdpm1: on amdpm0 >> smbus1: on amdpm1 >> smb1: on smbus1 >> ======================================== >> >> ======================================== >> # pkg_info | grep xmbmon >> xmbmon-205_2 >> >> # mbmon -A -d >> Summary of Detection: >> * ISA monitor(s): >> ** Winbond Chip W83627HF/THF/THF-A found. >> ** Int.Tec.Exp. Chip IT8705F/IT8712F or SIS950 found. >> >> # mbmon -S 8 >> No SMBus HWM available!! >> InitMBInfo: Unknown error: 0 >> ======================================== >> >> Motherboard: K7N2 Delta2 Platinum (MS-6570E-010) >> >> http://www.msicomputer.com/product/p_spec.asp?model=K7N2_Delta2_Platinum&class=mb >> >> If you need anything else more, let me know. >> > Yes. Please change ID_NFORCE2 define in pci_pm.h (in xmbmon sources) > from 0x006410DE to 0x008410DE, this will "add support for your SMBus > controller to xmbmon". I doubt it will ever work, but just to be > absolutely sure, try again mbmon commands I asked and show me the > output. # mbmon -A -d Summary of Detection: * SMB monitor(s)[ioctl:NVidia nForce2]: ** Genesys Logic GL518SM_rev80 found at slave address: 0x58. * ISA monitor(s): ** Winbond Chip W83627HF/THF/THF-A found. ** Int.Tec.Exp. Chip IT8705F/IT8712F or SIS950 found. # mbmon -S 8 Temp.= 9.0, 0.0, 0.0; Rot.= 937, 0, 0 Vcore = 2.74, 0.00; Volt. = 2.74, 3.31, 11.48, 0.00, 0.00 Temp.= 25.0, 0.0, 0.0; Rot.= 833, 0, 0 Vcore = 3.04, 0.00; Volt. = 3.04, 3.68, 12.76, 0.00, 0.00 Temp.= 41.0, 0.0, 0.0; Rot.= 750, 0, 0 Vcore = 3.34, 0.00; Volt. = 3.34, 4.05, 14.03, 0.00, 0.00 Temp.= 57.0, 0.0, 0.0; Rot.= 681, 0, 0 Vcore = 2.43, 0.00; Volt. = 2.43, 2.94, 10.20, 0.00, 0.00 Temp.= 9.0, 0.0, 0.0; Rot.= 937, 0, 0 Vcore = 2.74, 0.00; Volt. = 2.74, 3.31, 11.48, 0.00, 0.00 Cheers, Mezz > Cheers, -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org