summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-03-13 15:42:27 +0000
committerStefan Reinauer <stepan@openbios.org>2009-03-13 15:42:27 +0000
commitbe7f79867e4d989fc9cb7fb9e8b0b8ec55956875 (patch)
treef5ae688b318dfb7456351bb33a5a30f28bb9dedc /src
parentcc46e73a0221d08a30c78adfc568f162cdda407d (diff)
downloadcoreboot-be7f79867e4d989fc9cb7fb9e8b0b8ec55956875.tar.xz
This, ladies and gentlement, is commit #4000.
Use the (almost) same strict CFLAGS in v2 that we use on v3. And fix a few include files and missing prototypes. Also, fix up the Config-abuild.lb files to properly work for cross compiling. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4000 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/include/arch/acpi.h6
-rw-r--r--src/arch/i386/include/arch/pci_ops.h6
-rw-r--r--src/config/Config.lb2
-rw-r--r--src/config/Options.lb2
-rw-r--r--src/drivers/generic/debug/debug_dev.c2
-rw-r--r--src/include/cpu/x86/smm.h3
-rw-r--r--src/include/device/device.h48
-rw-r--r--src/include/device/pnp.h2
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c6
-rw-r--r--src/mainboard/dell/s1850/chip.h2
-rw-r--r--src/mainboard/intel/jarrell/chip.h2
-rw-r--r--src/mainboard/intel/mtarvon/chip.h2
-rw-r--r--src/mainboard/intel/truxton/chip.h2
-rw-r--r--src/mainboard/intel/xe7501devkit/reset.c1
-rw-r--r--src/mainboard/kontron/986lcd-m/chip.h2
-rw-r--r--src/mainboard/supermicro/x6dai_g/chip.h2
-rw-r--r--src/mainboard/supermicro/x6dai_g/mainboard.c2
-rw-r--r--src/mainboard/supermicro/x6dhe_g/chip.h2
-rw-r--r--src/mainboard/supermicro/x6dhe_g/mainboard.c2
-rw-r--r--src/mainboard/supermicro/x6dhe_g2/chip.h2
-rw-r--r--src/mainboard/supermicro/x6dhe_g2/mainboard.c2
-rw-r--r--src/mainboard/supermicro/x6dhr_ig/chip.h2
-rw-r--r--src/mainboard/supermicro/x6dhr_ig2/chip.h2
-rw-r--r--src/mainboard/tyan/s2735/reset.c1
-rw-r--r--src/mainboard/via/epia-m/Options.lb4
-rw-r--r--src/mainboard/via/epia-m/mainboard.c1
-rw-r--r--src/mainboard/via/epia-m/vgachip.h5
-rw-r--r--src/northbridge/amd/amdfam10/reset_test.c1
-rw-r--r--src/northbridge/amd/amdk8/northbridge.c4
-rw-r--r--src/northbridge/intel/e7501/northbridge.c1
-rw-r--r--src/northbridge/intel/i82830/northbridge.c1
-rw-r--r--src/northbridge/intel/i855pm/northbridge.c1
-rw-r--r--src/northbridge/via/vt8601/northbridge.c1
-rw-r--r--src/northbridge/via/vt8623/northbridge.h8
-rw-r--r--src/southbridge/intel/pxhd/chip.h3
-rw-r--r--src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c2
36 files changed, 85 insertions, 52 deletions
diff --git a/src/arch/i386/include/arch/acpi.h b/src/arch/i386/include/arch/acpi.h
index 4d2cedd10f..1fccd62a7b 100644
--- a/src/arch/i386/include/arch/acpi.h
+++ b/src/arch/i386/include/arch/acpi.h
@@ -5,9 +5,7 @@
* (C) 2004 SUSE LINUX AG
*
* The ACPI table structs are based on the Linux kernel sources.
- *
- */
-/* ACPI FADT & FACS added by Nick Barker <nick.barker9@btinternet.com>
+ * ACPI FADT & FACS added by Nick Barker <nick.barker9@btinternet.com>
* those parts (C) 2004 Nick Barker
*/
@@ -331,6 +329,8 @@ void acpi_create_facs(acpi_facs_t *facs);
void acpi_write_rsdt(acpi_rsdt_t *rsdt);
void acpi_write_rsdp(acpi_rsdp_t *rsdp, acpi_rsdt_t *rsdt);
+unsigned long acpi_add_ssdt_pstates(acpi_rsdt_t *rsdt, unsigned long current);
+
#define ACPI_WRITE_MADT_IOAPIC(dev,id) \
do { \
struct resource *res; \
diff --git a/src/arch/i386/include/arch/pci_ops.h b/src/arch/i386/include/arch/pci_ops.h
index 5972df1d72..04b93196aa 100644
--- a/src/arch/i386/include/arch/pci_ops.h
+++ b/src/arch/i386/include/arch/pci_ops.h
@@ -1,11 +1,11 @@
#ifndef ARCH_I386_PCI_OPS_H
#define ARCH_I386_PCI_OPS_H
-const struct pci_bus_operations pci_cf8_conf1;
-const struct pci_bus_operations pci_cf8_conf2;
+extern const struct pci_bus_operations pci_cf8_conf1;
+extern const struct pci_bus_operations pci_cf8_conf2;
#if MMCONF_SUPPORT==1
-const struct pci_bus_operations pci_ops_mmconf;
+extern const struct pci_bus_operations pci_ops_mmconf;
#endif
void pci_set_method(device_t dev);
diff --git a/src/config/Config.lb b/src/config/Config.lb
index 5a82b41f17..ae01383030 100644
--- a/src/config/Config.lb
+++ b/src/config/Config.lb
@@ -10,7 +10,7 @@ makedefine GCC ?= $(CC)
makedefine GCC_INC_DIR := $(shell LC_ALL=C $(GCC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
makedefine CPPFLAGS := -I$(TOP)/src/include -I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS)
-makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -Os -nostdinc -nostdlib -fno-builtin -Wall
+makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -Os -nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wstrict-aliasing -Wshadow -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
if ASSEMBLER_DEBUG
makedefine DEBUG_CFLAGS := -g -dA -fverbose-asm
diff --git a/src/config/Options.lb b/src/config/Options.lb
index 1ad1ef8ca4..88f57e2879 100644
--- a/src/config/Options.lb
+++ b/src/config/Options.lb
@@ -146,7 +146,7 @@ define COREBOOT_COMPILER
comment "Build compiler"
end
define COREBOOT_LINKER
- default "$(shell $(CC) -Wl,--version 2>&1 | grep version | tail -n 1)"
+ default "$(shell $(CC) -Wl,--version 2>&1 | grep \" ld\")"
export always
format "\"%s\""
comment "Build linker"
diff --git a/src/drivers/generic/debug/debug_dev.c b/src/drivers/generic/debug/debug_dev.c
index 7f17c9598c..210600c59f 100644
--- a/src/drivers/generic/debug/debug_dev.c
+++ b/src/drivers/generic/debug/debug_dev.c
@@ -5,6 +5,8 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
+#include <part/hard_reset.h>
+#include <delay.h>
#include "chip.h"
static void print_pci_regs(struct device *dev)
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 3122be1bcd..c4a57470b2 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -251,6 +251,9 @@ typedef struct {
/* SMI handler function prototypes */
+void io_trap_handler(int smif);
int southbridge_io_trap_handler(int smif);
int mainboard_io_trap_handler(int smif);
+void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
+
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 284c096016..4109c00c11 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -102,26 +102,26 @@ extern struct device *all_devices; /* list of all devices */
/* Generic device interface functions */
-extern device_t alloc_dev(struct bus *parent, struct device_path *path);
-extern void dev_enumerate(void);
-extern void dev_configure(void);
-extern void dev_enable(void);
-extern void dev_initialize(void);
-extern void dev_optimize(void);
+device_t alloc_dev(struct bus *parent, struct device_path *path);
+void dev_enumerate(void);
+void dev_configure(void);
+void dev_enable(void);
+void dev_initialize(void);
+void dev_optimize(void);
/* Generic device helper functions */
-extern int reset_bus(struct bus *bus);
-extern unsigned int scan_bus(struct device *bus, unsigned int max);
-extern void compute_allocate_resource(struct bus *bus, struct resource *bridge,
+int reset_bus(struct bus *bus);
+unsigned int scan_bus(struct device *bus, unsigned int max);
+void compute_allocate_resource(struct bus *bus, struct resource *bridge,
unsigned long type_mask, unsigned long type);
-extern void assign_resources(struct bus *bus);
-extern void enable_resources(struct device *dev);
-extern void enumerate_static_device(void);
-extern void enumerate_static_devices(void);
-extern const char *dev_path(device_t dev);
+void assign_resources(struct bus *bus);
+void enable_resources(struct device *dev);
+void enumerate_static_device(void);
+void enumerate_static_devices(void);
+const char *dev_path(device_t dev);
const char *bus_path(struct bus *bus);
-extern void dev_set_enabled(device_t dev, int enable);
-extern void disable_children(struct bus *bus);
+void dev_set_enabled(device_t dev, int enable);
+void disable_children(struct bus *bus);
/* Helper functions */
device_t find_dev_path(struct bus *parent, struct device_path *path);
@@ -138,12 +138,12 @@ device_t dev_find_slot_on_smbus (unsigned int bus, unsigned int addr);
#define DEVICE_IO_ALIGN 16
#define DEVICE_MEM_ALIGN 4096
-struct device_operations default_dev_ops_root;
-extern void root_dev_read_resources(device_t dev);
-extern void root_dev_set_resources(device_t dev);
-extern unsigned int scan_static_bus(device_t bus, unsigned int max);
-extern void enable_childrens_resources(device_t dev);
-extern void root_dev_enable_resources(device_t dev);
-extern unsigned int root_dev_scan_bus(device_t root, unsigned int max);
-extern void root_dev_init(device_t dev);
+extern struct device_operations default_dev_ops_root;
+void root_dev_read_resources(device_t dev);
+void root_dev_set_resources(device_t dev);
+unsigned int scan_static_bus(device_t bus, unsigned int max);
+void enable_childrens_resources(device_t dev);
+void root_dev_enable_resources(device_t dev);
+unsigned int root_dev_scan_bus(device_t root, unsigned int max);
+void root_dev_init(device_t dev);
#endif /* DEVICE_H */
diff --git a/src/include/device/pnp.h b/src/include/device/pnp.h
index 757b240c32..4cf6ff47fb 100644
--- a/src/include/device/pnp.h
+++ b/src/include/device/pnp.h
@@ -21,7 +21,7 @@ void pnp_set_resources(device_t dev);
void pnp_enable_resources(device_t dev);
void pnp_enable(device_t dev);
-struct device_operations pnp_ops;
+extern struct device_operations pnp_ops;
/* PNP helper operations */
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c b/src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c
index 26c624589c..d7b2379c24 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c
@@ -69,9 +69,13 @@ static void post_code(u8 value) {
#include "northbridge/amd/amdfam10/amdfam10.h"
#endif
-
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdfam10/reset_test.c"
+
+#include <console/loglevel.h>
+void die(const char *msg);
+int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+#define printk_emerg(fmt, arg...) do_printk(BIOS_EMERG ,fmt, ##arg)
#include "cpu/x86/bist.h"
diff --git a/src/mainboard/dell/s1850/chip.h b/src/mainboard/dell/s1850/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/dell/s1850/chip.h
+++ b/src/mainboard/dell/s1850/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/intel/jarrell/chip.h b/src/mainboard/intel/jarrell/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/intel/jarrell/chip.h
+++ b/src/mainboard/intel/jarrell/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/intel/mtarvon/chip.h b/src/mainboard/intel/mtarvon/chip.h
index 4921b7bfcc..71c6c125d0 100644
--- a/src/mainboard/intel/mtarvon/chip.h
+++ b/src/mainboard/intel/mtarvon/chip.h
@@ -18,7 +18,7 @@
*
*/
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/intel/truxton/chip.h b/src/mainboard/intel/truxton/chip.h
index 4921b7bfcc..71c6c125d0 100644
--- a/src/mainboard/intel/truxton/chip.h
+++ b/src/mainboard/intel/truxton/chip.h
@@ -18,7 +18,7 @@
*
*/
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/intel/xe7501devkit/reset.c b/src/mainboard/intel/xe7501devkit/reset.c
index 349a2bfd29..8feaac64e5 100644
--- a/src/mainboard/intel/xe7501devkit/reset.c
+++ b/src/mainboard/intel/xe7501devkit/reset.c
@@ -1,3 +1,4 @@
+void i82801ca_hard_reset(void);
void hard_reset(void)
{
diff --git a/src/mainboard/kontron/986lcd-m/chip.h b/src/mainboard/kontron/986lcd-m/chip.h
index 08a66b677e..e1bf83b293 100644
--- a/src/mainboard/kontron/986lcd-m/chip.h
+++ b/src/mainboard/kontron/986lcd-m/chip.h
@@ -19,7 +19,7 @@
* MA 02110-1301 USA
*/
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
};
diff --git a/src/mainboard/supermicro/x6dai_g/chip.h b/src/mainboard/supermicro/x6dai_g/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/supermicro/x6dai_g/chip.h
+++ b/src/mainboard/supermicro/x6dai_g/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/supermicro/x6dai_g/mainboard.c b/src/mainboard/supermicro/x6dai_g/mainboard.c
index b32dbd560e..1db8cd4b4b 100644
--- a/src/mainboard/supermicro/x6dai_g/mainboard.c
+++ b/src/mainboard/supermicro/x6dai_g/mainboard.c
@@ -1,7 +1,7 @@
#include <device/device.h>
#include "chip.h"
-struct chip_operations supermicro_x6dai_g_ops = {
+struct chip_operations mainboard_ops = {
CHIP_NAME("Supermicro X6DAi-G Mainboard")
};
diff --git a/src/mainboard/supermicro/x6dhe_g/chip.h b/src/mainboard/supermicro/x6dhe_g/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/supermicro/x6dhe_g/chip.h
+++ b/src/mainboard/supermicro/x6dhe_g/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/supermicro/x6dhe_g/mainboard.c b/src/mainboard/supermicro/x6dhe_g/mainboard.c
index 343c9bb7da..a242dddcb3 100644
--- a/src/mainboard/supermicro/x6dhe_g/mainboard.c
+++ b/src/mainboard/supermicro/x6dhe_g/mainboard.c
@@ -1,7 +1,7 @@
#include <device/device.h>
#include "chip.h"
-struct chip_operations supermicro_x6dhe_g_ops = {
+struct chip_operations mainboard_ops = {
CHIP_NAME("Supermicro X6DHE-G Mainboard")
};
diff --git a/src/mainboard/supermicro/x6dhe_g2/chip.h b/src/mainboard/supermicro/x6dhe_g2/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/supermicro/x6dhe_g2/chip.h
+++ b/src/mainboard/supermicro/x6dhe_g2/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/supermicro/x6dhe_g2/mainboard.c b/src/mainboard/supermicro/x6dhe_g2/mainboard.c
index 856dc8f53d..fdb67cc983 100644
--- a/src/mainboard/supermicro/x6dhe_g2/mainboard.c
+++ b/src/mainboard/supermicro/x6dhe_g2/mainboard.c
@@ -1,7 +1,7 @@
#include <device/device.h>
#include "chip.h"
-struct chip_operations supermicro_x6dhe_g2_ops = {
+struct chip_operations mainboard_ops = {
CHIP_NAME("Supermicro X6DHE-G2 Mainboard")
};
diff --git a/src/mainboard/supermicro/x6dhr_ig/chip.h b/src/mainboard/supermicro/x6dhr_ig/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/supermicro/x6dhr_ig/chip.h
+++ b/src/mainboard/supermicro/x6dhr_ig/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/supermicro/x6dhr_ig2/chip.h b/src/mainboard/supermicro/x6dhr_ig2/chip.h
index b6e23b2688..e168812d0e 100644
--- a/src/mainboard/supermicro/x6dhr_ig2/chip.h
+++ b/src/mainboard/supermicro/x6dhr_ig2/chip.h
@@ -1,4 +1,4 @@
-struct chip_operations mainboard_ops;
+extern struct chip_operations mainboard_ops;
struct mainboard_config {
int nothing;
diff --git a/src/mainboard/tyan/s2735/reset.c b/src/mainboard/tyan/s2735/reset.c
index 3cc3d54988..4b2ab0daae 100644
--- a/src/mainboard/tyan/s2735/reset.c
+++ b/src/mainboard/tyan/s2735/reset.c
@@ -1,3 +1,4 @@
+void i82801er_hard_reset(void);
void hard_reset(void)
{
diff --git a/src/mainboard/via/epia-m/Options.lb b/src/mainboard/via/epia-m/Options.lb
index 575cc5eeb3..54daa917af 100644
--- a/src/mainboard/via/epia-m/Options.lb
+++ b/src/mainboard/via/epia-m/Options.lb
@@ -137,5 +137,9 @@ default HOSTCC="gcc"
##
default CONFIG_MAX_PCI_BUSES = 5
+default MAXIMUM_CONSOLE_LOGLEVEL=8
+default DEFAULT_CONSOLE_LOGLEVEL=8
+default CONFIG_CONSOLE_SERIAL8250=1
+
end
diff --git a/src/mainboard/via/epia-m/mainboard.c b/src/mainboard/via/epia-m/mainboard.c
index 64b7c6d232..bec7d6a2f4 100644
--- a/src/mainboard/via/epia-m/mainboard.c
+++ b/src/mainboard/via/epia-m/mainboard.c
@@ -5,6 +5,7 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include "chip.h"
+#include "vgachip.h"
void vga_enable_console();
diff --git a/src/mainboard/via/epia-m/vgachip.h b/src/mainboard/via/epia-m/vgachip.h
index d43788cd66..c623c8969a 100644
--- a/src/mainboard/via/epia-m/vgachip.h
+++ b/src/mainboard/via/epia-m/vgachip.h
@@ -7,4 +7,9 @@ struct pc80_vgabios_config {
int nothing;
};
+void vga_enable_console(void);
+void do_vgabios(void);
+void setup_realmode_idt(void);
+void write_protect_vgabios(void);
+
#endif /* _PC80_VGABIOS */
diff --git a/src/northbridge/amd/amdfam10/reset_test.c b/src/northbridge/amd/amdfam10/reset_test.c
index bc9fe6cb43..389d8e60a9 100644
--- a/src/northbridge/amd/amdfam10/reset_test.c
+++ b/src/northbridge/amd/amdfam10/reset_test.c
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <cpu/x86/lapic.h>
+#include "amdfam10.h"
#define NODE_ID 0x60
#define HT_INIT_CONTROL 0x6c
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index cbb921d293..c2c89d1ffb 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -19,8 +19,8 @@
#include <cpu/x86/lapic.h>
-#if CONFIG_LOGICAL_CPUS==1
#include <cpu/amd/dualcore.h>
+#if CONFIG_LOGICAL_CPUS==1
#include <pc80/mc146818rtc.h>
#endif
@@ -30,9 +30,7 @@
#include "amdk8.h"
-#if HW_MEM_HOLE_SIZEK != 0
#include <cpu/amd/model_fxx_rev.h>
-#endif
#include <cpu/amd/amdk8_sysconf.h>
diff --git a/src/northbridge/intel/e7501/northbridge.c b/src/northbridge/intel/e7501/northbridge.c
index 602913485d..b1d553aab1 100644
--- a/src/northbridge/intel/e7501/northbridge.c
+++ b/src/northbridge/intel/e7501/northbridge.c
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
+#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
diff --git a/src/northbridge/intel/i82830/northbridge.c b/src/northbridge/intel/i82830/northbridge.c
index bd2690a359..689bf19bc2 100644
--- a/src/northbridge/intel/i82830/northbridge.c
+++ b/src/northbridge/intel/i82830/northbridge.c
@@ -24,6 +24,7 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
diff --git a/src/northbridge/intel/i855pm/northbridge.c b/src/northbridge/intel/i855pm/northbridge.c
index 85adf4f417..60648542ae 100644
--- a/src/northbridge/intel/i855pm/northbridge.c
+++ b/src/northbridge/intel/i855pm/northbridge.c
@@ -4,6 +4,7 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
diff --git a/src/northbridge/via/vt8601/northbridge.c b/src/northbridge/via/vt8601/northbridge.c
index 36a118ca71..5347017ddf 100644
--- a/src/northbridge/via/vt8601/northbridge.c
+++ b/src/northbridge/via/vt8601/northbridge.c
@@ -5,6 +5,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/hypertransport.h>
+#include <cpu/cpu.h>
#include <stdlib.h>
#include <string.h>
#include <bitops.h>
diff --git a/src/northbridge/via/vt8623/northbridge.h b/src/northbridge/via/vt8623/northbridge.h
index ef63ebea78..f589860cd5 100644
--- a/src/northbridge/via/vt8623/northbridge.h
+++ b/src/northbridge/via/vt8623/northbridge.h
@@ -1,6 +1,12 @@
#ifndef NORTHBRIDGE_VIA_VT8623_H
#define NORTHBRIDGE_VIA_VT8623_H
-extern unsigned int vt8623_scan_root_bus(device_t root, unsigned int max);
+unsigned int vt8623_scan_root_bus(device_t root, unsigned int max);
+
+void vga_enable_console(void);
+void do_vgabios(void);
+void setup_realmode_idt(void);
+void write_protect_vgabios(void);
+
#endif /* NORTHBRIDGE_VIA_VT8623_H */
diff --git a/src/southbridge/intel/pxhd/chip.h b/src/southbridge/intel/pxhd/chip.h
index 516f1df7d2..5aedb77776 100644
--- a/src/southbridge/intel/pxhd/chip.h
+++ b/src/southbridge/intel/pxhd/chip.h
@@ -2,4 +2,5 @@ struct southbridge_intel_pxhd_config
{
/* nothing */
};
-struct chip_operations southbridge_intel_pxhd_ops;
+
+extern struct chip_operations southbridge_intel_pxhd_ops;
diff --git a/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c b/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c
index 64ec785781..cee5f25a24 100644
--- a/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c
+++ b/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+static int set_ht_link_buffer_counts_chain(uint8_t ht_c_num, unsigned vendorid, unsigned val);
+
static int set_ht_link_mcp55(uint8_t ht_c_num)
{
unsigned vendorid = 0x10de;