Commit f7e79056 authored by Deepak Saxena's avatar Deepak Saxena

[ARM] Switch CPU to BE mode before uncompressing when running BE

This is needed for certain systems (IXP2000,IXP1200) where the bootloader 
switches back to LE before jumping into the kernel or when we are trying
to boot a BE kernel from an LE bootloader.
Signed-off-by: default avatarDeepak Saxena <dsaxena@plexity.net>
parent 14287c83
......@@ -51,6 +51,10 @@ ifeq ($(CONFIG_DEBUG_ICEDCC),y)
OBJS += ice-dcc.o
endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
OBJS += big-endian.o
endif
#
# We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
......
/*
* linux/arch/arm/boot/compressed/big-endian.S
*
* Switch CPU into big endian mode.
* Author: Nicolas Pitre
*/
.section ".start", #alloc, #execinstr
mrc p15, 0, r0, c1, c0, 0 @ read control reg
orr r0, r0, #(1 << 7) @ enable big endian mode
mcr p15, 0, r0, c1, c0, 0 @ write control reg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment