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

From: Kurt Garloff (garloff@suse.de)
Date: Thu Sep 20 2001 - 06:59:43 EST


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/kernel/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 @@
>
> case 6: /* An Athlon/Duron. We can trust the BIOS probably */
> mcheck_init(c);
> + if (c->x86_model == 6 || c->x86_model == 7) {
> + rdmsr(MSR_K7_HWCR, l, h);
> + if ( (h|l) != 0 ) {
> + printk(KERN_INFO "Palomino/Morgan: Enabling K7/SSE support (your BIOS 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,

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


- 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/



This archive was generated by hypermail 2b29 : Sun Sep 23 2001 - 21:00:37 EST