[coreboot-gerrit] New patch to review for coreboot: f2bd5dd Get rid of a number of __GNUC__ checks
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu May 9 23:35:28 CEST 2013
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3226
-gerrit
commit f2bd5dd12e00647fc4cd0c1f8b2bcb1f3c52f8f7
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Thu May 9 14:33:14 2013 -0700
Get rid of a number of __GNUC__ checks
In the process of streamlining coreboot code and getting
rid of unneeded ifdefs, drop a number of unneeded checks
for the GNU C compiler. This also cleans up x86emu/types.h
significantly by dropping all the duplicate types in there.
Change-Id: I0bf289e149ed02e5170751c101adc335b849a410
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/device/oprom/include/x86emu/types.h | 47 ++-----------------------------
src/include/cpu/amd/amdfam12.h | 6 ----
src/include/cpu/amd/multicore.h | 4 ---
src/northbridge/amd/amdk8/incoherent_ht.c | 2 --
src/northbridge/intel/i3100/i3100.h | 2 --
src/southbridge/via/vt8237r/vt8237r.h | 10 +------
6 files changed, 4 insertions(+), 67 deletions(-)
diff --git a/src/device/oprom/include/x86emu/types.h b/src/device/oprom/include/x86emu/types.h
index 5485eea..bb6dab44 100644
--- a/src/device/oprom/include/x86emu/types.h
+++ b/src/device/oprom/include/x86emu/types.h
@@ -36,54 +36,13 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.4 2000/09/26 15:56:44 tsi Exp $ */
-
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
-//#ifndef IN_MODULE
-//#include <sys/types.h>
-//#endif
-
-/*
- * The following kludge is an attempt to work around typedef conflicts with
- * <sys/types.h>.
- */
-#define u8 x86emuu8
-#define u16 x86emuu16
-#define u32 x86emuu32
-#define u64 x86emuu64
-#define s8 x86emus8
-#define s16 x86emus16
-#define s32 x86emus32
-#define s64 x86emus64
-#define uint x86emuuint
-#define sint x86emusint
-
-/*---------------------- Macros and type definitions ----------------------*/
-
-/* Currently only for Linux/32bit */
-#if defined(__GNUC__) && !defined(NO_LONG_LONG)
-#define __HAS_LONG_LONG__
-#endif
-
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned int u32;
-#ifdef __HAS_LONG_LONG__
-typedef unsigned long long u64;
-#endif
-
-typedef signed char s8;
-typedef signed short s16;
-typedef signed int s32;
-#ifdef __HAS_LONG_LONG__
-typedef signed long long s64;
-#endif
-
-typedef unsigned int uint;
-typedef signed int sint;
+#include <stdint.h>
+typedef unsigned int uint;
+typedef signed int sint;
typedef u16 X86EMU_pioAddr;
#endif /* __X86EMU_TYPES_H */
diff --git a/src/include/cpu/amd/amdfam12.h b/src/include/cpu/amd/amdfam12.h
index 9ad84bd..5252e89 100644
--- a/src/include/cpu/amd/amdfam12.h
+++ b/src/include/cpu/amd/amdfam12.h
@@ -33,12 +33,6 @@
#define CPU_ID_FEATURES_MSR 0xC0011004
#define CPU_ID_EXT_FEATURES_MSR 0xC0011005
-//#if defined(__GNUC__)
-//// it can be used to get unitid and coreid it running only
-//struct node_core_id get_node_core_id(u32 nb_cfg_54);
-//struct node_core_id get_node_core_id_x(void);
-//#endif
-
#if defined(__PRE_RAM__)
void wait_all_core0_started(void);
void wait_all_other_cores_started(u32 bsp_apicid);
diff --git a/src/include/cpu/amd/multicore.h b/src/include/cpu/amd/multicore.h
index e06725a..c871223 100644
--- a/src/include/cpu/amd/multicore.h
+++ b/src/include/cpu/amd/multicore.h
@@ -20,20 +20,16 @@
#ifndef CPU_AMD_QUADCORE_H
#define CPU_AMD_QUADCORE_H
-#if defined(__GNUC__)
u32 read_nb_cfg_54(void);
-#endif
struct node_core_id {
u32 nodeid;
u32 coreid;
};
-#if defined(__GNUC__)
// it can be used to get unitid and coreid it running only
struct node_core_id get_node_core_id(u32 nb_cfg_54);
struct node_core_id get_node_core_id_x(void);
-#endif
#if !defined(__PRE_RAM__)
struct device;
diff --git a/src/northbridge/amd/amdk8/incoherent_ht.c b/src/northbridge/amd/amdk8/incoherent_ht.c
index ee1945a..6cbe7dc 100644
--- a/src/northbridge/amd/amdk8/incoherent_ht.c
+++ b/src/northbridge/amd/amdk8/incoherent_ht.c
@@ -699,9 +699,7 @@ static int ht_setup_chains(uint8_t ht_c_num)
}
-#if defined (__GNUC__)
static inline unsigned get_nodes(void);
-#endif
#if CONFIG_RAMINIT_SYSINFO
static void ht_setup_chains_x(struct sys_info *sysinfo)
diff --git a/src/northbridge/intel/i3100/i3100.h b/src/northbridge/intel/i3100/i3100.h
index 7305714..2d036bd 100644
--- a/src/northbridge/intel/i3100/i3100.h
+++ b/src/northbridge/intel/i3100/i3100.h
@@ -67,8 +67,6 @@
#define RCBA 0xF0
#define DEFAULT_RCBA 0xFEA00000
-#ifdef __GNUC__
int bios_reset_detected(void);
-#endif
#endif
diff --git a/src/southbridge/via/vt8237r/vt8237r.h b/src/southbridge/via/vt8237r/vt8237r.h
index 3cca58d..ee5cc82 100644
--- a/src/southbridge/via/vt8237r/vt8237r.h
+++ b/src/southbridge/via/vt8237r/vt8237r.h
@@ -28,11 +28,7 @@
#define VT8237R_SMBUS_IO_BASE 0x400
/* 0x0 disabled, 0x2 reserved, 0xf = IRQ15 */
#define VT8237R_ACPI_IRQ 0x9
-#if defined(__GNUC__)
-#define VT8237S_SPI_MEM_BASE 0xfed02000ULL
-#else
#define VT8237S_SPI_MEM_BASE 0xfed02000UL
-#endif
/* PMBASE FIXME mostly taken from ich7 */
#define PM1_STS 0x00
@@ -129,11 +125,7 @@ struct vt8237_network_rom {
u8 cfg_c;
u8 cfg_d;
u8 checksum;
-}
-#if defined(__GNUC__)
-__attribute__ ((packed))
-#endif
-;
+} __attribute__ ((packed));
#define MAINBOARD_POWER_OFF 0
#define MAINBOARD_POWER_ON 1
More information about the coreboot-gerrit
mailing list