2 * linux/arch/arm/boot/compressed/head-sa1100.S
4 * Copyright (C) 1999 Nicolas Pitre <nico@cam.org>
6 * SA1100 specific tweaks. This is merged with head.S by the linker.
9 #include <linux/config.h>
12 .section ".start", #alloc, #execinstr
14 #ifndef CONFIG_ARCH_SA1100
15 #error What am I doing here...
18 #ifdef CONFIG_SA1100_BRUTUS
19 @ need to enter SVC mode
20 #define angel_SWIreason_EnterSVC 0x17 /* from arm.h, in angel source */
21 #define angel_SWI_ARM (0xEF123456 & 0xffffff)
22 mov r0, #angel_SWIreason_EnterSVC
25 @ turn off interrupts to prevent the angel from running
31 #ifdef CONFIG_SA1100_VICTOR
32 @ Copy cmdline to 0xc0000000
36 1: ldrneb r2, [r0], #1
42 @ Data cache might be active.
43 @ Be sure to flush kernel binary out of the cache,
44 @ whatever state it is, before it is turned off.
45 @ This is done by fetching through currently executed
46 @ memory to be sure we hit the same cache.
48 add r3, r2, #0x4000 @ 16 kb is quite enough...
52 mcr p15, 0, r0, c7, c10, 4 @ drain WB
53 mcr p15, 0, r0, c7, c7, 0 @ flush I & D caches
55 @ disabling MMU, enabling I cache
56 mrc p15, 0, r0, c1, c0, 0 @ read control reg
57 bic r0, r0, #0x0d @ clear WB, DC, MMU
58 orr r0, r0, #0x1000 @ set Icache
59 mcr p15, 0, r0, c1, c0, 0
61 @ set registers for entry