LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: "Diego M. Vadell" <dvadell@linuxclusters.com.ar>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: PAT and MTRRs
Date: Fri, 31 Oct 2008 16:35:25 -0700	[thread overview]
Message-ID: <490B963D.5010100@kernel.org> (raw)
In-Reply-To: <59727.163.10.1.174.1225492920.squirrel@sec.bit-consulting.com.ar>

Diego M. Vadell wrote:
>> can you try 2.6.28-rc2 ot tip/master and boot with mtrr_cleanup_debug ?
>>
>> YH
> 
> Hello,
>   Thank you very much and sorry for the delay. This is a remote site and I
> have to travel to get here.
> 
>   I upgradedt to 2.6.28-rc2 but the problem persists. Here is the
> (hopefully) relevant part of dmesg:
> 
> BIOS EBDA/lowmem at: 0009fc00/0009fc00
> Linux version 2.6.28-rc2 (root@compute-0-5.local) (gcc version 3.4.6
> 20060404 (Red Hat 3.4.6-8))
> #1 SMP Fri Oct 31 18:01:52 ART 2008
> Command line: ro root=LABEL=/  mtrr_cleanup_debug
> KERNEL supported cpus:
>   Intel GenuineIntel
>   AMD AuthenticAMD
>   Centaur CentaurHauls
> BIOS-provided physical RAM map:
>  BIOS-e820: 0000000000000000 - 000000000008f000 (usable)
>  BIOS-e820: 000000000008f000 - 00000000000a0000 (reserved)
>  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
>  BIOS-e820: 0000000000100000 - 00000000cf561000 (usable)
>  BIOS-e820: 00000000cf561000 - 00000000cf56e000 (reserved)
>  BIOS-e820: 00000000cf56e000 - 00000000cf612000 (usable)
>  BIOS-e820: 00000000cf612000 - 00000000cf6e9000 (ACPI NVS)
>  BIOS-e820: 00000000cf6e9000 - 00000000cf6ed000 (usable)
>  BIOS-e820: 00000000cf6ed000 - 00000000cf6f2000 (ACPI data)
>  BIOS-e820: 00000000cf6f2000 - 00000000cf6f3000 (usable)
>  BIOS-e820: 00000000cf6f3000 - 00000000cf6ff000 (ACPI data)
>  BIOS-e820: 00000000cf6ff000 - 00000000cf700000 (usable)
>  BIOS-e820: 00000000cf700000 - 00000000d0000000 (reserved)
>  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
>  BIOS-e820: 0000000100000000 - 000000012c000000 (usable)
> DMI 2.4 present.
> last_pfn = 0x12c000 max_arch_pfn = 0x3ffffffff
> x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
> After WB checking
> MTRR MAP PFN: 0000000000000000 - 00000000000d0000
> After UC checking
> MTRR MAP PFN: 0000000000000000 - 00000000000cf700
> After sorting
> MTRR MAP PFN: 0000000000000000 - 00000000000cf700
> WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 704MB of RAM.
> ------------[ cut here ]------------
> WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1662
> mtrr_trim_uncached_memory+0x331/0x358()
> Modules linked in:
> Pid: 0, comm: swapper Not tainted 2.6.28-rc2 #1
> Call Trace:
>  [<ffffffff80232c63>] warn_on_slowpath+0x51/0x6d
>  [<ffffffff80233b5f>] printk+0x8d/0x95
>  [<ffffffff80306735>] generic_swap+0x0/0x19
>  [<ffffffff8060a92e>] cmp_range+0x0/0x6
>  [<ffffffff8060b4f0>] mtrr_trim_uncached_memory+0x331/0x358
>  [<ffffffff803efcf7>] dmi_table+0x6f/0x96
>  [<ffffffff80621aa3>] dmi_decode+0x0/0x4ab
>  [<ffffffff806072a8>] setup_arch+0x3f9/0x63c
>  [<ffffffff8060083c>] start_kernel+0x6a/0x307
>  [<ffffffff806003a1>] x86_64_start_kernel+0xef/0xf3
> ---[ end trace 4eaa2a86a8e2da22 ]---
> update e820 for mtrr
> modified physical RAM map:
>  modified: 0000000000000000 - 000000000008f000 (usable)
>  modified: 000000000008f000 - 00000000000a0000 (reserved)
>  modified: 00000000000e0000 - 0000000000100000 (reserved)
>  modified: 0000000000100000 - 00000000cf561000 (usable)
>  modified: 00000000cf561000 - 00000000cf56e000 (reserved)
>  modified: 00000000cf56e000 - 00000000cf612000 (usable)
>  modified: 00000000cf612000 - 00000000cf6e9000 (ACPI NVS)
>  modified: 00000000cf6e9000 - 00000000cf6ed000 (usable)
>  modified: 00000000cf6ed000 - 00000000cf6f2000 (ACPI data)
>  modified: 00000000cf6f2000 - 00000000cf6f3000 (usable)
>  modified: 00000000cf6f3000 - 00000000cf6ff000 (ACPI data)
>  modified: 00000000cf6ff000 - 00000000cf700000 (usable)
>  modified: 00000000cf700000 - 00000000d0000000 (reserved)
>  modified: 00000000fff00000 - 000000012c000000 (reserved)
> last_pfn = 0xcf700 max_arch_pfn = 0x3ffffffff

your bios doesn't cover 4g above RAM..

please do 
1. boot linux with "disable_mtrr_trim"
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrr
echo "base=0x120000000 size=0x8000000 type=write-back" >/proc/mtrr
echo "base=0x128000000 size=0x4000000 type=write-back" >/proc/mtrr

later you could put those three lines in one scripts and call it from inittab
# grep mtrrfixup /etc/inittab
mtrrfixup:345:once:/root/mtrrfixup.sh

YH

  parent reply	other threads:[~2008-10-31 23:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26 23:46 Diego M. Vadell
2008-10-27  0:12 ` Arjan van de Ven
2008-10-27  0:21   ` H. Peter Anvin
2008-10-27  0:34     ` Arjan van de Ven
2008-10-27  0:38       ` H. Peter Anvin
2008-10-27  5:17 ` Yinghai Lu
2008-10-31 22:42   ` Diego M. Vadell
2008-10-31 23:19     ` Yinghai Lu
2008-10-31 23:35     ` Yinghai Lu [this message]
2008-11-11 14:30       ` Diego M. Vadell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=490B963D.5010100@kernel.org \
    --to=yinghai@kernel.org \
    --cc=dvadell@linuxclusters.com.ar \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: PAT and MTRRs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).