patch-2.4.22 linux-2.4.22/arch/arm/kernel/head-armv.S
Next file: linux-2.4.22/arch/arm/kernel/irq-arch.c
Previous file: linux-2.4.22/arch/arm/kernel/entry-header.S
Back to the patch index
Back to the overall index
- Lines: 85
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/arm/kernel/head-armv.S
- Orig date:
2001-10-11 09:04:57.000000000 -0700
diff -urN linux-2.4.21/arch/arm/kernel/head-armv.S linux-2.4.22/arch/arm/kernel/head-armv.S
@@ -52,17 +52,22 @@
.endm
/*
- * Kernel startup entry point.
+ * Kernel startup entry point.
+ * ---------------------------
*
- * The rules are:
- * r0 - should be 0
- * r1 - unique architecture number
- * MMU - off
- * I-cache - on or off
- * D-cache - off
+ * This is normally called from the decompressor code. The requirements
+ * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
+ * r1 = machine nr.
*
- * See linux/arch/arm/tools/mach-types for the complete list of numbers
- * for r1.
+ * This code is mostly position independent, so if you link the kernel at
+ * 0xc0008000, you call this at __pa(0xc0008000).
+ *
+ * See linux/arch/arm/tools/mach-types for the complete list of machine
+ * numbers for r1.
+ *
+ * We're trying to keep crap to a minimum; DO NOT add any machine specific
+ * crap here - that's what the boot loader (or in extreme, well justified
+ * circumstances, zImage) is for.
*/
.section ".text.init",#alloc,#execinstr
.type stext, #function
@@ -143,7 +148,6 @@
.type __switch_data, %object
__switch_data: .long __mmap_switched
- .long SYMBOL_NAME(compat)
.long SYMBOL_NAME(__bss_start)
.long SYMBOL_NAME(_end)
.long SYMBOL_NAME(processor_id)
@@ -151,28 +155,33 @@
.long SYMBOL_NAME(cr_alignment)
.long SYMBOL_NAME(init_task_union)+8192
+/*
+ * Enable the MMU. This completely changes the structure of the visible
+ * memory space. You will not be able to trace execution through this.
+ * If you have an enquiry about this, *please* check the linux-arm-kernel
+ * mailing list archives BEFORE sending another post to the list.
+ */
.type __ret, %function
__ret: ldr lr, __switch_data
mcr p15, 0, r0, c1, c0
- mov r0, r0
+ mrc p15, 0, r0, c1, c0, 0 @ read it back.
mov r0, r0
mov r0, r0
mov pc, lr
- /*
- * This code follows on after the page
- * table switch and jump above.
- *
- * r0 = processor control register
- * r1 = machine ID
- * r9 = processor ID
- */
+/*
+ * The following fragment of code is executed with the MMU on, and uses
+ * absolute addresses; this is not position independent.
+ *
+ * r0 = processor control register
+ * r1 = machine ID
+ * r9 = processor ID
+ */
.align 5
__mmap_switched:
adr r3, __switch_data + 4
- ldmia r3, {r2, r4, r5, r6, r7, r8, sp}@ r2 = compat
+ ldmia r3, {r4, r5, r6, r7, r8, sp}@ r2 = compat
@ sp = stack pointer
- str r12, [r2]
mov fp, #0 @ Clear BSS (and zero fp)
1: cmp r4, r5
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)