From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] arm64: export effective Image size to bootloaders
Date: Fri, 20 Jun 2014 11:17:17 +0100 [thread overview]
Message-ID: <20140620101717.GE30188@leverpostej> (raw)
In-Reply-To: <1403201268.17030.59.camel@smoke>
On Thu, Jun 19, 2014 at 07:07:48PM +0100, Geoff Levand wrote:
> Hi Mark,
>
> On Thu, 2014-06-19 at 11:25 +0100, Mark Rutland wrote:
> > I disagree that the bootloader _must_ have to deal with the endianness
> > of the kernel. If the user knows the endianness of the kernel and
> > provides a filesystem of the appropriate endianness, I don't see why the
> > bootloader should have to do anything differently. In most cases the
> > bootloader has no need to care.
>
> As I mentioned, I don't really care how this is fixed, but there will be
> bootloaders built as both big and little endian (kexec based ones for
> example), and so no matter what, bootloaders will need to deal with
> converting values.
Sure, bootloaders will need to convert values in some cases.
By having a fixed endian header format, whether or not you need to
byteswap values becomes a fixed property of the bootloader (i.e. whether
it is BE or not) rather than a dynamic property of the kernel Image. So
you only require a single path through your loader for BE and LE
kernels.
If you have constructs like LE64_TO_CPU available to your loader, then
it becomes trivial to write an endian-clean loader. The only pain is
having to test if image_size is non-zero first, but that test is
independent of endiannness.
Mark.
next prev parent reply other threads:[~2014-06-20 10:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 9:50 [PATCH 0/4] arm64: simplify restrictions on bootloaders Mark Rutland
2014-05-16 9:50 ` [PATCH 1/4] arm64: head.S: remove unnecessary function alignment Mark Rutland
2014-05-16 13:04 ` Christopher Covington
2014-05-20 16:20 ` Laura Abbott
2014-05-16 9:50 ` [PATCH 2/4] arm64: place initial page tables above the kernel Mark Rutland
2014-05-20 16:21 ` Laura Abbott
2014-05-16 9:50 ` [PATCH 3/4] arm64: export effective Image size to bootloaders Mark Rutland
2014-05-20 14:12 ` Tom Rini
2014-05-20 16:22 ` Laura Abbott
2014-06-16 20:27 ` Geoff Levand
2014-06-18 16:49 ` Mark Rutland
2014-06-18 18:27 ` Rob Herring
2014-06-18 18:41 ` Geoff Levand
2014-06-19 10:25 ` Mark Rutland
2014-06-19 18:07 ` Geoff Levand
2014-06-20 10:17 ` Mark Rutland [this message]
2014-06-18 18:56 ` Kevin Hilman
2014-06-18 23:03 ` [PATCH] arm64: Add byte order to image header Geoff Levand
2014-06-18 23:07 ` [PATCH] arm64: Add new file asm/image.h Geoff Levand
2014-05-16 9:50 ` [PATCH 4/4] arm64: Enable TEXT_OFFSET fuzzing Mark Rutland
2014-05-16 14:06 ` Catalin Marinas
2014-05-16 16:55 ` Mark Rutland
2014-05-20 14:11 ` Tom Rini
2014-05-20 16:08 ` Mark Rutland
2014-05-21 10:18 ` Mark Rutland
2014-05-20 11:31 ` [PATCH 0/4] arm64: simplify restrictions on bootloaders Ian Campbell
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=20140620101717.GE30188@leverpostej \
--to=mark.rutland@arm.com \
--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