login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
22
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; only 3 of 16gb of memory is usable
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Yinghai Lu
Subject:
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; only 3 of 16gb of memory is usable
Date: Thursday, August 21, 2008 - 11:16 pm
On Thu, Aug 21, 2008 at 8:50 PM, Ingo Molnar <mingo@elte.hu> wrote:
quoted text
> > * Yinghai Lu <yhlu.kernel@gmail.com> wrote: > >> or please try attached workaround patch. hope it works. >> >> Ingo, >> if it works, we need to push it for 2.6.27 > > i've tidied up your patch (see the commit below) and have queued it up > in x86/urgent. It seems fairly safe and i guess we can push it to > v2.6.27 if Joshua reports test success. Joshua, could you give it a go > please? > > Ingo > > --------------> > From 38cc1c3df77c1bb739a4766788eb9fa49f16ffdf Mon Sep 17 00:00:00 2001 > From: Yinghai Lu <yhlu.kernel@gmail.com> > Date: Thu, 21 Aug 2008 20:24:24 -0700 > Subject: [PATCH] x86: work around MTRR mask setting > > Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is > usable. Booting with mtrr_show showed us the BIOS-initialized > MTRR settings - which are all wrong. > > So the root cause is that the BIOS has not set the mask correctly: > >> [ 0.429971] MSR00000200: 00000000d0000000 >> [ 0.433305] MSR00000201: 0000000ff0000800 >> should be ==> [ 0.433305] MSR00000201: 0000003ff0000800 >> >> [ 0.436638] MSR00000202: 00000000e0000000 >> [ 0.439971] MSR00000203: 0000000fe0000800 >> should be ==> [ 0.439971] MSR00000203: 0000003fe0000800 >> >> [ 0.443304] MSR00000204: 0000000000000006 >> [ 0.446637] MSR00000205: 0000000c00000800 >> should be ==> [ 0.446637] MSR00000205: 0000003c00000800 >> >> [ 0.449970] MSR00000206: 0000000400000006 >> [ 0.453303] MSR00000207: 0000000fe0000800 >> should be ==> [ 0.453303] MSR00000207: 0000003fe0000800 >> >> [ 0.456636] MSR00000208: 0000000420000006 >> [ 0.459970] MSR00000209: 0000000ff0000800 >> should be ==> [ 0.459970] MSR00000209: 0000003ff0000800 > > So detect this borkage and add the prefix 111. > > Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> > Cc: <stable@kernel.org> > Signed-off-by: Ingo Molnar <mingo@elte.hu> > --- > arch/x86/kernel/cpu/mtrr/generic.c | 15 +++++++++++++-- > 1 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c > index 509bd3d..43102e0 100644 > --- a/arch/x86/kernel/cpu/mtrr/generic.c > +++ b/arch/x86/kernel/cpu/mtrr/generic.c > @@ -379,6 +379,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base, > unsigned long *size, mtrr_type *type) > { > unsigned int mask_lo, mask_hi, base_lo, base_hi; > + unsigned int tmp, hi; > > rdmsr(MTRRphysMask_MSR(reg), mask_lo, mask_hi); > if ((mask_lo & 0x800) == 0) { > @@ -392,8 +393,18 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base, > rdmsr(MTRRphysBase_MSR(reg), base_lo, base_hi); > > /* Work out the shifted address mask. */ > - mask_lo = size_or_mask | mask_hi << (32 - PAGE_SHIFT) > - | mask_lo >> PAGE_SHIFT; > + tmp = mask_hi << (32 - PAGE_SHIFT) | mask_lo >> PAGE_SHIFT; > + mask_lo = size_or_mask | tmp; > + /* Expand tmp with high bits to all 1s*/ > + hi = fls(tmp); > + if (hi > 0) { > + tmp |= ~((1<<(hi - 1)) - 1); > + > + if (tmp != mask_lo) { > + WARN_ON("mtrr: your BIOS has set up an incorrect mask, fixing it up.\n");
can you change WARN_ON to WARN_ON_ONCE ? YH --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Andrew Morton
, (Wed Aug 20, 6:04 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Wed Aug 20, 6:20 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Wed Aug 20, 6:49 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 4:44 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 4:56 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 8:39 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 1:55 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 2:51 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 4:33 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 5:10 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 5:28 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 5:29 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 6:00 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 6:10 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 6:55 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 7:15 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 7:26 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 8:24 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Thu Aug 21, 8:26 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 8:50 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 8:51 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 8:56 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 9:45 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 9:48 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Thu Aug 21, 11:16 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Thu Aug 21, 11:24 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Fri Aug 22, 5:22 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Yinghai Lu
, (Fri Aug 22, 10:52 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Sat Aug 23, 3:43 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Arjan van de Ven
, (Sat Aug 23, 4:53 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Mon Aug 25, 2:17 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Mon Aug 25, 2:43 pm)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Joshua Hoblitt
, (Tue Aug 26, 1:35 am)
Re: [Bug 11388] New: 2.6.27-rc3 warns about MTRR range; on ...
, Ingo Molnar
, (Tue Aug 26, 1:42 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v2 11/11] sched: update tg->shares after cpu.shares write
Ingo Molnar
Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)
Michal Nazarewicz
Re: [PATCH] USB: Gadget: g_multi: added INF file for gadget with multiple configur...
Eric W. Biederman
Re: init's children list is long and slows reaping children.
Jeffrey V. Merkey
Re: Versioning file system
git
:
Matthieu Moy
Re: Bugs in Gitosis
Daniel Barkalow
Re: About git and the use of SHA-1
David Lang
Re: mingw, windows, crlf/lf, and git
Shawn O. Pearce
Re: Bugs in Gitosis
Junio C Hamano
Re: [PATCH 14/21] Convert ce_path_match() to use struct pathspec
linux-netdev
:
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
David Miller
Re: [PATCH] ipv6: fix display of local and remote sit endpoints
Cong Wang
Re: [PATCH] s2io: add dynamic LRO disable support
Tobacco New Year Promo
Eric Dumazet
Re: [PATCH] net: implement emergency route cache rebulds when gc_elasticity is exc...
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
of/flattree: merge early_init_dt_scan_memory() common code
Linux Kernel Mailing List
b43: N-PHY: add some registers and structs definitions
Linux Kernel Mailing List
powerpc: Move /proc/ppc64 to /proc/powerpc and add symlink
Linux Kernel Mailing List
drivers/acpi: use kasprintf
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Eric Furman
Re: Defending OpenBSD Performance
Damien Miller
Re: Patching a SSH 'Weakness'
Tony Abernethy
Re: The Atheros story in much fewer words
Nick Holland
Re: 1 out of 3 hunks failed--saving rejects to kerberosV/src/lib/krb5/crypto.c.rej
Colocation donated by:
Syndicate