summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/boot/start.S')
-rw-r--r--arch/mips/boot/start.S21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index e937e89af1..6efe03e98d 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -1,20 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Startup Code for MIPS CPU
*
* Copyright (C) 2011, 2015 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#include <asm/pbl_macros.h>
@@ -27,6 +15,10 @@ EXPORT(_start)
mips_barebox_10h
+ /* save dtb pointer */
+ move s0, a0
+ move s1, a1
+
/* disable watchpoints */
mtc0 zero, CP0_WATCHLO
mtc0 zero, CP0_WATCHHI
@@ -37,6 +29,9 @@ EXPORT(_start)
stack_setup
+ /* restore dtb pointer */
+ move a0, s0
+ move a1, s1
la v0, main_entry
jal v0
nop