patch-2.3.99-pre7 linux/arch/ppc/kernel/head.S

Next file: linux/arch/ppc/kernel/head_8xx.S
Previous file: linux/arch/ppc/kernel/gemini_setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
@@ -1274,6 +1274,7 @@
 	ori	r3,r3,start_secondary@l
 	mtspr	SRR0,r3
 	mtspr	SRR1,r4
+	SYNC
 	rfi
 #endif /* CONFIG_SMP */
 
@@ -1436,7 +1437,7 @@
 	tlbsync			/* ... on all CPUs */
 	sync
 #endif
-	
+
 	bl	load_up_mmu
 
 /* Set up for using our exception vectors */
@@ -1543,6 +1544,28 @@
 	mtspr	DBAT1U,r3
 	mtspr	IBAT1U,r3
 	blr
+#endif
+
+#ifdef CONFIG_8260
+/* Jump into the system reset for the rom.
+ * We first disable the MMU, and then jump to the ROM reset address.
+ *
+ * r3 is the board info structure, r4 is the location for starting.
+ * I use this for building a small kernel that can load other kernels,
+ * rather than trying to write or rely on a rom monitor that can tftp load.
+ */
+       .globl  m8260_gorom
+m8260_gorom:
+       li      r5,MSR_KERNEL & ~(MSR_IR|MSR_DR)
+       lis     r6,2f@h
+       addis   r6,r6,-KERNELBASE@h
+       ori     r6,r6,2f@l
+       mtspr   SRR0,r6
+       mtspr   SRR1,r5
+       rfi
+2:
+       mtlr    r4
+       blr
 #endif
 	
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)