From 348a1ba589c784f8b15d7179b2d9488c2c31ccb6 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 17 Mar 2010 01:51:11 +0000 Subject: [PATCH] fix a couple of warnings Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5236 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/include/arch/romcc_io.h | 6 +++--- src/cpu/x86/smm/Makefile.inc | 2 +- src/cpu/x86/smm/smihandler.c | 2 -- src/cpu/x86/smm/smiutil.c | 4 +++- src/include/cpu/x86/smm.h | 4 ++++ src/include/cpu/x86/tsc.h | 2 +- src/mainboard/kontron/986lcd-m/mainboard.c | 2 ++ src/mainboard/kontron/986lcd-m/mainboard_smi.c | 1 + src/southbridge/intel/i82801dx/i82801dx_smihandler.c | 4 ++-- src/southbridge/intel/i82801gx/i82801gx_smihandler.c | 4 ++-- 10 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/arch/i386/include/arch/romcc_io.h b/src/arch/i386/include/arch/romcc_io.h index 738af667eb..d69d4541bc 100644 --- a/src/arch/i386/include/arch/romcc_io.h +++ b/src/arch/i386/include/arch/romcc_io.h @@ -273,7 +273,7 @@ static inline __attribute__((always_inline)) void pci_write_config32(device_t de } #define PCI_DEV_INVALID (0xffffffffU) -static device_t pci_io_locate_device(unsigned pci_id, device_t dev) +static inline device_t pci_io_locate_device(unsigned pci_id, device_t dev) { for(; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) { unsigned int id; @@ -285,7 +285,7 @@ static device_t pci_io_locate_device(unsigned pci_id, device_t dev) return PCI_DEV_INVALID; } -static device_t pci_locate_device(unsigned pci_id, device_t dev) +static inline device_t pci_locate_device(unsigned pci_id, device_t dev) { for(; dev <= PCI_DEV(255|(((1< $(obj)/cpu/x86/smm/smm.map + $(NM) -n $(obj)/cpu/x86/smm/smm.elf | sort > $(obj)/cpu/x86/smm/smm.map $(OBJCOPY) -O binary $(obj)/cpu/x86/smm/smm.elf $(obj)/cpu/x86/smm/smm $(obj)/cpu/x86/smm/smm_bin.c: $(obj)/cpu/x86/smm/smm diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c index 00cae1005f..7254d55eab 100644 --- a/src/cpu/x86/smm/smihandler.c +++ b/src/cpu/x86/smm/smihandler.c @@ -25,8 +25,6 @@ #include #include -void southbridge_smi_set_eos(void); - typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore; /* SMI multiprocessing semaphore */ diff --git a/src/cpu/x86/smm/smiutil.c b/src/cpu/x86/smm/smiutil.c index 1baaecf2a1..9a2dfa599e 100644 --- a/src/cpu/x86/smm/smiutil.c +++ b/src/cpu/x86/smm/smiutil.c @@ -102,7 +102,8 @@ void console_tx_byte(unsigned char byte) uart_tx_byte(byte); } -void uart_init(void) +#if CONFIG_DEBUG_SMI +static void uart_init(void) { /* disable interrupts */ outb(0x0, CONFIG_TTYS0_BASE + UART_IER); @@ -114,6 +115,7 @@ void uart_init(void) outb((CONFIG_TTYS0_DIV >> 8) & 0xFF, CONFIG_TTYS0_BASE + UART_DLM); outb(UART_LCS, CONFIG_TTYS0_BASE + UART_LCR); } +#endif void console_init(void) { diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index a014ee0e55..2954ecd1f7 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -250,10 +250,14 @@ typedef struct { /* SMI handler function prototypes */ +void smi_handler(u32 smm_revision); + void io_trap_handler(int smif); int southbridge_io_trap_handler(int smif); int mainboard_io_trap_handler(int smif); +void southbridge_smi_set_eos(void); + void __attribute__((weak)) cpu_smi_handler(unsigned int node, smm_state_save_area_t *state_save); void __attribute__((weak)) northbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save); void __attribute__((weak)) southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save); diff --git a/src/include/cpu/x86/tsc.h b/src/include/cpu/x86/tsc.h index 9177d53818..5531993f7d 100644 --- a/src/include/cpu/x86/tsc.h +++ b/src/include/cpu/x86/tsc.h @@ -7,7 +7,7 @@ struct tsc_struct { }; typedef struct tsc_struct tsc_t; -static tsc_t rdtsc(void) +static inline tsc_t rdtsc(void) { tsc_t res; __asm__ __volatile__ ( diff --git a/src/mainboard/kontron/986lcd-m/mainboard.c b/src/mainboard/kontron/986lcd-m/mainboard.c index d3608ef822..180df992e6 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -21,7 +21,9 @@ #include #include #include +#if CONFIG_PCI_OPTION_ROM_RUN_YABEL #include +#endif #include #include #include diff --git a/src/mainboard/kontron/986lcd-m/mainboard_smi.c b/src/mainboard/kontron/986lcd-m/mainboard_smi.c index 2090bccece..192648f5ca 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard_smi.c +++ b/src/mainboard/kontron/986lcd-m/mainboard_smi.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "../../../southbridge/intel/i82801gx/i82801gx_nvs.h" /* The southbridge SMI handler checks whether gnvs has a diff --git a/src/southbridge/intel/i82801dx/i82801dx_smihandler.c b/src/southbridge/intel/i82801dx/i82801dx_smihandler.c index 9994429a2f..eda2691ecf 100644 --- a/src/southbridge/intel/i82801dx/i82801dx_smihandler.c +++ b/src/southbridge/intel/i82801dx/i82801dx_smihandler.c @@ -588,10 +588,10 @@ static void southbridge_smi_monitor(unsigned int node, smm_state_save_area_t *st #undef IOTRAP } -typedef void (*smi_handler)(unsigned int node, +typedef void (*smi_handler_t)(unsigned int node, smm_state_save_area_t *state_save); -smi_handler southbridge_smi[32] = { +smi_handler_t southbridge_smi[32] = { NULL, // [0] reserved NULL, // [1] reserved NULL, // [2] BIOS_STS diff --git a/src/southbridge/intel/i82801gx/i82801gx_smihandler.c b/src/southbridge/intel/i82801gx/i82801gx_smihandler.c index 38e3304374..9cd0370cdc 100644 --- a/src/southbridge/intel/i82801gx/i82801gx_smihandler.c +++ b/src/southbridge/intel/i82801gx/i82801gx_smihandler.c @@ -568,10 +568,10 @@ static void southbridge_smi_monitor(unsigned int node, smm_state_save_area_t *st #undef IOTRAP } -typedef void (*smi_handler)(unsigned int node, +typedef void (*smi_handler_t)(unsigned int node, smm_state_save_area_t *state_save); -smi_handler southbridge_smi[32] = { +smi_handler_t southbridge_smi[32] = { NULL, // [0] reserved NULL, // [1] reserved NULL, // [2] BIOS_STS