From 1d6d45e3c98e16cbb86915483f771a7bf0e9a633 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 6 Nov 2009 17:02:51 +0000 Subject: Split the two usages of __ROMCC__: __ROMCC__ now means "Don't use prototypes, since romcc doesn't support them." __PRE_RAM__ means "Use simpler versions of functions, and no device tree." There are probably some places where both are tested, but only one is needed. Signed-off-by: Myles Watson Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4921 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/include/arch/cpu.h | 2 +- src/arch/i386/include/arch/hlt.h | 2 +- src/arch/i386/include/arch/io.h | 2 +- src/arch/i386/lib/console_print.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/i386') diff --git a/src/arch/i386/include/arch/cpu.h b/src/arch/i386/include/arch/cpu.h index f49b7cb50a..d43c847cef 100644 --- a/src/arch/i386/include/arch/cpu.h +++ b/src/arch/i386/include/arch/cpu.h @@ -104,7 +104,7 @@ static inline unsigned int cpuid_edx(unsigned int op) #define X86_VENDOR_SIS 10 #define X86_VENDOR_UNKNOWN 0xff -#if !defined( __ROMCC__ ) && defined( __GNUC__) +#if !defined( __ROMCC__ ) && !defined(__PRE_RAM__) && defined( __GNUC__) #include diff --git a/src/arch/i386/include/arch/hlt.h b/src/arch/i386/include/arch/hlt.h index 3b2acf1eef..931e933fc7 100644 --- a/src/arch/i386/include/arch/hlt.h +++ b/src/arch/i386/include/arch/hlt.h @@ -1,7 +1,7 @@ #ifndef ARCH_HLT_H #define ARCH_HLT_H -#if defined( __ROMCC__) && !defined(__GNUC__) +#if defined( __ROMCC__) && !defined(__PRE_RAM__) && !defined(__GNUC__) static void hlt(void) { __builtin_hlt(); diff --git a/src/arch/i386/include/arch/io.h b/src/arch/i386/include/arch/io.h index 07d091328a..59af68c203 100644 --- a/src/arch/i386/include/arch/io.h +++ b/src/arch/i386/include/arch/io.h @@ -9,7 +9,7 @@ * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" * versions of the single-IO instructions (inb_p/inw_p/..). */ -#if defined( __ROMCC__ ) && !defined (__GNUC__) +#if defined( __ROMCC__ ) && !defined (__GNUC__) static inline void outb(uint8_t value, uint16_t port) { __builtin_outb(value, port); diff --git a/src/arch/i386/lib/console_print.c b/src/arch/i386/lib/console_print.c index ed807e6064..661dc41dcb 100644 --- a/src/arch/i386/lib/console_print.c +++ b/src/arch/i386/lib/console_print.c @@ -66,7 +66,7 @@ static void __console_tx_string(int loglevel, const char *str) * set in some auto.c files to trigger the simple device_t version to be used. * So __GNUCC__ does the right thing here. */ -#if defined (__GNUCC__) +#if defined (__ROMCC__) #define STATIC #else #define STATIC static -- cgit v1.2.3