linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: magnus@minimum.se (magnus at minimum.se)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM kernel at memory offset 32MB
Date: Thu, 12 Mar 2015 17:08:21 +0100	[thread overview]
Message-ID: <eff7abbdc559c19e63c928c8645205b8.squirrel@lightmail.glesys.com> (raw)

Hi,

I'm trying to run my kernel at an offset of 32 MB in order to reserve the
first 32 MB for an AMP application. I'm using a Xilinx Zynq-7000 where
Linux boots both CPU cores, then brings down CPU #1 and loads a
"baremetal"/AMP application onto it. This app then lives in the first 32
MB of the memory.

I've been able to run the kernel at offset 128 MB, and it correctly
ignores memory below PHYS_OFFSET. If I change it to any offset below 128
MB, the kernel snaps back to running at offset 0x0.

It seems like CONFIG_AUTO_ZRELADDR is what adjusts the load adress here;
and I noticed the alignment is hardcoded to 128 MB. Is this a hardware
limitation (can't we run a kernel at any offset between 0 and 128 MB?)

I tried changing the alignment in arch/arm/boot/compression/head.S and it
seems to work, but I feel like I'm on really thin ice here. I also tried
disabling CONFIG_AUTO_ZRELADDR, but it seems like my arch depend on it..?

Is it completely insane to try to reserve memory in front of the kernel?
Should I just go ahead and reserve memory after the kernel instead?

best regards, Magnus

             reply	other threads:[~2015-03-12 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 16:08 magnus at minimum.se [this message]
2015-03-12 20:06 ` ARM kernel at memory offset 32MB Russell King - ARM Linux

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=eff7abbdc559c19e63c928c8645205b8.squirrel@lightmail.glesys.com \
    --to=magnus@minimum.se \
    --cc=linux-arm-kernel@lists.infradead.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).