On Thu, Dec 18, 2008 at 7:52 AM, Jordan Crouse <jor...@cosmicpenguin.net>wrote:

> Myles Watson wrote:
>
>> On Thu, Dec 18, 2008 at 3:18 AM, Carl-Daniel Hailfinger <
>> c-d.hailfinger.devel.2...@gmx.net> wrote:
>>
>>  Bao, Zheng found a bug which killed SATA booting on my board.
>>>
>>> This happened because we do not error out on implicit function
>>> declarations. The linker has no way of checking whether the implicitly
>>> assumed function signature is identical to the real signature, so
>>> mismatches can occur and these mismatches are practically impossible to
>>> debug because the code looks completely correct.
>>>
>>> Adding -Werror-implicit-function-declaration to our CFLAGS would solve
>>> this problem nicely, but a lot of files in the tree need to be fixed.
>>>
>>>
>> I think this is a great idea.  Isn't the correct order to fix all the
>> warnings, then make it an error?
>>
>
> Yeah - the unfortunate thing about changes like this is that you end up
> being responsible for fixing the errors.. :)


Here's my first patch.  It clears up all of them except get_nodes for
serengeti.

coreboot/svn/src/cpu/amd/dualcore/dualcore.c:63: warning: implicit
declaration of function 'get_nodes'

The rest were easy.  This one I'm not sure what was supposed to be here.


> Carl-Daniel - if you post a list of offending files, we'll all help clear
> them up.  Dumping the log through grep "implicit declaration of function"
> should suffice.


If you want to take the get_nodes reference, that would be great.  If this
is the way its supposed to be cleaned up, I'll keep going a little more.  I
think we should divide it up based on processor type so we don't duplicate
work.

Signed-off-by: Myles Watson <myle...@gmail.com>

Thanks,
Myles
Index: src/southbridge/amd/amd8111/amd8111_nic.c
===================================================================
--- src/southbridge/amd/amd8111/amd8111_nic.c	(revision 3817)
+++ src/southbridge/amd/amd8111/amd8111_nic.c	(working copy)
@@ -7,6 +7,7 @@
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include <arch/io.h>
+#include <delay.h>
 #include "amd8111.h"
 
 
Index: src/southbridge/amd/amd8111/amd8111.c
===================================================================
--- src/southbridge/amd/amd8111/amd8111.c	(revision 3817)
+++ src/southbridge/amd/amd8111/amd8111.c	(working copy)
@@ -11,7 +11,7 @@
 	unsigned index;
 	unsigned reg_old, reg;
 
-	/* See if we are on the behind the amd8111 pci bridge */
+	/* See if we are on the bus behind the amd8111 pci bridge */
 	bus_dev = dev->bus->dev;
 	if ((bus_dev->vendor == PCI_VENDOR_ID_AMD) && 
 	    (bus_dev->device == PCI_DEVICE_ID_AMD_8111_PCI)) 
Index: src/include/device/pci.h
===================================================================
--- src/include/device/pci.h	(revision 3817)
+++ src/include/device/pci.h	(working copy)
@@ -72,6 +72,10 @@
 unsigned pci_find_capability(device_t dev, unsigned cap);
 struct resource *pci_get_resource(struct device *dev, unsigned long index);
 void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device);
+void pci_dev_init(struct device *dev);
+void pci_level_irq(unsigned char intNum);
+void pci_assign_irqs(unsigned bus, unsigned slot,
+		     const unsigned char pIntAtoD[4]);
 
 #define PCI_IO_BRIDGE_ALIGN 4096
 #define PCI_MEM_BRIDGE_ALIGN (1024*1024)
Index: src/cpu/x86/lapic/lapic_cpu_init.c
===================================================================
--- src/cpu/x86/lapic/lapic_cpu_init.c	(revision 3817)
+++ src/cpu/x86/lapic/lapic_cpu_init.c	(working copy)
@@ -435,6 +435,8 @@
 
 #if WAIT_BEFORE_CPUS_INIT==0
 	#define cpus_ready_for_init() do {} while(0)
+#else
+	void cpus_ready_for_init(void);
 #endif
 
 #if HAVE_SMI_HANDLER
Index: src/northbridge/amd/amdk8/amdk8_f.h
===================================================================
--- src/northbridge/amd/amdk8/amdk8_f.h	(revision 3817)
+++ src/northbridge/amd/amdk8/amdk8_f.h	(working copy)
@@ -521,6 +521,8 @@
 
 #ifdef __ROMCC__
 static void soft_reset(void);
+#else
+void hard_reset(void);
 #endif
 
 static void wait_all_core0_mem_trained(struct sys_info *sysinfo)
Index: src/arch/i386/include/arch/acpi.h
===================================================================
--- src/arch/i386/include/arch/acpi.h	(revision 3817)
+++ src/arch/i386/include/arch/acpi.h	(working copy)
@@ -317,6 +317,8 @@
 unsigned long acpi_create_srat_lapics(unsigned long current);
 void acpi_create_srat(acpi_srat_t *srat);
 
+void acpi_create_slit(acpi_slit_t *slit);
+
 void acpi_create_hpet(acpi_hpet_t *hpet);
 
 void acpi_create_mcfg(acpi_mcfg_t *mcfg);
--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to