linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM kernel at memory offset 32MB
Date: Thu, 12 Mar 2015 20:06:42 +0000	[thread overview]
Message-ID: <20150312200642.GW8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <eff7abbdc559c19e63c928c8645205b8.squirrel@lightmail.glesys.com>

On Thu, Mar 12, 2015 at 05:08:21PM +0100, magnus at minimum.se wrote:
> 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?)

It's a balance between what various platforms require in terms of the
alignment of their physical memory, and what we can tolerate through
tricks such as what you're trying to do.

Let's take an example.  A platform has 128MB starting at 0xc8000000.
If we increase the alignment to 256MB, this means we decide that
physical memory starts at 0xc0000000, which would map that to
PAGE_OFFSET, which ultimately will crash the kernel on this platform.

If, on the other hand, we have someone who has decided that they want
to hand over the first 64MB of memory for another application (such
as what you're doing), they will be loading the kernel at 64MB + 32K.
If we reduced the alignment to 64M, it means that on that platform,
we then decide that physical memory magically starts 64MB higher
than it used to, again leading to problems.

So, we basically can't change it now - the risks are too great.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

      reply	other threads:[~2015-03-12 20:06 UTC|newest]

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

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=20150312200642.GW8656@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).