/[linux-patches]/genpatches-2.6/trunk/2.6.14/1113_3_4GB-memory-intel-dual-core.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1113_3_4GB-memory-intel-dual-core.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 9 months ago) by johnm
File MIME type: text/x-diff
File size: 2487 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Sat Oct 29 23:50:10 2005
2 Date: Sun, 30 Oct 2005 01:49:38 -0500
3 From: Dave Jones <davej@redhat.com>
4 To: Marcel Holtmann <marcel@holtmann.org>
5 Cc: discuss@x86-64.org, linux-kernel@vger.kernel.org,
6 Lukas Hejtmanek <xhejtman@mail.muni.cz>, torvalds@osdl.org,
7 Shaohua Li <shaohua.li@intel.com>, stable@kernel.org, ak@suse.de
8 Subject: [PATCH] x86_64/i386: Compute correct MTRR mask on early Noconas
9
10 From: Andi Kleen <ak@suse.de>
11
12 Force correct address space size for MTRR on some 64bit Intel Xeons
13
14 They report 40bit, but only have 36bits of physical address space.
15 This caused problems with setting up the correct masks for MTRR,
16 resulting in incorrect MTRRs.
17
18 CPUID workaround for steppings 0F33h(supporting x86) and 0F34h(supporting x86
19 and EM64T). Detail info can be found at:
20 http://download.intel.com/design/Xeon/specupdt/30240216.pdf
21 http://download.intel.com/design/Pentium4/specupdt/30235221.pdf
22
23 Signed-off-by: Shaohua Li<shaohua.li@intel.com>
24 Signed-off-by: Andi Kleen <ak@suse.de>
25 Signed-off-by: Chris Wright <chrisw@osdl.org>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27 ---
28 arch/i386/kernel/cpu/mtrr/main.c | 8 ++++++++
29 arch/x86_64/kernel/setup.c | 5 +++++
30 2 files changed, 13 insertions(+)
31
32 --- linux-2.6.14.2.orig/arch/i386/kernel/cpu/mtrr/main.c
33 +++ linux-2.6.14.2/arch/i386/kernel/cpu/mtrr/main.c
34 @@ -626,6 +626,14 @@ void __init mtrr_bp_init(void)
35 if (cpuid_eax(0x80000000) >= 0x80000008) {
36 u32 phys_addr;
37 phys_addr = cpuid_eax(0x80000008) & 0xff;
38 + /* CPUID workaround for Intel 0F33/0F34 CPU */
39 + if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
40 + boot_cpu_data.x86 == 0xF &&
41 + boot_cpu_data.x86_model == 0x3 &&
42 + (boot_cpu_data.x86_mask == 0x3 ||
43 + boot_cpu_data.x86_mask == 0x4))
44 + phys_addr = 36;
45 +
46 size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
47 size_and_mask = ~size_or_mask & 0xfff00000;
48 } else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR &&
49 --- linux-2.6.14.2.orig/arch/x86_64/kernel/setup.c
50 +++ linux-2.6.14.2/arch/x86_64/kernel/setup.c
51 @@ -993,6 +993,11 @@ static void __cpuinit init_intel(struct
52 unsigned eax = cpuid_eax(0x80000008);
53 c->x86_virt_bits = (eax >> 8) & 0xff;
54 c->x86_phys_bits = eax & 0xff;
55 + /* CPUID workaround for Intel 0F34 CPU */
56 + if (c->x86_vendor == X86_VENDOR_INTEL &&
57 + c->x86 == 0xF && c->x86_model == 0x3 &&
58 + c->x86_mask == 0x4)
59 + c->x86_phys_bits = 36;
60 }
61
62 if (c->x86 == 15)

  ViewVC Help
Powered by ViewVC 1.1.20