Skip to contentSkip to conversation

exynos: Support big endian mode in secondary_startup

PATCH New Mark Brown 2 participants 4 messages Jul 21, 2014 – Jul 29, 2014

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 exynos: Support big endian mode in secondary_startup

From: Victor Kamensky <[email protected]>

Exynos processors generally operate in little endian mode so their bootloader and ROM will almost always operate in little endian mode. This means that if a big endian kernel is run it must switch the CPU into big endian mode after gaining control.

The generic secondary_startup that is called from exynos specific secondary startup code will do the switch, but we need it to do earlier because exynos specific secondary_startup code which runs first also works with data that is big endian when the kernel is compiled for big endian.

[Rewrote commit message. -- broonie]

---
 arch/arm/mach-exynos/headsmp.S | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-exynos/headsmp.S +5 -0
index b54f9701e421..ac8364efb985 100644
@@ -18,6 +18,11 @@
  * ready for them to initialise.
  */
 ENTRY(exynos4_secondary_startup)
+	/*
+	 * ROM code operates in little endian mode, when we get control we
+	 * need to switch it to big endian mode.
+	 */
+ARM_BE8(setend	be)
 	mrc	p15, 0, r0, c0, c0, 5
 	and	r0, r0, #15
 	adr	r4, 1f
Signature · 1 line
2.0.1
#1 lore raw

PATCH 1/1 exynos: Support big endian mode in secondary_startup

Quoted 14 lines · Mark Brown

From: Victor Kamensky <[email protected]>

Exynos processors generally operate in little endian mode so their bootloader and ROM will almost always operate in little endian mode. This means that if a big endian kernel is run it must switch the CPU into big endian mode after gaining control.

The generic secondary_startup that is called from exynos specific secondary startup code will do the switch, but we need it to do earlier because exynos specific secondary_startup code which runs first also works with data that is big endian when the kernel is compiled for big endian.

Quoted 4 lines

[Rewrote commit message. -- broonie]

Hi Mark,

Basically, I have no objection on this, BTW is there any requirement to support big endian on exynos stuff? Just wondering...

Thanks,
Kukjin

Quoted 22 lines
---
 arch/arm/mach-exynos/headsmp.S | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-exynos/headsmp.S +5 -1
index b54f9701e421..ac8364efb985 100644
@@ -18,6 +18,11 @@
  * ready for them to initialise.
  */
 ENTRY(exynos4_secondary_startup)
+	/*
+	 * ROM code operates in little endian mode, when we get control we
+	 * need to switch it to big endian mode.
+	 */
+ARM_BE8(setend	be)
 	mrc	p15, 0, r0, c0, c0, 5
 	and	r0, r0, #15
 	adr	r4, 1f
--

2.0.1

author
#2 lore raw

PATCH 1/1 exynos: Support big endian mode in secondary_startup

Quoted 2 lines · Kukjin Kim

Basically, I have no objection on this, BTW is there any requirement to support big endian on exynos stuff? Just wondering...

We've been using it for testing within Linaro. I don't know of any real
world users.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140725/d9825cfb/attachment.sig>

#3 lore raw

PATCH 1/1 exynos: Support big endian mode in secondary_startup

Quoted 8 lines · Mark Brown
Quoted 2 lines · Kukjin Kim

Basically, I have no objection on this, BTW is there any requirement to support big endian on exynos stuff? Just wondering...

We've been using it for testing within Linaro. I don't know of any real world users.

Mark, OK I see. I will apply.

Thanks,
Kukjin