AMD hudson yangtze: 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.
We missed these boards for commit 9c7d73ca
because the arrays
had been renamed.
Change-Id: Iff2f2a0090d9302576bc72195d2a3f6fa37ce29a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3954
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Bruce Griffith <Bruce.Griffith@se-eng.com>
This commit is contained in:
parent
11b47801b2
commit
4f9bf7e2fb
|
@ -30,7 +30,7 @@
|
|||
* and acpi_tables busnum is default.
|
||||
*/
|
||||
u8 bus_isa;
|
||||
u8 bus_yangtze[3];
|
||||
u8 bus_yangtze[6];
|
||||
u32 apicid_yangtze;
|
||||
|
||||
/*
|
||||
|
@ -100,9 +100,7 @@ void get_bus_conf(void)
|
|||
|
||||
sbdn_yangtze = 0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
bus_yangtze[i] = 0;
|
||||
}
|
||||
memset(bus_yangtze, 0, sizeof(bus_yangtze));
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
bus_type[i] = 0; /* default ISA bus. */
|
||||
|
|
|
@ -44,7 +44,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
|
|||
}
|
||||
|
||||
extern u8 bus_isa;
|
||||
extern u8 bus_yangtze[2];
|
||||
extern u8 bus_yangtze[6];
|
||||
extern unsigned long sbdn_yangtze;
|
||||
|
||||
unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1
|
||||
#define IO_APIC_ID CONFIG_MAX_CPUS
|
||||
extern u8 bus_yangtze[3];
|
||||
extern u8 bus_yangtze[6];
|
||||
|
||||
extern u32 bus_type[256];
|
||||
extern u32 sbdn_yangtze;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* and acpi_tables busnum is default.
|
||||
*/
|
||||
u8 bus_isa;
|
||||
u8 bus_hudson[3];
|
||||
u8 bus_hudson[6];
|
||||
u32 apicid_hudson;
|
||||
|
||||
/*
|
||||
|
@ -97,9 +97,7 @@ void get_bus_conf(void)
|
|||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
bus_hudson[i] = 0;
|
||||
}
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
bus_type[i] = 0; /* default ISA bus. */
|
||||
|
|
|
@ -44,7 +44,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
|
|||
}
|
||||
|
||||
extern u8 bus_isa;
|
||||
extern u8 bus_hudson[2];
|
||||
extern u8 bus_hudson[6];
|
||||
extern unsigned long sbdn_hudson;
|
||||
|
||||
unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1
|
||||
#define IO_APIC_ID CONFIG_MAX_CPUS
|
||||
extern u8 bus_hudson[3];
|
||||
extern u8 bus_hudson[6];
|
||||
|
||||
extern u32 bus_type[256];
|
||||
extern u32 sbdn_hudson;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* and acpi_tables busnum is default.
|
||||
*/
|
||||
u8 bus_isa;
|
||||
u8 bus_hudson[3];
|
||||
u8 bus_hudson[6];
|
||||
u32 apicid_hudson;
|
||||
|
||||
/*
|
||||
|
@ -97,9 +97,7 @@ void get_bus_conf(void)
|
|||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
bus_hudson[i] = 0;
|
||||
}
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
bus_type[i] = 0; /* default ISA bus. */
|
||||
|
|
|
@ -44,7 +44,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
|
|||
}
|
||||
|
||||
extern u8 bus_isa;
|
||||
extern u8 bus_hudson[2];
|
||||
extern u8 bus_hudson[6];
|
||||
extern unsigned long sbdn_hudson;
|
||||
|
||||
unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1
|
||||
#define IO_APIC_ID CONFIG_MAX_CPUS
|
||||
extern u8 bus_hudson[3];
|
||||
extern u8 bus_hudson[6];
|
||||
|
||||
extern u32 bus_type[256];
|
||||
extern u32 sbdn_hudson;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* and acpi_tables busnum is default.
|
||||
*/
|
||||
u8 bus_isa;
|
||||
u8 bus_yangtze[3];
|
||||
u8 bus_yangtze[6];
|
||||
u32 apicid_yangtze;
|
||||
|
||||
/*
|
||||
|
@ -100,9 +100,7 @@ void get_bus_conf(void)
|
|||
|
||||
sbdn_yangtze = 0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
bus_yangtze[i] = 0;
|
||||
}
|
||||
memset(bus_yangtze, 0, sizeof(bus_yangtze));
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
bus_type[i] = 0; /* default ISA bus. */
|
||||
|
|
|
@ -44,7 +44,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
|
|||
}
|
||||
|
||||
extern u8 bus_isa;
|
||||
extern u8 bus_yangtze[2];
|
||||
extern u8 bus_yangtze[6];
|
||||
extern unsigned long sbdn_yangtze;
|
||||
|
||||
unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1
|
||||
#define IO_APIC_ID CONFIG_MAX_CPUS
|
||||
extern u8 bus_yangtze[3];
|
||||
extern u8 bus_yangtze[6];
|
||||
|
||||
extern u32 bus_type[256];
|
||||
extern u32 sbdn_yangtze;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* and acpi_tables busnum is default.
|
||||
*/
|
||||
u8 bus_isa;
|
||||
u8 bus_hudson[3];
|
||||
u8 bus_hudson[6];
|
||||
u32 apicid_hudson;
|
||||
|
||||
/*
|
||||
|
@ -97,9 +97,7 @@ void get_bus_conf(void)
|
|||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
bus_hudson[i] = 0;
|
||||
}
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
bus_type[i] = 0; /* default ISA bus. */
|
||||
|
|
|
@ -44,7 +44,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
|
|||
}
|
||||
|
||||
extern u8 bus_isa;
|
||||
extern u8 bus_hudson[2];
|
||||
extern u8 bus_hudson[6];
|
||||
extern unsigned long sbdn_hudson;
|
||||
|
||||
unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
//-#define IO_APIC_ID CONFIG_MAX_PHYSICAL_CPUS + 1
|
||||
#define IO_APIC_ID CONFIG_MAX_CPUS
|
||||
extern u8 bus_hudson[3];
|
||||
extern u8 bus_hudson[6];
|
||||
|
||||
extern u32 bus_type[256];
|
||||
extern u32 sbdn_hudson;
|
||||
|
|
Loading…
Reference in New Issue