Re: [prelim-PATCH] Enable SSE on K7 without BIOS support.

Kurt Garloff (garloff@suse.de)
Thu, 20 Sep 2001 13:59:43 +0200


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

On Wed, Sep 19, 2001 at 11:30:41PM -0400, John Clemens wrote:
> diff -u --recursive linux-orig/arch/i386/kernel/setup.c linux/arch/i386/k=
ernel/setup.c
> --- linux-orig/arch/i386/kernel/setup.c Wed Sep 19 22:49:11 2001
> +++ linux/arch/i386/kernel/setup.c Wed Sep 19 22:51:34 2001
> @@ -1272,6 +1272,14 @@
>=20
> case 6: /* An Athlon/Duron. We can trust the BIOS probably */
> mcheck_init(c);
> + if (c->x86_model =3D=3D 6 || c->x86_model =3D=3D 7) {
> + rdmsr(MSR_K7_HWCR, l, h);
> + if ( (h|l) !=3D 0 ) {
> + printk(KERN_INFO "Palomino/Morgan: Enabling K7/SSE support (your BI=
OS didn't..)\n");
> + wrmsr(MSR_K7_HWCR, 0, 0);
> + set_bit(X86_FEATURE_XMM, &c->x86_capability);

After you enabled it via HWCR, cpuid should report the SSE capability, no?
You should check it and not unconditionally enable XMM/SSE support flag,
otherwise it may break on some CPU models.

Regards,
--=20
Kurt Garloff <garloff@suse.de> Eindhoven, NL
GPG key: See mail header, key servers Linux kernel development
SuSE GmbH, Nuernberg, DE SCSI, Security

--0ywUhQCikZ2Y3PNw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7qdouxmLh6hyYd04RAhiZAJsGELULkux4febmABi9GIkDjW/iPwCfZlgS
cK0P+vR9gjmjdQNSJTplVII=
=85VF
-----END PGP SIGNATURE-----

--0ywUhQCikZ2Y3PNw--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/