Skip to contentSkip to conversation

x86: process fam 10h like k8 with fixed mtrr setting

PATCH Applied Yinghai Lu 4 participants 4 messages May 5, 2008 – May 20, 2008 x86

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86: process fam 10h like k8 with fixed mtrr setting

otherwise fixed MTRR for family 10h may not be changed

arch/x86/kernel/cpu/mtrr/generic.c +1 -1
Index: linux-2.6/arch/x86/kernel/cpu/mtrr/generic.c
===================================================================
@@ -342,7 +342,7 @@ static void set_fixed_range(int msr, boo
 
 	if (lo != msrwords[0] || hi != msrwords[1]) {
 		if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
-		    boot_cpu_data.x86 == 15 &&
+		    (boot_cpu_data.x86 >= 0x0f && boot_cpu_data.x86 <= 0x11) &&
 		    ((msrwords[0] | msrwords[1]) & K8_MTRR_RDMEM_WRMEM_MASK))
 			k8_enable_fixed_iorrs();
 		mtrr_wrmsr(msr, msrwords[0], msrwords[1]);
Applied
#1 lore raw
Quoted 1 line · Yinghai Lu

otherwise fixed MTRR for family 10h may not be changed

applied, thanks.

Ingo

#2 lore raw
In reply to Yinghai Lu
Quoted 10 lines · Yinghai Lu

otherwise fixed MTRR for family 10h may not be changed

Index: linux-2.6/arch/x86/kernel/cpu/mtrr/generic.c
===================================================================

arch/x86/kernel/cpu/mtrr/generic.c static void set_fixed_range(int msr, boo · line 348

Quoted 8 lines
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
@@ -342,7 +342,7 @@ static void set_fixed_range(int msr, boo
 
 	if (lo != msrwords[0] || hi != msrwords[1]) {
 		if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
-		    boot_cpu_data.x86 == 15 &&
+		    (boot_cpu_data.x86 >= 0x0f && boot_cpu_data.x86 <= 0x11) &&
 		    ((msrwords[0] | msrwords[1]) & K8_MTRR_RDMEM_WRMEM_MASK))
 			k8_enable_fixed_iorrs();
 		mtrr_wrmsr(msr, msrwords[0], msrwords[1]);

This also changes family 0x11. Is that ok?

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
Quoted 12 lines · Pavel Machek
Quoted 11 lines · Yinghai Lu

otherwise fixed MTRR for family 10h may not be changed

Index: linux-2.6/arch/x86/kernel/cpu/mtrr/generic.c
===================================================================

arch/x86/kernel/cpu/mtrr/generic.c +0 -0
@@ -342,7 +342,7 @@ static void set_fixed_range(int msr, boo
 
Quoted 9 lines

arch/x86/kernel/cpu/mtrr/generic.c static void set_fixed_range(int msr, boo · line 348

Quoted 7 lines
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
      if (lo != msrwords[0] || hi != msrwords[1]) {
              if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
-                 boot_cpu_data.x86 == 15 &&
+                 (boot_cpu_data.x86 >= 0x0f && boot_cpu_data.x86 <= 0x11) &&
                  ((msrwords[0] | msrwords[1]) & K8_MTRR_RDMEM_WRMEM_MASK))
                      k8_enable_fixed_iorrs();
              mtrr_wrmsr(msr, msrwords[0], msrwords[1]);

This also changes family 0x11. Is that ok?

Yes.

YH