Subject: Re: ACPI init (sequel)
To: Vincent <10.50@free.fr>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 03/31/2005 09:28:54
--Mb1GmuWGbG8HO3cw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 31, 2005 at 08:16:40AM +0200, Vincent wrote:
> while still working on Acpi problems, I think I encounter the following=
=20
> "bug".
>=20
> On my P4 laptop, it seems that as long as the SpeedStep feature is=20
> disabled, one can not modify the speed of the processor through the _Txx=
=20
> methods (clock throttling).
>=20
> But, SpeedStep enabling occurs only when ichlpcib0 is initialized, that=
=20
> is to say way after acpi init is performed. The acpi code reports thus=20
> no clock control possible (erroneously) and do not set up any variables=
=20
> related to clock control.
>=20
> Of course, the solution would be to use the proper ACPI methods to start=
=20
>  SpeedStep up.
>=20
> More generally, is it sane, on an acpi enabled plateform, to carry on=20
> initialiazing the devices through the classical mechanism of bus=20
> enumeration? Or should it rather be done within the acpi phase using the=
=20
> acpi mechanism? (Which would require a rewrite of the autoconf code)

I really don't see how it would solve the issue.  The problem you're
seeing is simply mis-design.

ACPI offers a lot of possibilities regarding power consumption and
performance control.  However, one should not limit any design to ACPI
or MD designs.  We already now SpeedStep, Enhanced SpeedStep and
PoerNow! in the nature, along with the ACPI methods, all of this calls
for a proper CPU power capabilities control API.

Once that part is designed, the current SS and EST hacks should go away
and be replaced by more formal devices and the user will control the
CPU performance through powerd(8) (or a powerctl(8) which would work
with powerd(8) in a similar fashion as apm/apmd, per discussion with
Kentaro Kurahone), not having to know what is the underlying hardware.

This would solve the issue, and is orthogonal to the way devices are
enumerated:  the problem is just to be careful when you allocate
resources.

I don't know the details of the DSDT of your laptop, but invoking _PDC
(or _OSC, depending on which you have) with the proper capability words
should make _PTC return the right data, even if SS is not enabled yet.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQkumttgoQloHrPnoAQICQggAy7HQqPHRb33roF2euSmArhj2U6GxTlJl
Rwc/hascn6yBeixo2TVvaIg+EU9aWhDEB2t1+bl3Ch7Uj92tgZJvkHqjF/5UhUzs
7oUZ9cedBH3c5m2kdCor7F3n0iABL0iDIKwl3OPDUUqIAKGNrH9buZVXtYLJ3L1D
jvgXznbTRVGxeF+RhGOkkuHDZre3evYbeLHZz6TWLOjAkSmB7utATp9PaJQkFatf
Jei5GJX3pA4XPy/dcwmByyYXulN2AA3mRxdpwHQkdnWkNt9giFSUWpEaiPSvSVsv
+Kt/AeHYhfAGRcxB2cI2d/c9sgbkvqcknHUovEQJKGSqcL3OBXsMmA==
=Dojy
-----END PGP SIGNATURE-----

--Mb1GmuWGbG8HO3cw--