linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Florian Boelstler <euphoria@arcor.de>
To: linuxppc-embedded@ozlabs.org
Subject: Reserving small amounts of memory with mem= (MPC85xx, 2.6.15 arch/ppc)
Date: Thu, 12 Jun 2008 18:18:26 +0200	[thread overview]
Message-ID: <g2ri8j$qlk$1@ger.gmane.org> (raw)

Hi,

I ran into problems reserving small amounts of memory using command line 
argument 'mem'.
Limiting a MPC8540 with 512MB physical available memory down to 256MB 
has been successfully done using U-Boot:

=> setenv bootargs console=ttyS0,115200 mem=256M
=> setenv initrd_high 10000000
=> bootm 0x02100000

## Booting image at 02100000 ...
    Image Name:   Linux 2.6.15
    Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
    Data Size:    6965022 Bytes =  6.6 MB
    Load Address: 00000000
    Entry Point:  00000000
    Contents:
    Image 0:  1099550 Bytes =  1 MB
    Image 1:  5865458 Bytes =  5.6 MB
    Verifying Checksum ... OK
    Uncompressing Multi-File Image ... OK
[...]
    Loading Ramdisk to 0fa68000, end 0ffffff2 ... OK

Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.15 (flo@escape) (gcc version 3.4.3) #21 PREEMPT Fri 
Nov 30 16:47:32 CET 2007
[...]

root@mpc0:/# cat /proc/meminfo
MemTotal:       257272 kB
MemFree:        226332 kB
[...]

When a larger size for 'mem' (say 508M for reserving 4M) and appropriate 
'initrd_high' is used, U-Boot is still able to load the ramdisk to its 
correct place in RAM. However Linux seems to not accept that memory 
region and removes the memory using mem_pieces_remove(), which leads to 
a crash since it cannot access area used for the ramdisk(?).
In that case output of "residual" for CAM mapping shows a value != 0.

My assumption is that these CAM mappings cannot be used for memory 
portions less than a certain size.
I need to dig into that, please correct me if I'm wrong.

Linux 2.6.15 build for arch/ppc on custom MPC8540 board (Linux BSP 
similar to MPC8540ads). U-Boot 1.2.0.

Thanks for any suggestions.

   Florian

             reply	other threads:[~2008-06-12 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 16:18 Florian Boelstler [this message]
2008-06-12 19:14 ` Reserving small amounts of memory with mem= (MPC85xx, 2.6.15 arch/ppc) Sylvain Joyeau
2008-06-13 14:30   ` Florian Boelstler
2008-06-13 15:31     ` Scott Wood
2008-06-16 14:26       ` Florian Boelstler

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='g2ri8j$qlk$1@ger.gmane.org' \
    --to=euphoria@arcor.de \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).