linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][v850]  On v850, use a long jump to start_kernel
@ 2003-07-18  9:45 Miles Bader
  0 siblings, 0 replies; only message in thread
From: Miles Bader @ 2003-07-18  9:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Linus, please apply.

This allows the low-level start code to be located far away from the
rest of the kernel, which is sometimes necessary.

diff -ruN -X../cludes linux-2.6.0-test1-moo/arch/v850/kernel/head.S linux-2.6.0-test1-moo-v850-20030718/arch/v850/kernel/head.S
--- linux-2.6.0-test1-moo/arch/v850/kernel/head.S	2003-06-16 14:52:16.000000000 +0900
+++ linux-2.6.0-test1-moo-v850-20030718/arch/v850/kernel/head.S	2003-07-15 19:06:36.000000000 +0900
@@ -1,8 +1,8 @@
 /*
  * arch/v850/kernel/head.S -- Lowest-level startup code
  *
- *  Copyright (C) 2001,02  NEC Corporation
- *  Copyright (C) 2001,02  Miles Bader <miles@gnu.org>
+ *  Copyright (C) 2001,02,03  NEC Electronics Corporation
+ *  Copyright (C) 2001,02,03  Miles Bader <miles@gnu.org>
  *
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file COPYING in the main directory of this
@@ -115,7 +115,14 @@
 	jarl	CSYM(memset), lp
 #endif
 
-	// Start Linux kernel.
+	// What happens if the main kernel function returns (it shouldn't)
 	mov	hilo(CSYM(machine_halt)), lp
-	jr	CSYM(start_kernel)
+
+	// Start the linux kernel.  We use an indirect jump to get extra
+	// range, because on some platforms this initial startup code
+	// (and the associated platform-specific code in mach_early_init)
+	// are located far away from the main kernel, e.g. so that they
+	// can initialize RAM first and copy the kernel or something.
+	mov	hilo(CSYM(start_kernel)), r12
+	jmp	[r12]
 C_END(start)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-18  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18  9:45 [PATCH][v850] On v850, use a long jump to start_kernel Miles Bader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).