Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.13-pre4 /arch/i386/kernel/mtrr.c

Filename:/arch/i386/kernel/mtrr.c
Lines Added:10
Lines Deleted:5
Also changed in: (Previous) 2.4.13-pre3  2.4.13-pre2  2.4.13-pre1  2.4.12-ac3  2.4.12-ac2  2.4.12-ac1 
(Following) 2.4.13-pre5  2.4.13-pre6  2.4.13  2.4.13-ac1  2.4.13-ac2  2.4.13-ac3 

Location
[  2.4.13-pre4
  [  arch
    [  i386
      [  kernel
         o  mtrr.c

Patch

diff -u --recursive --new-file v2.4.12/linux/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
--- v2.4.12/linux/arch/i386/kernel/mtrr.c   Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/mtrr.c   Mon Oct 15 13:43:24 2001
@@ -1253,7 +1253,8 @@
    break;
 
     case MTRR_IF_INTEL:
-   /*  For Intel PPro stepping <= 7, must be 4 MiB aligned  */
+   /*  For Intel PPro stepping <= 7, must be 4 MiB aligned 
+       and not touch 0x70000000->0x7003FFFF */
    if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
         boot_cpu_data.x86 == 6 &&
         boot_cpu_data.x86_model == 1 &&
@@ -1264,6 +1265,12 @@
       printk (KERN_WARNING "mtrr: base(0x%lx000) is not 4 MiB aligned\n", base);
       return -EINVAL;
        }
+       if (!(base + size < 0x70000000 || base > 0x7003FFFF) &&
+       (type == MTRR_TYPE_WRCOMB || type == MTRR_TYPE_WRBACK))
+       {
+      printk (KERN_WARNING "mtrr: writable mtrr between 0x70000000 and 0x7003FFFF may hang the CPU.\n");
+           return -EINVAL;
+       }
    }
    /* Fall through */
    
@@ -2119,10 +2126,8 @@
       break;
 
    case X86_VENDOR_CENTAUR:
-      /* Cyrix III has Intel style MTRRs, but doesn't support PAE */
-      if (boot_cpu_data.x86 == 6 &&
-         (boot_cpu_data.x86_model == 6 ||
-          boot_cpu_data.x86_model == 7)) {
+      /* VIA Cyrix family have Intel style MTRRs, but don't support PAE */
+      if (boot_cpu_data.x86 == 6) {
          size_or_mask  = 0xfff00000; /* 32 bits */
          size_and_mask = 0;
       }


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.