linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Joel Fernandes <joelf@ti.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Christopher Covington <cov@codeaurora.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: Change of TEXT_OFFSET for multi_v7_defconfig
Date: Thu, 17 Apr 2014 16:18:45 -0500	[thread overview]
Message-ID: <CAL_JsqL65bXBh1_dcud6XaDqFBnY1L69dMXWeNHvFAvcDizzhQ@mail.gmail.com> (raw)
In-Reply-To: <20140417201645.GU24070@n2100.arm.linux.org.uk>

On Thu, Apr 17, 2014 at 3:16 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Apr 17, 2014 at 04:06:16PM -0400, Nicolas Pitre wrote:
>> On Thu, 17 Apr 2014, Rob Herring wrote:
>> > Better yet, we should adopt the arm64 Image header which has this and
>> > other fields for arm Image files. We're going to have to deal with raw
>> > Image (and Image.gz) in bootloaders for arm64, so we might as well
>> > align things.
>>
>> We could use the same header as ARM64 if we want to add more information
>> to the uncompressed kernel image.
>>
>> However I really don't want to encourage the proliferation of yet
>> another kernel image formats on ARM32.  We've had zImage for the last 20
>> years and that's what ARM32 bootloaders should support.  The
>> introduction of the uImage format caused enough pain already.
>>
>> Booting uncompressed kernel image on ARM32 may be useful for some
>> debugging setups.  I don't see other cases where it would be legitimate
>> to break existing practices.
>
> Me neither.  We even have good enough reasons (such as the issue in this
> thread to do with where the image should be placed) no longer support
> uncompressed images anymore.  (Yes, they'll still be generated because
> we need the input to compress them, but we should stop advertising them
> as a make target.)

The problem here is more than just the TEXT_OFFSET changed. From what
I've heard, there are some QC chips which need much more reserved RAM
than the 2MB discussed here. Changing the TEXT_OFFSET is a hack that
doesn't scale.

A simple issue is you are now wasting 2MB of low memory on every
platform. Not such a big deal I guess. But what if more is needed?

The zImage requires that the kernel be placed at a 128M aligned
address plus TEXT_OFFSET. The v2p patching then requires the kernel to
be located within the first 16MB of RAM. So the Image can only ever be
placed at 0x8000 - 15.?MB from a 128MB aligned address. You can never
have the first 16-127MB of RAM reserved. The only way to have reserved
memory (in chucks of 16MB) is by loading an Image file directly
instead. The bootloaders will know the start of RAM and any reserved
memory size because they can simply parse DT.

Bootloaders are going to have to change for arm64 Image support
anyway, so we should have an aligned solution here.

Rob

  reply	other threads:[~2014-04-17 21:18 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 10:44 Change of TEXT_OFFSET for multi_v7_defconfig Daniel Thompson
2014-04-15 17:53 ` Stephen Boyd
2014-04-16 16:18 ` Christopher Covington
2014-04-16 19:14   ` Nicolas Pitre
2014-04-16 21:08     ` Christopher Covington
2014-04-16 21:36       ` Peter Maydell
2014-04-16 22:34         ` Russell King - ARM Linux
2014-04-16 22:33       ` Russell King - ARM Linux
2014-04-16 23:21       ` Nicolas Pitre
2014-04-17 18:33         ` Christopher Covington
2014-04-17 19:48           ` Nicolas Pitre
2014-04-17 20:49             ` Christopher Covington
2014-04-17 20:54               ` Peter Maydell
2014-04-17 20:35           ` Jason Gunthorpe
2014-04-22  9:44             ` Daniel Thompson
2014-04-22 17:05               ` Jason Gunthorpe
2014-04-22 17:55                 ` Nicolas Pitre
2014-04-22 18:36                   ` Russell King - ARM Linux
2014-04-22 14:50             ` Michal Simek
2014-04-22 17:00               ` [Qemu-devel] " Jason Gunthorpe
2014-04-22 17:11               ` Russell King - ARM Linux
2014-04-22 17:53                 ` Jason Gunthorpe
2014-04-22 18:12                   ` Russell King - ARM Linux
2014-04-22 18:32                   ` Arnd Bergmann
2014-04-22 18:38                     ` Russell King - ARM Linux
2014-04-22 18:45                       ` Arnd Bergmann
2014-04-17 17:11     ` Rob Herring
2014-04-17 20:06       ` Nicolas Pitre
2014-04-17 20:16         ` Russell King - ARM Linux
2014-04-17 21:18           ` Rob Herring [this message]
2014-04-17 21:35             ` Russell King - ARM Linux
2014-04-18  2:53               ` Rob Herring
2014-04-18  4:34                 ` Nicolas Pitre
2014-04-22 10:26                   ` Daniel Thompson
2014-04-22 10:40                     ` Russell King - ARM Linux
2014-04-22 11:41                       ` Daniel Thompson
2014-04-18  8:41                 ` Russell King - ARM Linux
2014-04-22  9:53               ` Daniel Thompson
2014-04-22 10:07                 ` 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=CAL_JsqL65bXBh1_dcud6XaDqFBnY1L69dMXWeNHvFAvcDizzhQ@mail.gmail.com \
    --to=robherring2@gmail.com \
    --cc=cov@codeaurora.org \
    --cc=daniel.thompson@linaro.org \
    --cc=galak@codeaurora.org \
    --cc=joelf@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sboyd@codeaurora.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).