mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andi Kleen <ak@muc.de>, David Hinds <dhinds@sonic.net>,
	linux-kernel@vger.kernel.org
Subject: Re: PCI memory allocation bug with CONFIG_HIGHMEM
Date: 06 Jan 2004 15:56:34 -0700	[thread overview]
Message-ID: <m17k04n0t9.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0401051937510.2653@home.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> On Tue, 6 Jan 2004, Andi Kleen wrote:
> > 
> > IMHO the only reliable way to get physical bus space for mappings
> > is to allocate some memory and map the mapping over that.
> 
> You literally can't do that: the RAM addresses are decoded by the 
> northbridge before they ever hit the PCI bus, so it's impossible to "map 
> over" RAM in general. 

On AMD cpus starting at least with the K7 it is a cpu function.  They
have both memory access and IO access FSB cycles.  The cpu decodes the
address by looking at the IORRS and TOP_MEM (IO range registers are
similar to mtrrs but for specifying IO regions).  

Of course there are some northbridges that don't ignore the mem/io
bits..
 
> Normally, the way this works is that there are magic northbridge mapping
> registers that remap part of the memory, 
So far I have only seen this on the intel E7500 and it's descendants.

> so that the memory that is
> physically in the upper 4GB of RAM shows up somewhere else (or just
> possibly disappears entirely
Having the memory disappear entirely is much more common.

>  - once you have more than 4GB of RAM, you
> might not care too much about a few tens of megs missing).

At least not until you plug in a card with a 256M pci memory region
and loose half a gig of RAM.

There is also the trick of just not mapping the RAM into the address
space in a contiguous fashion.  I have been very tempted lately to
just setup boxes with one dimm below 4G and have all of the rest above
to make this easier.  But 32bit OS's and the performance hit
they take when accesses memory above 4G to make this a good idea yet.

Eric

  parent reply	other threads:[~2004-01-06 23:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1aJdi-7TH-25@gated-at.bofh.it>
2004-01-06  3:32 ` Andi Kleen
2004-01-06  3:40   ` Linus Torvalds
2004-01-06  4:05     ` Andi Kleen
2004-01-06  5:04       ` Linus Torvalds
2004-01-06  8:12         ` Andi Kleen
2004-01-06  9:11           ` Mika Penttilä
2004-01-06  9:44             ` Andi Kleen
2004-01-06 10:16               ` Mika Penttilä
2004-01-06 10:49                 ` Andi Kleen
2004-01-06 15:27               ` Linus Torvalds
2004-01-06 15:37                 ` Andi Kleen
2004-01-06 15:48                   ` Linus Torvalds
2004-01-06 22:29                     ` Adam Belay
2004-01-07  4:06                       ` Linus Torvalds
2004-01-07  5:02                         ` Andi Kleen
2004-01-07  5:55                           ` Dave Jones
2004-01-07  6:06                             ` Linus Torvalds
2004-01-07  6:08                               ` Dave Jones
2004-01-07  6:45                                 ` Linus Torvalds
2004-01-07  6:51                             ` Andi Kleen
2004-01-07  2:43                               ` Adam Belay
2004-01-07  8:32                       ` Helge Hafting
2004-01-06 22:45                   ` Eric W. Biederman
2004-01-07  0:06                     ` Linus Torvalds
2004-01-07  4:58                       ` Eric W. Biederman
2004-01-07  5:32                         ` Linus Torvalds
2004-01-07 15:53                           ` Eric W. Biederman
2004-01-07 16:32                             ` Linus Torvalds
2004-01-07 17:32                               ` Eric W. Biederman
2004-01-08 19:34                               ` Eric W. Biederman
2004-01-07  9:31                         ` Russell King
2004-01-07 15:06                           ` Eric W. Biederman
2004-01-07 20:29                             ` Russell King
2004-01-06 22:56     ` Eric W. Biederman [this message]
2004-01-05 20:07 David Hinds
2004-01-05 23:00 ` Russell King
2004-01-05 23:45   ` David Hinds
2004-01-06  0:36 ` Linus Torvalds
2004-01-06  0:44   ` David Hinds
2004-01-06  1:11     ` Linus Torvalds
2004-01-06  1:41       ` Linus Torvalds

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=m17k04n0t9.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@muc.de \
    --cc=dhinds@sonic.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®