Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3914
-gerrit
commit ebbac8625a3936d64c866abeb5eeba1ebc70de8f Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Mon Sep 9 09:23:19 2013 +0300
AMD sb800 sb900: Fix corruption of a global ramstage variable
A late for loop may reference over the current array allocation and corrupt an unrelated global variable. As a quick fix bumb the size of the array allocation uniformly to 6.
Change-Id: Ib067fdf077e091d13e32cc3a8e4a0b713d19bcc2 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/mainboard/advansus/a785e-i/get_bus_conf.c | 6 ++---- src/mainboard/advansus/a785e-i/irq_tables.c | 2 +- src/mainboard/advansus/a785e-i/mptable.c | 2 +- src/mainboard/amd/bimini_fam10/get_bus_conf.c | 7 +++---- src/mainboard/amd/bimini_fam10/irq_tables.c | 2 +- src/mainboard/amd/bimini_fam10/mptable.c | 2 +- src/mainboard/amd/inagua/get_bus_conf.c | 6 ++---- src/mainboard/amd/inagua/irq_tables.c | 2 +- src/mainboard/amd/inagua/mptable.c | 2 +- src/mainboard/amd/persimmon/get_bus_conf.c | 6 ++---- src/mainboard/amd/persimmon/irq_tables.c | 2 +- src/mainboard/amd/persimmon/mptable.c | 2 +- src/mainboard/amd/south_station/get_bus_conf.c | 6 ++---- src/mainboard/amd/south_station/irq_tables.c | 2 +- src/mainboard/amd/south_station/mptable.c | 2 +- src/mainboard/amd/torpedo/get_bus_conf.c | 6 ++---- src/mainboard/amd/torpedo/irq_tables.c | 2 +- src/mainboard/amd/torpedo/mptable.c | 2 +- src/mainboard/amd/union_station/get_bus_conf.c | 6 ++---- src/mainboard/amd/union_station/irq_tables.c | 2 +- src/mainboard/amd/union_station/mptable.c | 2 +- src/mainboard/asrock/e350m1/get_bus_conf.c | 6 ++---- src/mainboard/asrock/e350m1/irq_tables.c | 2 +- src/mainboard/asrock/e350m1/mptable.c | 2 +- src/mainboard/asus/m5a88-v/get_bus_conf.c | 7 +++---- src/mainboard/asus/m5a88-v/irq_tables.c | 2 +- src/mainboard/asus/m5a88-v/mptable.c | 2 +- src/mainboard/avalue/eax-785e/get_bus_conf.c | 7 +++---- src/mainboard/avalue/eax-785e/irq_tables.c | 2 +- src/mainboard/avalue/eax-785e/mptable.c | 2 +- src/mainboard/lippert/frontrunner-af/get_bus_conf.c | 6 ++---- src/mainboard/lippert/frontrunner-af/irq_tables.c | 2 +- src/mainboard/lippert/frontrunner-af/mptable.c | 2 +- src/mainboard/lippert/toucan-af/get_bus_conf.c | 6 ++---- src/mainboard/lippert/toucan-af/irq_tables.c | 2 +- src/mainboard/lippert/toucan-af/mptable.c | 2 +- 36 files changed, 51 insertions(+), 72 deletions(-)
diff --git a/src/mainboard/advansus/a785e-i/get_bus_conf.c b/src/mainboard/advansus/a785e-i/get_bus_conf.c index c45364a..0feeed5 100644 --- a/src/mainboard/advansus/a785e-i/get_bus_conf.c +++ b/src/mainboard/advansus/a785e-i/get_bus_conf.c @@ -36,7 +36,7 @@ */ int bus_isa; u8 bus_rs780[11]; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,7 @@ void get_bus_conf(void) sbdn_rs780 = sysconf.sbdn; sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800)); for (i = 0; i < ARRAY_SIZE(bus_rs780); i++) { bus_rs780[i] = 0; } diff --git a/src/mainboard/advansus/a785e-i/irq_tables.c b/src/mainboard/advansus/a785e-i/irq_tables.c index 8592f0c..d9b6db1 100644 --- a/src/mainboard/advansus/a785e-i/irq_tables.c +++ b/src/mainboard/advansus/a785e-i/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
extern u8 bus_isa; extern u8 bus_rs780[8]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/advansus/a785e-i/mptable.c b/src/mainboard/advansus/a785e-i/mptable.c index fbba61c..73ada4d 100644 --- a/src/mainboard/advansus/a785e-i/mptable.c +++ b/src/mainboard/advansus/a785e-i/mptable.c @@ -28,7 +28,7 @@
extern int bus_isa; extern u8 bus_rs780[11]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern u32 apicid_sb800; extern u32 bus_type[256]; extern u32 sbdn_rs780; diff --git a/src/mainboard/amd/bimini_fam10/get_bus_conf.c b/src/mainboard/amd/bimini_fam10/get_bus_conf.c index 52edad1..c4924d4 100644 --- a/src/mainboard/amd/bimini_fam10/get_bus_conf.c +++ b/src/mainboard/amd/bimini_fam10/get_bus_conf.c @@ -33,7 +33,7 @@ */ int bus_isa; u8 bus_rs780[11]; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -84,9 +84,8 @@ void get_bus_conf(void) sbdn_rs780 = sysconf.sbdn; sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800)); + for (i = 0; i < ARRAY_SIZE(bus_rs780); i++) { bus_rs780[i] = 0; } diff --git a/src/mainboard/amd/bimini_fam10/irq_tables.c b/src/mainboard/amd/bimini_fam10/irq_tables.c index 18cb243..0d5027d 100644 --- a/src/mainboard/amd/bimini_fam10/irq_tables.c +++ b/src/mainboard/amd/bimini_fam10/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
extern u8 bus_isa; extern u8 bus_rs780[8]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/bimini_fam10/mptable.c b/src/mainboard/amd/bimini_fam10/mptable.c index 4ad4fd4..792fa41 100644 --- a/src/mainboard/amd/bimini_fam10/mptable.c +++ b/src/mainboard/amd/bimini_fam10/mptable.c @@ -28,7 +28,7 @@
extern int bus_isa; extern u8 bus_rs780[11]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern u32 apicid_sb800; extern u32 bus_type[256]; extern u32 sbdn_rs780; diff --git a/src/mainboard/amd/inagua/get_bus_conf.c b/src/mainboard/amd/inagua/get_bus_conf.c index 09e3b4c..be281055 100644 --- a/src/mainboard/amd/inagua/get_bus_conf.c +++ b/src/mainboard/amd/inagua/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,7 @@ void get_bus_conf(void)
sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/amd/inagua/irq_tables.c b/src/mainboard/amd/inagua/irq_tables.c index cab83ff..85f85ef 100644 --- a/src/mainboard/amd/inagua/irq_tables.c +++ b/src/mainboard/amd/inagua/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/inagua/mptable.c b/src/mainboard/amd/inagua/mptable.c index 952eddb..7352205 100644 --- a/src/mainboard/amd/inagua/mptable.c +++ b/src/mainboard/amd/inagua/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/amd/persimmon/get_bus_conf.c b/src/mainboard/amd/persimmon/get_bus_conf.c index 8872bb5..258d895 100644 --- a/src/mainboard/amd/persimmon/get_bus_conf.c +++ b/src/mainboard/amd/persimmon/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -99,9 +99,7 @@ void get_bus_conf(void) #endif sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/amd/persimmon/irq_tables.c b/src/mainboard/amd/persimmon/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/amd/persimmon/irq_tables.c +++ b/src/mainboard/amd/persimmon/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/persimmon/mptable.c b/src/mainboard/amd/persimmon/mptable.c index fd03058..6b8aaa6 100644 --- a/src/mainboard/amd/persimmon/mptable.c +++ b/src/mainboard/amd/persimmon/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/amd/south_station/get_bus_conf.c b/src/mainboard/amd/south_station/get_bus_conf.c index 165c683..df8ce6e 100644 --- a/src/mainboard/amd/south_station/get_bus_conf.c +++ b/src/mainboard/amd/south_station/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,7 @@ void get_bus_conf(void)
sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/amd/south_station/irq_tables.c b/src/mainboard/amd/south_station/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/amd/south_station/irq_tables.c +++ b/src/mainboard/amd/south_station/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/south_station/mptable.c b/src/mainboard/amd/south_station/mptable.c index cd062f7..e9175d8 100644 --- a/src/mainboard/amd/south_station/mptable.c +++ b/src/mainboard/amd/south_station/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/amd/torpedo/get_bus_conf.c b/src/mainboard/amd/torpedo/get_bus_conf.c index 4444937..5217321 100644 --- a/src/mainboard/amd/torpedo/get_bus_conf.c +++ b/src/mainboard/amd/torpedo/get_bus_conf.c @@ -31,7 +31,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb900[3]; +u8 bus_sb900[6];
/* * Here you only need to set value in pci1234 for HT-IO that could be installed or not @@ -94,9 +94,7 @@ void get_bus_conf(void)
sbdn_sb900 = 0;
- for (i = 0; i < 3; i++) { - bus_sb900[i] = 0; - } + memset(bus_sb900, 0, sizeof(bus_sb900));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/amd/torpedo/irq_tables.c b/src/mainboard/amd/torpedo/irq_tables.c index 1b2cea5..1a26f1c 100644 --- a/src/mainboard/amd/torpedo/irq_tables.c +++ b/src/mainboard/amd/torpedo/irq_tables.c @@ -46,7 +46,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb900[2]; +extern u8 bus_sb900[6]; extern unsigned long sbdn_sb900;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/torpedo/mptable.c b/src/mainboard/amd/torpedo/mptable.c index 81bccc3..da97d6a 100644 --- a/src/mainboard/amd/torpedo/mptable.c +++ b/src/mainboard/amd/torpedo/mptable.c @@ -31,7 +31,7 @@
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1 #define IO_APIC_ID CONFIG_MAX_CPUS -extern u8 bus_sb900[2]; +extern u8 bus_sb900[6];
extern u32 bus_type[256]; diff --git a/src/mainboard/amd/union_station/get_bus_conf.c b/src/mainboard/amd/union_station/get_bus_conf.c index 165c683..df8ce6e 100644 --- a/src/mainboard/amd/union_station/get_bus_conf.c +++ b/src/mainboard/amd/union_station/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,7 @@ void get_bus_conf(void)
sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/amd/union_station/irq_tables.c b/src/mainboard/amd/union_station/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/amd/union_station/irq_tables.c +++ b/src/mainboard/amd/union_station/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/amd/union_station/mptable.c b/src/mainboard/amd/union_station/mptable.c index cd062f7..e9175d8 100644 --- a/src/mainboard/amd/union_station/mptable.c +++ b/src/mainboard/amd/union_station/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/asrock/e350m1/get_bus_conf.c b/src/mainboard/asrock/e350m1/get_bus_conf.c index 165c683..df8ce6e 100644 --- a/src/mainboard/asrock/e350m1/get_bus_conf.c +++ b/src/mainboard/asrock/e350m1/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,7 @@ void get_bus_conf(void)
sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/asrock/e350m1/irq_tables.c b/src/mainboard/asrock/e350m1/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/asrock/e350m1/irq_tables.c +++ b/src/mainboard/asrock/e350m1/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/asrock/e350m1/mptable.c b/src/mainboard/asrock/e350m1/mptable.c index 258b39a..95df2a6 100644 --- a/src/mainboard/asrock/e350m1/mptable.c +++ b/src/mainboard/asrock/e350m1/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/asus/m5a88-v/get_bus_conf.c b/src/mainboard/asus/m5a88-v/get_bus_conf.c index c45364a..9bb26e6 100644 --- a/src/mainboard/asus/m5a88-v/get_bus_conf.c +++ b/src/mainboard/asus/m5a88-v/get_bus_conf.c @@ -36,7 +36,7 @@ */ int bus_isa; u8 bus_rs780[11]; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,8 @@ void get_bus_conf(void) sbdn_rs780 = sysconf.sbdn; sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800)); + for (i = 0; i < ARRAY_SIZE(bus_rs780); i++) { bus_rs780[i] = 0; } diff --git a/src/mainboard/asus/m5a88-v/irq_tables.c b/src/mainboard/asus/m5a88-v/irq_tables.c index 8592f0c..d9b6db1 100644 --- a/src/mainboard/asus/m5a88-v/irq_tables.c +++ b/src/mainboard/asus/m5a88-v/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
extern u8 bus_isa; extern u8 bus_rs780[8]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/asus/m5a88-v/mptable.c b/src/mainboard/asus/m5a88-v/mptable.c index 6438a68..cb7aeee 100644 --- a/src/mainboard/asus/m5a88-v/mptable.c +++ b/src/mainboard/asus/m5a88-v/mptable.c @@ -28,7 +28,7 @@
extern int bus_isa; extern u8 bus_rs780[11]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern u32 apicid_sb800; extern u32 bus_type[256]; extern u32 sbdn_rs780; diff --git a/src/mainboard/avalue/eax-785e/get_bus_conf.c b/src/mainboard/avalue/eax-785e/get_bus_conf.c index c45364a..9bb26e6 100644 --- a/src/mainboard/avalue/eax-785e/get_bus_conf.c +++ b/src/mainboard/avalue/eax-785e/get_bus_conf.c @@ -36,7 +36,7 @@ */ int bus_isa; u8 bus_rs780[11]; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -87,9 +87,8 @@ void get_bus_conf(void) sbdn_rs780 = sysconf.sbdn; sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800)); + for (i = 0; i < ARRAY_SIZE(bus_rs780); i++) { bus_rs780[i] = 0; } diff --git a/src/mainboard/avalue/eax-785e/irq_tables.c b/src/mainboard/avalue/eax-785e/irq_tables.c index 8592f0c..d9b6db1 100644 --- a/src/mainboard/avalue/eax-785e/irq_tables.c +++ b/src/mainboard/avalue/eax-785e/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
extern u8 bus_isa; extern u8 bus_rs780[8]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/avalue/eax-785e/mptable.c b/src/mainboard/avalue/eax-785e/mptable.c index eab2e02..1889e02 100644 --- a/src/mainboard/avalue/eax-785e/mptable.c +++ b/src/mainboard/avalue/eax-785e/mptable.c @@ -28,7 +28,7 @@
extern int bus_isa; extern u8 bus_rs780[11]; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern u32 apicid_sb800; extern u32 bus_type[256]; extern u32 sbdn_rs780; diff --git a/src/mainboard/lippert/frontrunner-af/get_bus_conf.c b/src/mainboard/lippert/frontrunner-af/get_bus_conf.c index 8872bb5..258d895 100644 --- a/src/mainboard/lippert/frontrunner-af/get_bus_conf.c +++ b/src/mainboard/lippert/frontrunner-af/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -99,9 +99,7 @@ void get_bus_conf(void) #endif sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/lippert/frontrunner-af/irq_tables.c b/src/mainboard/lippert/frontrunner-af/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/lippert/frontrunner-af/irq_tables.c +++ b/src/mainboard/lippert/frontrunner-af/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/lippert/frontrunner-af/mptable.c b/src/mainboard/lippert/frontrunner-af/mptable.c index fd03058..6b8aaa6 100644 --- a/src/mainboard/lippert/frontrunner-af/mptable.c +++ b/src/mainboard/lippert/frontrunner-af/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;
diff --git a/src/mainboard/lippert/toucan-af/get_bus_conf.c b/src/mainboard/lippert/toucan-af/get_bus_conf.c index 8872bb5..258d895 100644 --- a/src/mainboard/lippert/toucan-af/get_bus_conf.c +++ b/src/mainboard/lippert/toucan-af/get_bus_conf.c @@ -34,7 +34,7 @@ * and acpi_tables busnum is default. */ u8 bus_isa; -u8 bus_sb800[3]; +u8 bus_sb800[6]; u32 apicid_sb800;
/* @@ -99,9 +99,7 @@ void get_bus_conf(void) #endif sbdn_sb800 = 0;
- for (i = 0; i < 3; i++) { - bus_sb800[i] = 0; - } + memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) { bus_type[i] = 0; /* default ISA bus. */ diff --git a/src/mainboard/lippert/toucan-af/irq_tables.c b/src/mainboard/lippert/toucan-af/irq_tables.c index 5323d44..b9577cf 100644 --- a/src/mainboard/lippert/toucan-af/irq_tables.c +++ b/src/mainboard/lippert/toucan-af/irq_tables.c @@ -45,7 +45,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, pirq_info->rfu = rfu; } extern u8 bus_isa; -extern u8 bus_sb800[2]; +extern u8 bus_sb800[6]; extern unsigned long sbdn_sb800;
unsigned long write_pirq_routing_table(unsigned long addr) diff --git a/src/mainboard/lippert/toucan-af/mptable.c b/src/mainboard/lippert/toucan-af/mptable.c index fd03058..6b8aaa6 100644 --- a/src/mainboard/lippert/toucan-af/mptable.c +++ b/src/mainboard/lippert/toucan-af/mptable.c @@ -27,7 +27,7 @@ #include <cpu/amd/amdfam14.h> #include <SBPLATFORM.h>
-extern u8 bus_sb800[2]; +extern u8 bus_sb800[6];
extern u32 apicid_sb800;