summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-02-10 23:15:07 -0600
committerAaron Durbin <adurbin@chromium.org>2016-02-11 23:29:08 +0100
commit622eea7e815af39dbee290eddc487baab5e8a5f5 (patch)
treedd45122a65037ae0cefcbd1a39181f8b108a705a /src/arch
parent711455f24495d1616fff6ec93da11e5f7a863a8b (diff)
downloadcoreboot-622eea7e815af39dbee290eddc487baab5e8a5f5.tar.xz
arches: lib: add main_decl.h for main() declaration
It is silly to have a single header to declare the main() symbol, however some of the arches provided it while lib/bootblock.c relied on the arch headers to declare it. Just move the declaration into its own header file and utilize it. Change-Id: I743b4c286956ae047c17fe46241b699feca73628 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13681 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/include/arch/stages.h2
-rw-r--r--src/arch/arm64/include/arch/stages.h3
-rw-r--r--src/arch/mips/include/arch/stages.h2
-rw-r--r--src/arch/riscv/include/arch/stages.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/arch/arm/include/arch/stages.h b/src/arch/arm/include/arch/stages.h
index 2d20604589..68a3bd116d 100644
--- a/src/arch/arm/include/arch/stages.h
+++ b/src/arch/arm/include/arch/stages.h
@@ -16,7 +16,7 @@
#ifndef __ARCH_STAGES_H
#define __ARCH_STAGES_H
-extern void main(void);
+#include <main_decl.h>
void stage_entry(void);
diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h
index ce66cddd76..9a88ea7fbe 100644
--- a/src/arch/arm64/include/arch/stages.h
+++ b/src/arch/arm64/include/arch/stages.h
@@ -17,8 +17,7 @@
#define __ARCH_STAGES_H
#include <stdint.h>
-
-extern void main(void);
+#include <main_decl.h>
void stage_entry(void);
diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h
index 664c136bbf..802199f532 100644
--- a/src/arch/mips/include/arch/stages.h
+++ b/src/arch/mips/include/arch/stages.h
@@ -16,7 +16,7 @@
#ifndef __MIPS_ARCH_STAGES_H
#define __MIPS_ARCH_STAGES_H
-extern void main(void);
+#include <main_decl.h>
void stage_entry(void);
diff --git a/src/arch/riscv/include/arch/stages.h b/src/arch/riscv/include/arch/stages.h
index 07a72a4446..90bd60b9a6 100644
--- a/src/arch/riscv/include/arch/stages.h
+++ b/src/arch/riscv/include/arch/stages.h
@@ -16,7 +16,7 @@
#ifndef __ARCH_STAGES_H
#define __ARCH_STAGES_H
-extern void main(void);
+#include <main_decl.h>
void stage_entry(void) __attribute__((section(".text.stage_entry")));