summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/main_entry.c
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2012-05-22 16:16:59 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-23 18:47:53 +0200
commit6a1e9a7c9b384d80c6977f2a1d5682a4e9e39de1 (patch)
tree5366942ab8bca2bdbe6e872a4324aa58003ff83d /arch/mips/boot/main_entry.c
parent10ea54dc508f170d251b31c7c2e163298a414653 (diff)
downloadbarebox-6a1e9a7c9b384d80c6977f2a1d5682a4e9e39de1.tar.gz
barebox-6a1e9a7c9b384d80c6977f2a1d5682a4e9e39de1.tar.xz
MIPS: introduce C architecture-specific low-level init
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/boot/main_entry.c')
-rw-r--r--arch/mips/boot/main_entry.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
new file mode 100644
index 0000000000..76fa492ca9
--- /dev/null
+++ b/arch/mips/boot/main_entry.c
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include <common.h>
+#include <string.h>
+#include <asm/sections.h>
+
+extern void start_barebox(void);
+
+void main_entry(void);
+
+/**
+ * Called plainly from assembler code
+ *
+ * @note The C environment isn't initialized yet
+ */
+void main_entry(void)
+{
+ /* clear the BSS first */
+ memset(__bss_start, 0x00, __bss_stop - __bss_start);
+
+ start_barebox();
+}