fix a couple of warnings
authorStefan Reinauer <stepan@coresystems.de>
Wed, 17 Mar 2010 01:51:11 +0000 (01:51 +0000)
committerStefan Reinauer <stepan@openbios.org>
Wed, 17 Mar 2010 01:51:11 +0000 (01:51 +0000)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5236 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/arch/i386/include/arch/romcc_io.h
src/cpu/x86/smm/Makefile.inc
src/cpu/x86/smm/smihandler.c
src/cpu/x86/smm/smiutil.c
src/include/cpu/x86/smm.h
src/include/cpu/x86/tsc.h
src/mainboard/kontron/986lcd-m/mainboard.c
src/mainboard/kontron/986lcd-m/mainboard_smi.c
src/southbridge/intel/i82801dx/i82801dx_smihandler.c
src/southbridge/intel/i82801gx/i82801gx_smihandler.c

index 738af667eb5b7e61985a6084a747fa28c6fcf21a..d69d4541bcb743274ac41a6a70a495dbe11fb917 100644 (file)
@@ -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<<CONFIG_PCI_BUS_SEGN_BITS)-1)<<8), 31, 7); dev += PCI_DEV(0,0,1)) {
                unsigned int id;
@@ -297,7 +297,7 @@ static device_t pci_locate_device(unsigned pci_id, device_t dev)
        return PCI_DEV_INVALID;
 }
 
-static device_t pci_locate_device_on_bus(unsigned pci_id, unsigned bus)
+static inline device_t pci_locate_device_on_bus(unsigned pci_id, unsigned bus)
 {
        device_t dev, last;
 
index 014c2c792d886e7cdbf6fe3cdf7df88b801f1974..36eb23a5d8f88ff0bc9302b20aad44380ded67c4 100644 (file)
@@ -32,7 +32,7 @@ $(obj)/cpu/x86/smm/smm.o: $(smmobjs) $(obj)/console/printk.o $(obj)/console/vtxp
 
 $(obj)/cpu/x86/smm/smm: $(obj)/cpu/x86/smm/smm.o $(src)/cpu/x86/smm/smm.ld $(obj)/ldoptions
        $(CC) $(LDFLAGS) -nostdlib -nostartfiles -static -o $(obj)/cpu/x86/smm/smm.elf -T $(src)/cpu/x86/smm/smm.ld $(obj)/cpu/x86/smm/smm.o
-       $(CONFIG_CROSS_COMPILE)nm -n $(obj)/cpu/x86/smm/smm.elf | sort > $(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
index 00cae1005f9133d3646e46852bb17e73b1beabc6..7254d55eabd3ab26f54d42a5cb8a450821014dc3 100644 (file)
@@ -25,8 +25,6 @@
 #include <cpu/x86/cache.h>
 #include <cpu/x86/smm.h>
 
-void southbridge_smi_set_eos(void);
-
 typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore;
 
 /* SMI multiprocessing semaphore */
index 1baaecf2a1c2224d844b8fd65d9c0a9631f3d1ea..9a2dfa599e206c579435a5f8c1b8882184e889d2 100644 (file)
@@ -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)
 {
index a014ee0e5587163a3c9017d92248920be47a3932..2954ecd1f7242ccdac0815a3d4e5ee4033bf779f 100644 (file)
@@ -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);
index 9177d53818343996ee2eced8be77abdff88ec3fc..5531993f7d9f279963432793c296b01e956d092a 100644 (file)
@@ -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__ (
index d3608ef822a351d7fe66ce9f80dd92fd1f076564..180df992e625b333462b80b527fe846ac5424020 100644 (file)
@@ -21,7 +21,9 @@
 #include <device/device.h>
 #include <console/console.h>
 #include <boot/tables.h>
+#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
 #include <x86emu/x86emu.h>
+#endif
 #include <pc80/mc146818rtc.h>
 #include <arch/io.h>
 #include <arch/coreboot_tables.h>
index 2090bccece5ef21b90aa6d08aed77551f253d27a..192648f5ca9d510062d1a2dbfea85aa24ee28f71 100644 (file)
@@ -20,6 +20,7 @@
 #include <arch/io.h>
 #include <arch/romcc_io.h>
 #include <console/console.h>
+#include <cpu/x86/smm.h>
 #include "../../../southbridge/intel/i82801gx/i82801gx_nvs.h"
 
 /* The southbridge SMI handler checks whether gnvs has a 
index 9994429a2fab2ae1c05364d9f9b704ebaaa8a92a..eda2691ecf9d6b413fb9064d4bee9b35533282e3 100644 (file)
@@ -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
index 38e3304374d1ea52c138667128e377689107a000..9cd0370cdc369bfa5447bad68fbe6b486f4ef402 100644 (file)
@@ -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