public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <lkml@rtr.ca>
To: "Morrison, Tom" <tmorrison@empirix.com>
Cc: Mark Lord <liml@rtr.ca>, Robert Hancock <hancockr@shaw.ca>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	ide <linux-ide@vger.kernel.org>, Jeff Garzik <jeff@garzik.org>,
	Tejun Heo <htejun@gmail.com>
Subject: Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB (v3)
Date: Fri, 23 Nov 2007 15:40:08 -0500	[thread overview]
Message-ID: <47473AA8.2050908@rtr.ca> (raw)
In-Reply-To: <BD261180E6D35F4D9D32F3E44FD3D901053E8543@EMPBEDEX.empirix.com>

Mark wrote:
> Yeah, I kind of had your reports in mind when I asked that.  :)
> 
> On a related note, I now have lots of Marvell (sata_mv) hardware here,
> and an Intel CPU/chipset box with physical RAM above the 4GB boundary.

Morrison, Tom wrote:
> Yes, I believe that - otherwise, this problem would have
> been a crisis a LONG time ago...:-)
>  
> But I do have some more questions in relationship to how 
> things are mapped in your environment. I have a flat memory 
> map (i.e.: the full 0x0 -- 0x1_0000_0000 is passed to the 32bit 
> Linux kernel without any 'holes' and/or reserved areas).
>  
> Does your Intel memory map have this same type of flat memory 
> model (and thus allow use of the FULL lower 4Gig) - or does it 
> reserve areas of lower 4Gig for devices and such - if not - where 
> are these reserved areas - and how do the relate to the I/O memory
> map for the device?
>  
> In other words, I would be very interested in seeing the memory 
> map & the PCI memory mapping to see if any overlap/correspond 
> to reserve areas of lower 4 Gig (in a linux 32bit mode)...
...

I believe that only 2GB or so of the 4GB RAM appears below the 4GB boundary.
The rest is accessed above 4GB, using Intel's 36-bit PAE functionality.

I think what you want to see is /proc/mtrr, annotated below by me:

reg00: base=0x080000000 (2048MB), size=2048MB: uncachable, count=1  I/O space
reg01: base=0x000000000 (   0MB), size=4096MB: write-back, count=1  first 2GB of RAM + I/O space
reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1  third GB of RAM
reg03: base=0x140000000 (5120MB), size= 512MB: write-back, count=1  portion of 4th GB of RAM
reg04: base=0x160000000 (5632MB), size= 256MB: write-back, count=1  portion of 4th GB of RAM
reg05: base=0x170000000 (5888MB), size= 128MB: write-back, count=1  portion of 4th GB of RAM
reg06: base=0x178000000 (6016MB), size=  64MB: write-back, count=1  portion of 4th GB of RAM
reg07: base=0x0af800000 (2808MB), size=   8MB: uncachable, count=1  (?) dunno

>From that, the visible RAM should be 2048 + 1024 + 512 + 256 + 128 + 64 = 3968MB.
In /proc/meminfo, it reports MemTotal of 4067260kB, which divided by 1024 gives 3971MB.

The BIOS reports 4024MB.

But the MTRR values above do make it rather clear that nearly half the RAM
requires 33-bit physical addressing for access.

Cheers

  reply	other threads:[~2007-11-23 20:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23  2:04 [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB (v3) Robert Hancock
2007-11-23 15:22 ` Mark Lord
2007-11-23 17:30   ` Morrison, Tom
2007-11-23 17:46     ` Mark Lord
2007-11-23 18:47       ` Morrison, Tom
2007-11-23 20:40         ` Mark Lord [this message]
2007-11-24  0:13       ` Robert Hancock
2007-11-24  0:20         ` Jeff Garzik
2007-11-24  0:31           ` Robert Hancock
2007-11-24  2:48           ` Mark Lord
2007-11-24  5:12 ` Tejun Heo
2007-12-04 22:17 ` Jeff Garzik
2007-12-05  1:09   ` Robert Hancock
2007-12-28 21:37     ` Robert Hancock
2007-12-08 18:36   ` Robert Hancock
2007-12-17 11:44 ` shyam_iyer
2007-12-17 16:17   ` shyam_iyer
2007-12-18  2:50     ` Tejun Heo
2007-12-18  3:52     ` Tejun Heo
2007-12-18 10:22       ` Shyam_Iyer
2007-12-18 12:12         ` Shyam_Iyer
2007-12-20 11:15           ` shyam_iyer
2007-12-17 11:47 ` shyam_iyer

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=47473AA8.2050908@rtr.ca \
    --to=lkml@rtr.ca \
    --cc=hancockr@shaw.ca \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tmorrison@empirix.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