diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-09-09 09:23:19 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-10-07 19:09:34 +0200 |
commit | 4f9bf7e2fb7035725c2899db0d00d77007d9113c (patch) | |
tree | b17697e1c06d8bfaf80cc535152ec61a6a910088 /src/mainboard/amd/parmer/get_bus_conf.c | |
parent | 11b47801b2c3abc3bb8c523b722fafa1103bff45 (diff) | |
download | coreboot-4f9bf7e2fb7035725c2899db0d00d77007d9113c.tar.xz |
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>
Diffstat (limited to 'src/mainboard/amd/parmer/get_bus_conf.c')
-rw-r--r-- | src/mainboard/amd/parmer/get_bus_conf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mainboard/amd/parmer/get_bus_conf.c b/src/mainboard/amd/parmer/get_bus_conf.c index d1be8b6268..c92fea95ed 100644 --- a/src/mainboard/amd/parmer/get_bus_conf.c +++ b/src/mainboard/amd/parmer/get_bus_conf.c @@ -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. */ |