linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] ARM: fixup head for atag verification
Date: Fri, 30 Aug 2013 20:17:58 +0100	[thread overview]
Message-ID: <1377890281-10757-3-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1377890281-10757-1-git-send-email-ben.dooks@codethink.co.uk>

If we booted LE but running BE8, ensure we read ATAGs data from head code
in the correct mode.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 arch/arm/kernel/head-common.S |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 47cd974..94e0434 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -21,6 +21,12 @@
 #define OF_DT_MAGIC 0xedfe0dd0 /* 0xd00dfeed in big-endian */
 #endif
 
+#ifdef CONFIG_CPU_BE8_BOOT_LE
+#define BE8_LE(x...)	x
+#else
+#define BE8_LE(x...)
+#endif
+
 /*
  * Exception handling.  Something went wrong and we can't proceed.  We
  * ought to tell the user, but since we don't have any guarantee that
@@ -53,10 +59,12 @@ __vet_atags:
 	cmp	r5, r6
 	beq	2f
 #endif
+BE8_LE(	rev	r5, r5 )
 	cmp	r5, #ATAG_CORE_SIZE		@ is first tag ATAG_CORE?
 	cmpne	r5, #ATAG_CORE_SIZE_EMPTY
 	bne	1f
 	ldr	r5, [r2, #4]
+BE8_LE(	rev	r5, r5 )
 	ldr	r6, =ATAG_CORE
 	cmp	r5, r6
 	bne	1f
-- 
1.7.10.4

  parent reply	other threads:[~2013-08-30 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 19:17 3.11-rc7 big endian - atags and bootloader updates Ben Dooks
2013-08-30 19:17 ` [PATCH 1/5] ARM: add CPU_BE8_BOOT_LE configuration Ben Dooks
2013-08-30 19:17 ` Ben Dooks [this message]
2013-08-30 19:17 ` [PATCH 3/5] ARM: add atag32_to_cpu() function Ben Dooks
2013-08-30 19:18 ` [PATCH 4/5] ARM: update atag-to-fdt code to be endian agnostic Ben Dooks
2013-08-30 19:18 ` [PATCH 5/5] ARM: ensure loader information in LE format for BE kernels Ben Dooks

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=1377890281-10757-3-git-send-email-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.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).