From: <patrice.chotard@st.com>
To: <linux@armlinux.org.uk>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: <vikas.manocha@st.com>, <patrice.chotard@st.com>,
<patrick.delaunay@st.com>, <christophe.kerello@st.com>,
<christophe.priouzeau@st.com>
Subject: [PATCH 1/1] ARM: compressed/head.S: fix __nop macro rept number for ARMv7M
Date: Tue, 25 Apr 2017 11:01:33 +0200 [thread overview]
Message-ID: <1493110893-21857-1-git-send-email-patrice.chotard@st.com> (raw)
From: Patrice Chotard <patrice.chotard@st.com>
In zImage, _magic_sig is located at offset 0x24.
But for ARMv7M architecture which enable CPU_THUMBONLY
and !EFI_STUB kernel flag, _magic_sig is located at offset 0x14
00000000 00 46 00 46 00 46 00 46 00 46 00 46 00 46 0f f2 |.F.F.F.F.F.F.F.ò|
00000010 15 0c 60 47 18 28 6f 01 00 00 00 00 28 5c 0e 00 |..`G.(o.....(\..|
00000020 01 02 03 04 0f 46 90 46 00 00 00 00 00 00 00 00 |.....F.F........|
Reproduced with stm32_defconfig with XIP_KERNEL flag disabled.
To restore correct _magic_sig offset at 0x24, we add 8 additional
"mov r0, r0" instruction.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
arch/arm/boot/compressed/head.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 9150f97..5d9cda3 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -127,7 +127,8 @@
AR_CLASS( .arm )
start:
.type start,#function
- .rept 7
+ ARM( .rept 7)
+ THUMB( .rept 15)
__nop
.endr
ARM( mov r0, r0 )
--
1.9.1
next reply other threads:[~2017-04-25 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 9:01 patrice.chotard [this message]
2017-05-12 7:22 ` Patrice CHOTARD
2017-05-18 11:16 ` Ard Biesheuvel
2017-05-19 13:41 ` Patrice CHOTARD
2017-05-23 1:06 ` Vikas MANOCHA
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=1493110893-21857-1-git-send-email-patrice.chotard@st.com \
--to=patrice.chotard@st.com \
--cc=christophe.kerello@st.com \
--cc=christophe.priouzeau@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=patrick.delaunay@st.com \
--cc=vikas.manocha@st.com \
/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
all inboxes | Powered by JetHome®