public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Steve Snyder <swsnyder@insightbb.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Sub-optimal MTRR config in kernel 2.6.x
Date: Thu, 23 Sep 2004 19:24:50 +0100	[thread overview]
Message-ID: <20040923182449.GA7107@redhat.com> (raw)
In-Reply-To: <200409230953.36618.swsnyder@insightbb.com>

On Thu, Sep 23, 2004 at 09:53:36AM -0500, Steve Snyder wrote:
 > 
 > And this is how the MTRRs are set up after booting the 2.6.8 kernel:
 > 
 > # cat /proc/mtrr
 > reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=1
 > reg01: base=0x20000000 ( 512MB), size= 256MB: write-back, count=1
 > reg02: base=0x30000000 ( 768MB), size= 128MB: write-back, count=1
 > reg03: base=0x38000000 ( 896MB), size=  64MB: write-back, count=1
 > reg04: base=0x3c000000 ( 960MB), size=  32MB: write-back, count=1
 > reg05: base=0x3df80000 ( 991MB), size= 512KB: uncachable, count=1
 > reg06: base=0x4df80000 (1247MB), size= 512KB: uncachable, count=1
 > reg07: base=0xdc000000 (3520MB), size=   1MB: write-combining, count=1

That last MTRR is created by the vesafb. It doesn't size video memory,
but instead creates an MTRR big enough to cover xresolution * yresolution * depth
and then rounds down to the nearest alignment that is allowed for MTRRs.
(in your case 1MB).

 > With this configuration, Xorg (v6.8.1) logs this complaint at startup: 
 > 
 > (WW) RADEON(0): Failed to set up write-combining range (0xdc000000,0x2000000)

X sized the video memory, and has a better idea of what is going on.
In an ideal world, X could fix up suboptimal MTRR setups like this
by deleting the existing range.

Another way of working around it is to tell the vesafb not to set up an
mtrr at all. There is a boot command line option to tell it to do this iirc.

 > I can satisfy this complaint by manually adjusting the MTRR config 
 > prior to starting Xorg like this:
 > 
 > echo "disable=7" >| /proc/mtrr
 > echo "base=0xdc000000 size=0x2000000 type=write-combining" > /proc/mtrr
 
X should also do the right thing without the second command.
With MTRR 7 disabled, there will be a free MTRR available for X
to use.

		Dave

      reply	other threads:[~2004-09-23 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-23 14:53 Sub-optimal MTRR config in kernel 2.6.x Steve Snyder
2004-09-23 18:24 ` Dave Jones [this message]

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=20040923182449.GA7107@redhat.com \
    --to=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swsnyder@insightbb.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox