summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/mips/bootblock.S2
-rw-r--r--src/arch/mips/bootblock_simple.c5
-rw-r--r--src/lib/Makefile.inc3
-rw-r--r--src/mainboard/emulation/qemu-power8/bootblock.c4
-rw-r--r--src/soc/nvidia/tegra124/bootblock.c5
-rw-r--r--src/soc/nvidia/tegra124/bootblock_asm.S2
-rw-r--r--src/soc/nvidia/tegra210/bootblock.c5
-rw-r--r--src/soc/nvidia/tegra210/bootblock_asm.S2
8 files changed, 18 insertions, 10 deletions
diff --git a/src/arch/mips/bootblock.S b/src/arch/mips/bootblock.S
index 849c168fd0..f8049c96d4 100644
--- a/src/arch/mips/bootblock.S
+++ b/src/arch/mips/bootblock.S
@@ -33,7 +33,7 @@ _start:
addi $t0, $t0, 4
/* Run main */
- b main
+ b mips_main
/*
* Should never return from main. Make sure there is no branch in the
diff --git a/src/arch/mips/bootblock_simple.c b/src/arch/mips/bootblock_simple.c
index 84029ebedb..e195b6ac85 100644
--- a/src/arch/mips/bootblock_simple.c
+++ b/src/arch/mips/bootblock_simple.c
@@ -19,7 +19,10 @@
#include <halt.h>
#include <program_loading.h>
-void main(void)
+/* called from assembly in bootblock.S */
+void mips_main(void);
+
+void mips_main(void)
{
bootblock_cpu_init();
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index f0738eef4e..3fad0b8fb6 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -32,10 +32,7 @@ decompressor-y += memcmp.c
decompressor-y += prog_ops.c
decompressor-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y)
bootblock-y += bootblock.c
-endif
-
bootblock-y += prog_loaders.c
bootblock-y += prog_ops.c
bootblock-y += cbfs.c
diff --git a/src/mainboard/emulation/qemu-power8/bootblock.c b/src/mainboard/emulation/qemu-power8/bootblock.c
index bf918cfa9f..ec30c879f1 100644
--- a/src/mainboard/emulation/qemu-power8/bootblock.c
+++ b/src/mainboard/emulation/qemu-power8/bootblock.c
@@ -17,10 +17,12 @@
#include <console/console.h>
#include <program_loading.h>
+void qemu_power8_main(void);
+
/* The qemu part of all this is very, very non-hardware like.
* So it gets its own bootblock.
*/
-void main(void)
+void qemu_power8_main(void)
{
if (CONFIG(BOOTBLOCK_CONSOLE)) {
console_init();
diff --git a/src/soc/nvidia/tegra124/bootblock.c b/src/soc/nvidia/tegra124/bootblock.c
index c7503041b4..1793aaf3de 100644
--- a/src/soc/nvidia/tegra124/bootblock.c
+++ b/src/soc/nvidia/tegra124/bootblock.c
@@ -26,6 +26,9 @@
#include <timestamp.h>
#include <vendorcode/google/chromeos/chromeos.h>
+/* called from assembly in bootblock_asm.S */
+void tegra124_main(void);
+
static void run_next_stage(void *entry)
{
ASSERT(entry);
@@ -41,7 +44,7 @@ static void run_next_stage(void *entry)
clock_halt_avp();
}
-void main(void)
+void tegra124_main(void)
{
// enable pinmux clamp inputs
clamp_tristate_inputs();
diff --git a/src/soc/nvidia/tegra124/bootblock_asm.S b/src/soc/nvidia/tegra124/bootblock_asm.S
index 0391ebf1ac..dca5314dc9 100644
--- a/src/soc/nvidia/tegra124/bootblock_asm.S
+++ b/src/soc/nvidia/tegra124/bootblock_asm.S
@@ -66,5 +66,5 @@ call_bootblock:
* Thumb. However, "b" will not and GCC may attempt to create a
* wrapper which is currently broken.
*/
- bl main
+ bl tegra124_main
ENDPROC(_start)
diff --git a/src/soc/nvidia/tegra210/bootblock.c b/src/soc/nvidia/tegra210/bootblock.c
index 96fb9b22d5..383e578eeb 100644
--- a/src/soc/nvidia/tegra210/bootblock.c
+++ b/src/soc/nvidia/tegra210/bootblock.c
@@ -31,6 +31,9 @@
#define ODMDATA_OFFSET_IN_BCT 0x508
#define TEGRA_SRAM_MAX (TEGRA_SRAM_BASE + TEGRA_SRAM_SIZE)
+/* called from assembly in bootblock_asm.S */
+void tegra210_main(void);
+
static void save_odmdata(void)
{
struct tegra_pmc_regs *pmc = (struct tegra_pmc_regs*)TEGRA_PMC_BASE;
@@ -155,7 +158,7 @@ static void mbist_workaround(void)
}
}
-void main(void)
+void tegra210_main(void)
{
// enable JTAG at the earliest stage
enable_jtag();
diff --git a/src/soc/nvidia/tegra210/bootblock_asm.S b/src/soc/nvidia/tegra210/bootblock_asm.S
index 62554422db..6ea154abab 100644
--- a/src/soc/nvidia/tegra210/bootblock_asm.S
+++ b/src/soc/nvidia/tegra210/bootblock_asm.S
@@ -37,5 +37,5 @@ ENTRY(_start)
*/
msr cpsr_cxf, #0xdf
- stack_init stack_top=_estack stack_bottom=_stack seed=1 func=main
+ stack_init stack_top=_estack stack_bottom=_stack seed=1 func=tegra210_main
ENDPROC(_start)