summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/boot/gdt.c4
-rw-r--r--src/arch/i386/boot/tables.c4
-rw-r--r--src/arch/i386/lib/pci_ops_auto.c4
-rw-r--r--src/console/vsprintf.c2
-rw-r--r--src/devices/device.c7
-rw-r--r--src/devices/pci_device.c2
-rw-r--r--src/devices/pciexp_device.c4
-rw-r--r--src/include/device/device.h2
-rw-r--r--src/include/device/pci.h2
-rw-r--r--src/northbridge/intel/i440bx/northbridge.c3
-rw-r--r--src/southbridge/intel/i82371eb/i82371eb_ide.c4
-rw-r--r--src/southbridge/intel/i82371eb/i82371eb_isa.c2
12 files changed, 22 insertions, 18 deletions
diff --git a/src/arch/i386/boot/gdt.c b/src/arch/i386/boot/gdt.c
index c4ed37486d..0230acf208 100644
--- a/src/arch/i386/boot/gdt.c
+++ b/src/arch/i386/boot/gdt.c
@@ -47,11 +47,11 @@ void move_gdt(void)
printk(BIOS_ERR, "Error: Could not relocate GDT.\n");
return;
}
- printk_debug("Moving GDT to %#lx...", newgdt);
+ printk_debug("Moving GDT to %p...", newgdt);
memcpy((void*)newgdt, &gdt, num_gdt_bytes);
}
- gdtarg.base = newgdt;
+ gdtarg.base = (u32)newgdt;
gdtarg.limit = num_gdt_bytes - 1;
__asm__ __volatile__ ("lgdt %0\n\t" : : "m" (gdtarg));
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c
index b47826dd06..03ebda60f7 100644
--- a/src/arch/i386/boot/tables.c
+++ b/src/arch/i386/boot/tables.c
@@ -191,7 +191,7 @@ struct lb_memory *write_tables(void)
#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
post_code(0x9d);
- high_table_pointer = cbmem_add(CBMEM_ID_CBTABLE, MAX_COREBOOT_TABLE_SIZE);
+ high_table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE, MAX_COREBOOT_TABLE_SIZE);
if (high_table_pointer) {
unsigned long new_high_table_pointer;
@@ -202,7 +202,7 @@ struct lb_memory *write_tables(void)
if (new_high_table_pointer > (high_table_pointer +
MAX_COREBOOT_TABLE_SIZE))
- printk_err("%s: coreboot table didn't fit (%llx)\n",
+ printk_err("%s: coreboot table didn't fit (%lx)\n",
__func__, new_high_table_pointer -
high_table_pointer);
diff --git a/src/arch/i386/lib/pci_ops_auto.c b/src/arch/i386/lib/pci_ops_auto.c
index f453d47826..1dd2494ba9 100644
--- a/src/arch/i386/lib/pci_ops_auto.c
+++ b/src/arch/i386/lib/pci_ops_auto.c
@@ -43,7 +43,7 @@ static int pci_sanity_check(const struct pci_bus_operations *o)
struct pci_bus_operations *pci_bus_fallback_ops = NULL;
-const struct pci_bus_operations *pci_check_direct(void)
+static const struct pci_bus_operations *pci_check_direct(void)
{
unsigned int tmp;
@@ -86,7 +86,7 @@ const struct pci_bus_operations *pci_check_direct(void)
const struct pci_bus_operations *pci_remember_direct(void)
{
if (!pci_bus_fallback_ops)
- pci_bus_fallback_ops = pci_check_direct();
+ pci_bus_fallback_ops = (struct pci_bus_operations *)pci_check_direct();
return pci_bus_fallback_ops;
}
diff --git a/src/console/vsprintf.c b/src/console/vsprintf.c
index 9507e8ea54..7f3e33c3cc 100644
--- a/src/console/vsprintf.c
+++ b/src/console/vsprintf.c
@@ -48,6 +48,8 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
return i;
}
+int sprintf(char *buf, const char *fmt, ...);
+
int sprintf(char *buf, const char *fmt, ...)
{
va_list args;
diff --git a/src/devices/device.c b/src/devices/device.c
index 2f01ae2df2..2323850ae6 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -671,8 +671,11 @@ static void avoid_fixed_resources(struct device *dev)
device_t vga_pri = 0;
static void set_vga_bridge_bits(void)
{
-#warning "FIXME modify set_vga_bridge so it is less pci centric!"
-#warning "This function knows too much about PCI stuff, it should be just a iterator/visitor."
+ /*
+ * FIXME: Modify set_vga_bridge so it is less PCI centric!
+ * This function knows too much about PCI stuff, it should be just
+ * an iterator/visitor.
+ */
/* FIXME: Handle the VGA palette snooping. */
struct device *dev, *vga, *vga_onboard, *vga_first, *vga_last;
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 5c73db5ed0..1788044fe7 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -809,7 +809,7 @@ static void set_pci_ops(struct device *dev)
for (driver = &pci_drivers[0]; driver != &epci_drivers[0]; driver++) {
if ((driver->vendor == dev->vendor) &&
(driver->device == dev->device)) {
- dev->ops = driver->ops;
+ dev->ops = (struct device_operations *)driver->ops;
printk_spew("%s [%04x/%04x] %sops\n",
dev_path(dev),
driver->vendor, driver->device,
diff --git a/src/devices/pciexp_device.c b/src/devices/pciexp_device.c
index 909026a365..461c3b6c7a 100644
--- a/src/devices/pciexp_device.c
+++ b/src/devices/pciexp_device.c
@@ -34,8 +34,8 @@ static void pciexp_tune_dev(device_t dev)
/* error... */
return;
}
- printk_debug("PCIe: tuning %s\n", dev_path(dev));
-#warning "IMPLEMENT PCI EXPRESS TUNING"
+ // printk_debug("PCIe: tuning %s\n", dev_path(dev));
+ /* TODO: Implement PCI Express tuning. */
}
unsigned int pciexp_scan_bus(struct bus *bus,
diff --git a/src/include/device/device.h b/src/include/device/device.h
index eba6eb50c6..25a549cc72 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -86,7 +86,7 @@ struct device {
unsigned int links;
struct device_operations *ops;
- struct chip_operations *chip_ops;
+ const struct chip_operations *chip_ops;
void *chip_info;
};
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index 60cf4aa35c..5485644393 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -38,7 +38,7 @@ struct pci_bus_operations {
};
struct pci_driver {
- struct device_operations *ops;
+ const struct device_operations *ops;
unsigned short vendor;
unsigned short device;
};
diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c
index 26229a953c..4431aafaf8 100644
--- a/src/northbridge/intel/i440bx/northbridge.c
+++ b/src/northbridge/intel/i440bx/northbridge.c
@@ -85,7 +85,6 @@ static void i440bx_domain_set_resources(device_t dev)
pci_tolm = find_pci_tolm(&dev->link[0]);
mc_dev = dev->link[0].children;
if (mc_dev) {
- uint16_t tolm_r;
unsigned long tomk, tolmk;
int idx;
@@ -98,7 +97,7 @@ static void i440bx_domain_set_resources(device_t dev)
/* Convert to KB. */
tomk *= (8 * 1024);
- printk_debug("Setting RAM size to %d MB\n", tomk / 1024);
+ printk_debug("Setting RAM size to %ld MB\n", tomk / 1024);
/* Compute the top of low memory. */
tolmk = pci_tolm / 1024;
diff --git a/src/southbridge/intel/i82371eb/i82371eb_ide.c b/src/southbridge/intel/i82371eb/i82371eb_ide.c
index 6611289403..0e91839fb2 100644
--- a/src/southbridge/intel/i82371eb/i82371eb_ide.c
+++ b/src/southbridge/intel/i82371eb/i82371eb_ide.c
@@ -144,7 +144,7 @@ static void ide_init_i82371ab_eb_mb(struct device *dev)
}
/* Intel 82371FB/SB */
-static struct device_operations ide_ops_fb_sb = {
+static const struct device_operations ide_ops_fb_sb = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -155,7 +155,7 @@ static struct device_operations ide_ops_fb_sb = {
};
/* Intel 82371AB/EB/MB */
-static struct device_operations ide_ops_ab_eb_mb = {
+static const struct device_operations ide_ops_ab_eb_mb = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
diff --git a/src/southbridge/intel/i82371eb/i82371eb_isa.c b/src/southbridge/intel/i82371eb/i82371eb_isa.c
index bc6465b280..1f1aef0b93 100644
--- a/src/southbridge/intel/i82371eb/i82371eb_isa.c
+++ b/src/southbridge/intel/i82371eb/i82371eb_isa.c
@@ -69,7 +69,7 @@ static void sb_read_resources(struct device *dev)
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
}
-const struct device_operations isa_ops = {
+static const struct device_operations isa_ops = {
.read_resources = sb_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,