lkml.org 
[lkml]   [2001]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [prelim-PATCH] Enable SSE on K7 without BIOS support.
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.118 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site