patch-2.4.0-test7 linux/arch/arm/boot/compressed/head.S
Next file: linux/arch/arm/boot/compressed/hw-bse.c
Previous file: linux/arch/arm/boot/compressed/head-sa1100.S
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Sun Aug 13 09:54:15 2000
- Orig file:
v2.4.0-test6/linux/arch/arm/boot/compressed/head.S
- Orig date:
Fri Jun 23 21:55:07 2000
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/head.S linux/arch/arm/boot/compressed/head.S
@@ -3,9 +3,9 @@
*
* Copyright (C) 1996-1999 Russell King
*/
+#include <linux/config.h>
#include <linux/linkage.h>
-
/*
* Debugging stuff
*/
@@ -84,18 +84,31 @@
b 1f
.word 0x016f2818 @ Magic numbers to help the loader
.word start
-1:
+1: mov r7, r1 @ save architecture ID
+ mov r8, r0 @ save r0
+#ifdef CONFIG_ANGELBOOT
+ /*
+ * Booting from Angel - need to enter SVC mode and disable
+ * FIQs/IRQs (numeric definitions from angel arm.h source)
+ */
+ mov r0, #0x17 @ angel_SWIreason_EnterSVC
+ swi 0x123456 @ angel_SWI_ARM
+ mrs r0, cpsr @ turn off interrupts to
+ orr r0, r0, #0xc0 @ prevent angel from running
+ msr cpsr_c, r0
+
+ /*
+ * Note that some cache flushing and other stuff may
+ * be needed here - is there an Angel SWI call for this?
+ */
+#endif
/*
* some architecture specific code can be inserted
- * by the linker here, but it should preserve r0, r1
- * and r8.
+ * by the linker here, but it should preserve r7 and r8.
*/
.text
-1: teq r0, #0
- bne 1b
- mov r7, r1 @ save architecture ID
- mrc p15, 0, r6, c0, c0 @ get processor ID
+1: mrc p15, 0, r6, c0, c0 @ get processor ID
adr r2, LC0
ldmia r2, {r2, r3, r4, r5, sp}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)