On Thu, Sep 15, 2011 at 12:32 PM, K. Macy <kmacy@freebsd.org> wrote:
[...]
> sys/x86/cpufreq/est.c:1008
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Attempt to enable SpeedStep if not currentl=
y enabled. */
> =C2=A0 =C2=A0 =C2=A0 =C2=A0msr =3D rdmsr(MSR_MISC_ENABLE);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((msr & MSR_SS_ENABLE) =3D=3D 0) {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0wrmsr(MSR_MISC_ENA=
BLE, msr | MSR_SS_ENABLE);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bootverbose)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0device_printf(dev, "enabling SpeedStep\n");
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Check if the en=
able failed. */
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0msr =3D rdmsr(MSR_=
MISC_ENABLE);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((msr & MSR_SS_=
ENABLE) =3D=3D 0) {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0device_printf(dev, "failed to enable SpeedStep\n");
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0return (ENXIO);
Looking at the Intel=C2=AE 64 and IA-32 Architectures Software Developer=C2=
=92s
Manual (section 14.1), I think the code here is right?
(I'd expect Linux do the same since the code are mostly the same there).
Cheers,
--=20
Xin LI <delphij@delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
_______________________________________________
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"