From: varada@codeaurora.org (Varadarajan Narayanan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Set proper TEXT_OFFSET for IPQ806x
Date: Fri, 21 Aug 2015 10:29:18 +0530 [thread overview]
Message-ID: <20150821045918.GB26963@codeaurora.org> (raw)
In-Reply-To: <20150820195455.GT7557@n2100.arm.linux.org.uk>
On Thu, Aug 20, 2015 at 08:54:55PM +0100, Russell King - ARM Linux wrote:
> On Thu, Aug 20, 2015 at 12:20:10PM -0500, Andy Gross wrote:
> > On Thu, Aug 20, 2015 at 02:00:06PM +0100, Russell King - ARM Linux wrote:
> > > On Thu, Aug 20, 2015 at 05:45:41PM +0530, Varadarajan Narayanan wrote:
> > > > RAM starts at 0x40000000 for IPQ. The lower 21MB of RAM is used
> > > > for Shared Memory and the kernel can start from 0x41500000.
> > >
> > > Why do people keep creating crap like this? Each time something like
> > > this is created, it means that you _need_ to have a special kernel for
> > > your platform and you can't be part of the single zImage.
> > >
> > > Please, rather than creating crap like this, find a better way.
> >
> > In the case of the IPQ, we don't use the zImage because the decompress
> > requires a larger jump than we can do on that platform. Having this
> > change at least gets us back 2MB of memory.
>
> Your argument about "a larger jump" makes no sense what so ever. The
> branches between the decompressor and the main kernel are all done
> using a mov, which can jump to any 32-bit address.
>
> Even if you load the compressed kernel image at 0x41500000, the
> decompressor will mask that with 0xf8000000, and decide that RAM
> starts at 0x40000000. It will then want to place the decompressed
> kernel image at 0x40008000. Nothing there has anything to do with
> jump ranges.
With the qcom_defconfig, the kernel gets loaded at
0x40008000. This region is reserved for NSS.
> The only restriction that the ARM has as far as jump ranges are
> concerned is the 'b' or 'bl' instruction, which in ARM mode is
> limited to +/- 32MB. That doesn't apply here since we don't use
> that to jump between the decompressor and the decompressed kernel
> image.
>
> So...
>
> Why is it necessary to have this 21MB block of shared memory at
> the start of RAM? Why can't it be reserved by other means higher
> up in system memory?
The NSS subsystem needs memory to be reserved at 0x40000000.
The Ubi32 cores (part of NSS) need low address memory close
to the Ubi32 address space to do short calls from what is
called Ubi32 On Chip Memory to DDR and back again. Since
there isn't a way to circumvent this restriction had to
reserve at 0x40000000.
-Varada
> It's up to the submitter to justify why any change is required, and
> in this case, part of that justification is why the shared memory is
> placed at the start of RAM, and why you need to be different from
> almost everyone else, and why you need to be a special case. The
> justification also must make sense.
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2015-08-21 4:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 12:15 [PATCH] ARM: Set proper TEXT_OFFSET for IPQ806x Varadarajan Narayanan
2015-08-20 13:00 ` Russell King - ARM Linux
2015-08-20 17:20 ` Andy Gross
2015-08-20 19:54 ` Russell King - ARM Linux
2015-08-21 4:59 ` Varadarajan Narayanan [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=20150821045918.GB26963@codeaurora.org \
--to=varada@codeaurora.org \
--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).