From 1ab202795532cdce155e42738d84e77a3e77ceb2 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 26 May 2014 17:38:23 +1000 Subject: Intel: Add common header file for CAR setup When passing '-ffreestanding' the 'main' romstage.c may no longer necessarily be considered the entry point. From the C specification in 5.1.2.1 Freestanding environment; "In a freestanding environment (in which C program execution may take place without any benefit of an operating system), the name and type of the function called at program startup are implementation-defined." Clang complains about these being missing as Clang is somewhat more strict about the spec than GNU/GCC is. An advantage here is that a different entry-point type-signature shall now be warned about at compile time. Change-Id: I467001adabd47958c30c9a15e3248e42ed1151f3 Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/5872 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/mainboard/lenovo/t520/romstage.c | 1 + src/mainboard/lenovo/t530/romstage.c | 1 + src/mainboard/lenovo/t60/romstage.c | 1 + src/mainboard/lenovo/x201/romstage.c | 1 + src/mainboard/lenovo/x230/romstage.c | 2 +- src/mainboard/lenovo/x60/romstage.c | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mainboard/lenovo') diff --git a/src/mainboard/lenovo/t520/romstage.c b/src/mainboard/lenovo/t520/romstage.c index 548c040086..df460922f2 100644 --- a/src/mainboard/lenovo/t520/romstage.c +++ b/src/mainboard/lenovo/t520/romstage.c @@ -108,6 +108,7 @@ static void rcba_config(void) RCBA32(BUC) = 0; } +#include void main(unsigned long bist) { int boot_mode = 0; diff --git a/src/mainboard/lenovo/t530/romstage.c b/src/mainboard/lenovo/t530/romstage.c index d65031adba..b2cd6163c4 100644 --- a/src/mainboard/lenovo/t530/romstage.c +++ b/src/mainboard/lenovo/t530/romstage.c @@ -109,6 +109,7 @@ static void rcba_config(void) RCBA32(BUC) = 0; } +#include void main(unsigned long bist) { int boot_mode = 0; diff --git a/src/mainboard/lenovo/t60/romstage.c b/src/mainboard/lenovo/t60/romstage.c index 1e2b72d6b7..01e48e7042 100644 --- a/src/mainboard/lenovo/t60/romstage.c +++ b/src/mainboard/lenovo/t60/romstage.c @@ -206,6 +206,7 @@ static void early_ich7_init(void) RCBA32(0x2034) = reg32; } +#include void main(unsigned long bist) { u32 reg32; diff --git a/src/mainboard/lenovo/x201/romstage.c b/src/mainboard/lenovo/x201/romstage.c index aa2c36710d..5f8e291692 100644 --- a/src/mainboard/lenovo/x201/romstage.c +++ b/src/mainboard/lenovo/x201/romstage.c @@ -215,6 +215,7 @@ static void set_fsb_frequency(void) smbus_block_write(0x69, 0, 5, block); } +#include void main(unsigned long bist) { u32 reg32; diff --git a/src/mainboard/lenovo/x230/romstage.c b/src/mainboard/lenovo/x230/romstage.c index 8c82e61539..1705003454 100644 --- a/src/mainboard/lenovo/x230/romstage.c +++ b/src/mainboard/lenovo/x230/romstage.c @@ -148,7 +148,7 @@ init_usb (void) outw (0x0000, DEFAULT_PMBASE | 0x003c); } - +#include void main(unsigned long bist) { int s3resume = 0; diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c index d1f8f640a2..68a9b48937 100644 --- a/src/mainboard/lenovo/x60/romstage.c +++ b/src/mainboard/lenovo/x60/romstage.c @@ -213,6 +213,7 @@ static void early_ich7_init(void) RCBA32(0x2034) = reg32; } +#include void main(unsigned long bist) { u32 reg32; -- cgit v1.2.3