[coreboot-gerrit] New patch to review for coreboot: include/bootblock_common.h: Provide comon prototype for main()

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Thu Jan 21 22:55:49 CET 2016


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13120

-gerrit

commit f7f91a35685a3d4dc7af1d120a0116296ae643da
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Thu Jan 21 13:28:43 2016 -0800

    include/bootblock_common.h: Provide comon prototype for main()
    
    For the common bootblock, main() is implemented in lib/, but the
    prototype for main() was available from arch-specific headers. This is
    a layering violation, so move the declaration to bootblock_common.h.
    
    Change-Id: I436b830538cc3d9a079859bfb560fb2bad9b842a
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 src/arch/arm/include/arch/stages.h   | 2 --
 src/arch/arm64/include/arch/stages.h | 2 --
 src/arch/mips/include/arch/stages.h  | 2 --
 src/arch/riscv/include/arch/stages.h | 2 --
 src/include/bootblock_common.h       | 3 +++
 5 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/arch/arm/include/arch/stages.h b/src/arch/arm/include/arch/stages.h
index ef4658e..d006707 100644
--- a/src/arch/arm/include/arch/stages.h
+++ b/src/arch/arm/include/arch/stages.h
@@ -16,8 +16,6 @@
 #ifndef __ARCH_STAGES_H
 #define __ARCH_STAGES_H
 
-extern void main(void);
-
 void stage_entry(void);
 void stage_exit(void *);
 
diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h
index 6dbf389..3a43c2b 100644
--- a/src/arch/arm64/include/arch/stages.h
+++ b/src/arch/arm64/include/arch/stages.h
@@ -18,8 +18,6 @@
 
 #include <stdint.h>
 
-extern void main(void);
-
 void stage_entry(void);
 void stage_exit(void *);
 void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size);
diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h
index 71132e3..a3db505 100644
--- a/src/arch/mips/include/arch/stages.h
+++ b/src/arch/mips/include/arch/stages.h
@@ -16,8 +16,6 @@
 #ifndef __MIPS_ARCH_STAGES_H
 #define __MIPS_ARCH_STAGES_H
 
-extern void main(void);
-
 void stage_entry(void);
 void stage_exit(void *);
 
diff --git a/src/arch/riscv/include/arch/stages.h b/src/arch/riscv/include/arch/stages.h
index d07983e..4a08f24 100644
--- a/src/arch/riscv/include/arch/stages.h
+++ b/src/arch/riscv/include/arch/stages.h
@@ -16,8 +16,6 @@
 #ifndef __ARCH_STAGES_H
 #define __ARCH_STAGES_H
 
-extern void main(void);
-
 void stage_entry(void) __attribute__((section(".text.stage_entry")));
 void stage_exit(void *);
 void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size);
diff --git a/src/include/bootblock_common.h b/src/include/bootblock_common.h
index 1acbef4..0f7dfae 100644
--- a/src/include/bootblock_common.h
+++ b/src/include/bootblock_common.h
@@ -16,6 +16,9 @@
 #ifndef __BOOTBLOCK_COMMON_H
 #define __BOOTBLOCK_COMMON_H
 
+/* The bootblock main() function */
+void main(void);
+
 /* These are defined as weak no-ops that can be overridden by mainboard/SoC. */
 void bootblock_mainboard_early_init(void);
 void bootblock_mainboard_init(void);



More information about the coreboot-gerrit mailing list