On 18.12.2008 15:52, Jordan Crouse wrote: > Myles Watson wrote: >> On Thu, Dec 18, 2008 at 3:18 AM, Carl-Daniel Hailfinger < >> [email protected]> 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.. :)
Fix implicit declarations of get_bus_conf. Signed-off-by: Carl-Daniel Hailfinger <[email protected]> abuild tested. --- LinuxBIOSv2-implicit_declarations/src/mainboard/supermicro/h8dmr/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/supermicro/h8dmr/mptable.c (Arbeitskopie) @@ -33,6 +33,8 @@ extern unsigned char bus_pcix[3]; // under bus_mcp55_2 +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/supermicro/h8dmr/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/supermicro/h8dmr/irq_tables.c (Arbeitskopie) @@ -53,6 +53,8 @@ extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; //1 +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/m57sli/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/m57sli/mptable.c (Arbeitskopie) @@ -33,6 +33,8 @@ extern unsigned bus_type[256]; +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/m57sli/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/m57sli/irq_tables.c (Arbeitskopie) @@ -53,6 +53,8 @@ extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; //1 +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c (Arbeitskopie) @@ -55,6 +55,8 @@ extern unsigned char bus_isa; extern unsigned char bus_sis966[8]; //1 +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912/mptable.c (Arbeitskopie) @@ -29,6 +29,8 @@ #include "mb_sysconf.h" +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912/irq_tables.c (Arbeitskopie) @@ -52,6 +52,8 @@ pirq_info->rfu = rfu; } +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912_fam10/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912_fam10/mptable.c (Arbeitskopie) @@ -29,6 +29,8 @@ #include "mb_sysconf.h" +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912_fam10/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/tyan/s2912_fam10/irq_tables.c (Arbeitskopie) @@ -52,6 +52,8 @@ pirq_info->rfu = rfu; } +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms9282/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms9282/mptable.c (Arbeitskopie) @@ -32,6 +32,8 @@ #include "mb_sysconf.h" +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms9282/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms9282/irq_tables.c (Arbeitskopie) @@ -55,6 +55,8 @@ pirq_info->rfu = rfu; } +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms7260/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms7260/mptable.c (Arbeitskopie) @@ -31,6 +31,8 @@ extern unsigned apicid_mcp55; extern unsigned bus_type[256]; +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms7260/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/msi/ms7260/irq_tables.c (Arbeitskopie) @@ -49,6 +49,8 @@ extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; // 1 +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { struct irq_routing_table *pirq; --- LinuxBIOSv2-implicit_declarations/src/mainboard/sunw/ultra40/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/sunw/ultra40/mptable.c (Arbeitskopie) @@ -32,6 +32,8 @@ extern unsigned sbdn3; extern unsigned sbdnb; +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/sunw/ultra40/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/sunw/ultra40/irq_tables.c (Arbeitskopie) @@ -51,6 +51,8 @@ extern unsigned sbdn3; extern unsigned sbdnb; +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { --- LinuxBIOSv2-implicit_declarations/src/mainboard/nvidia/l1_2pvv/mptable.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/nvidia/l1_2pvv/mptable.c (Arbeitskopie) @@ -29,6 +29,8 @@ #include "mb_sysconf.h" +extern void get_bus_conf(void); + void *smp_write_config_table(void *v) { static const char sig[4] = "PCMP"; --- LinuxBIOSv2-implicit_declarations/src/mainboard/nvidia/l1_2pvv/irq_tables.c (Revision 3829) +++ LinuxBIOSv2-implicit_declarations/src/mainboard/nvidia/l1_2pvv/irq_tables.c (Arbeitskopie) @@ -52,6 +52,8 @@ pirq_info->rfu = rfu; } +extern void get_bus_conf(void); + unsigned long write_pirq_routing_table(unsigned long addr) { -- http://www.hailfinger.org/ -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

