Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2005 23:45:40 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Jeremy Messenger <mezz7@cox.net>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/pci amdpm.c
Message-ID:  <20051216214540.GI41326@ip.net.ua>
In-Reply-To: <op.s1waswjj9aq2h7@mezz.mezzweb.com>
References:  <200512161503.jBGF3GZb075045@repoman.freebsd.org> <200512161039.57740.jhb@freebsd.org> <20051216160946.GF41326@ip.net.ua> <op.s1waswjj9aq2h7@mezz.mezzweb.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--SLfjTIIQuAzj8yil
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 16, 2005 at 03:18:22PM -0600, Jeremy Messenger wrote:
> On Fri, 16 Dec 2005 10:09:46 -0600, Ruslan Ermilov <ru@freebsd.org> wrote:
>=20
> >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 =20
> >>matches
> >>>   SMBus 1.0 and not SMBus 2.0.
> >>>
> >>>   AMD-8111 hub (datasheet is publically available) implements both =
=20
> >>SMBus
> >>>   2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the =20
> >>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 =
=20
> >>enable
> >>>   smb(4) support), I now get:
> >>>
> >>>   pciconf:
> >>>   none0@pci0:7:2: class=3D0x0c0500 card=3D0x746a1022 chip=3D0x746a102=
2 =20
> >>rev=3D0x02
> >>> hdr=3D0x00 vendor   =3D 'Advanced Micro Devices (AMD)'
> >>>       device   =3D 'AMD-8111 SMBus 2.0 Controller'
> >>>       class    =3D serial bus
> >>>       subclass =3D SMBus
> >>>   amdpm0@pci0:7:3:        class=3D0x068000 card=3D0x746b1022 =20
> >>chip=3D0x746b1022
> >>> rev=3D0x05 hdr=3D0x00 vendor   =3D 'Advanced Micro Devices (AMD)'
> >>>       device   =3D 'AMD-8111 ACPI System Management Controller'
> >>>       class    =3D bridge
> >>>
> >>>   dmesg:
> >>>   amdpm0: <AMD 756/766/768/8111 Power Management Controller> port
> >>> 0x10e0-0x10ff at device 7.3 on pci0 smbus0: <System Management Bus> 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,=
 =20
> >>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 =
=20
> >>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.)
>=20
> I took amdpm.c from -CURRENT and put in 6.0-STABLE here in my machine.
>=20
> __FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/pci/amdpm.c,v 1.17 2005/12/16=
 =20
> 15:03:16 ru Exp $");
>=20
> pciconf:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> amdpm0@pci0:1:1:        class=3D0x0c0500 card=3D0x57001462 chip=3D0x00841=
0de =20
> rev=3D0xa1 hdr=3D0x00
>     vendor   =3D 'NVIDIA Corporation'
>     device   =3D 'nForce MCP2S PCI System Management'
>     class    =3D serial bus
>     subclass =3D SMBus
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> dmesg:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> amdpm0: <nForce2/3/4 MCP SMBus Controller> port =20
> 0xc400-0xc41f,0x5000-0x501f irq 23 at device 1.1 on pci0
> smbus0: <System Management Bus> on amdpm0
> smb0: <SMBus generic I/O> on smbus0
> amdpm1: <nForce2/3/4 MCP SMBus Controller> on amdpm0
> smbus1: <System Management Bus> on amdpm1
> smb1: <SMBus generic I/O> on smbus1
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> # pkg_info | grep xmbmon
> xmbmon-205_2
>=20
> # 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.
>=20
> # mbmon -S 8
> No SMBus HWM available!!
> InitMBInfo: Unknown error: 0
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Motherboard: K7N2 Delta2 Platinum (MS-6570E-010)
>=20
> http://www.msicomputer.com/product/p_spec.asp?model=3DK7N2_Delta2_Platinu=
m&class=3Dmb
>=20
> If you need anything else more, let me know.
>=20
Yes.  Please change ID_NFORCE2 define in pci_pm.h (in xmbmon sources)=20
=66rom 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.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--SLfjTIIQuAzj8yil
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDozWEqRfpzJluFF4RAk0HAJ91dDx9scuPXPB1aQqH1OmI4OvqGQCeKboA
p1V6NPR7l6JrWvBTR2greR8=
=RQnO
-----END PGP SIGNATURE-----

--SLfjTIIQuAzj8yil--



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