From 3b728486d25f2046d6b8a9be89a1d7c46bd6df42 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 17 Jul 2003 20:12:49 -0700 Subject: [PATCH] [PATCH] On v850, use a long jump to start_kernel This allows the low-level start code to be located far away from the rest of the kernel, which is sometimes necessary. --- arch/v850/kernel/head.S | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/v850/kernel/head.S b/arch/v850/kernel/head.S index 6fad68e5196dd..c490b937ef141 100644 --- a/arch/v850/kernel/head.S +++ b/arch/v850/kernel/head.S @@ -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 + * Copyright (C) 2001,02,03 NEC Electronics Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ C_ENTRY(start): 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) -- 2.53.0