summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/main_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/boot/main_entry.c')
-rw-r--r--arch/mips/boot/main_entry.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 43a78c2956..84325da93a 100644
--- a/arch/mips/boot/main_entry.c
+++ b/arch/mips/boot/main_entry.c
@@ -1,21 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2012 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 as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * 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 <init.h>
#include <common.h>
#include <string.h>
#include <memory.h>
@@ -27,7 +15,7 @@
extern void handle_reserved(void);
-void main_entry(void);
+void main_entry(void *fdt, u32 fdt_size);
unsigned long exception_handlers[32];
@@ -71,12 +59,15 @@ static void trap_init(void)
write_c0_status(read_c0_status() & ~ST0_BEV);
}
+extern void *glob_fdt;
+extern u32 glob_fdt_size;
+
/**
* Called plainly from assembler code
*
* @note The C environment isn't initialized yet
*/
-void main_entry(void)
+void __bare_init main_entry(void *fdt, u32 fdt_size)
{
/* clear the BSS first */
memset(__bss_start, 0x00, __bss_stop - __bss_start);
@@ -94,5 +85,8 @@ void main_entry(void)
mem_malloc_init((void *)MALLOC_BASE,
(void *)(MALLOC_BASE + MALLOC_SIZE - 1));
+ glob_fdt = fdt;
+ glob_fdt_size = fdt_size;
+
start_barebox();
}