public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Brown <smb@700c.org>
To: "JA Magallón" <jamagallon@ono.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Accessing more than 2GB of memory with a 32 bit kernel
Date: Thu, 13 Jun 2013 23:38:22 +0100	[thread overview]
Message-ID: <1401958.8pblrLFpVU@phaedrus> (raw)
In-Reply-To: <51B8E926.3030504@ono.com>

On Wednesday 12 Jun 2013 23:33:26 JA Magallón wrote:
> On 06/12/2013 10:10 PM, Rik van Riel wrote:
> > On 06/12/2013 12:54 PM, Simon Brown wrote:
> >> Hello,
> >> 
> >> For the sake of an old prototype peripheral I'm using a non PAE 32 bit
> >> x86 kernel and I'm having trouble accessing memory above 2 GB. The
> >> system has 4GB installed and all is well with a PAE kernel.
> >> 
> >> I'm obviously expecting to lose some memory due to memory mapped devices
> >> but I wasn't expecting to lose 2GB. Instead I'm suspecting a BIOS bug.
> >> The system reports:
> >> free -m
> >> 
> >>               total       used       free     shared    buffers
> >>               cached
> >> 
> >> Mem:          2012        491       1521          0         40
> >> 277
> >> 
> >> The mtrr table looked odd so I enabled sanitisation:
> >> [    0.000000] original variable MTRRs
> >> [    0.000000] reg 0, base: 2GB, range: 2GB, type UC
> >> [    0.000000] reg 1, base: 0GB, range: 4GB, type WB
> >> [    0.000000] reg 2, base: 4GB, range: 2GB, type WB
> >> [    0.000000] total RAM covered: 4096M
> >> [    0.000000] Found optimal setting for mtrr clean up
> >> [    0.000000]  gran_size: 64K  chunk_size: 64K         num_reg: 2
> >> lose cover RAM: 0G
> >> [    0.000000] New variable MTRRs
> >> [    0.000000] reg 0, base: 0GB, range: 2GB, type WB
> >> [    0.000000] reg 1, base: 4GB, range: 2GB, type WB
> >> 
> >> I don't understand the gap in the new table.
> > 
> > Check the e820 table. Chances are the BIOS is reserving 2GB to
> > map various devices (especially video cards) below the 4GB limit.
> 
> Acording to manual, that mobo has an option to "Memory remap feature"
> in BIOS that looks like that...

I don't understand that option in the BIOS. If I disable the option the e820 
table is the same as before except missing the last line and the BIOS boot 
screen only reports 2GB. The choice seems to be map it high or lose it.

  [    0.000000] BIOS-provided physical RAM map:
  [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
  [    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
  [    0.000000]  BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
  [    0.000000]  BIOS-e820: 0000000000100000 - 000000007ff80000 (usable)
  [    0.000000]  BIOS-e820: 000000007ff80000 - 000000007ff8e000 (ACPI data)
  [    0.000000]  BIOS-e820: 000000007ff8e000 - 000000007ffe0000 (ACPI NVS)
  [    0.000000]  BIOS-e820: 000000007ffe0000 - 0000000080000000 (reserved)
  [    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
  [    0.000000]  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)

Apologies for the slow follow up,

Simon

  reply	other threads:[~2013-06-13 22:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 16:54 Accessing more than 2GB of memory with a 32 bit kernel Simon Brown
2013-06-12 17:35 ` JA Magallón
2013-06-12 20:10 ` Rik van Riel
2013-06-12 21:33   ` JA Magallón
2013-06-13 22:38     ` Simon Brown [this message]
2013-06-13 22:32   ` Simon Brown
2013-06-14  0:14     ` Rik van Riel
2013-06-14  0:31       ` Yinghai Lu

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=1401958.8pblrLFpVU@phaedrus \
    --to=smb@700c.org \
    --cc=jamagallon@ono.com \
    --cc=linux-kernel@vger.kernel.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