Carl-Daniel Hailfinger wrote:
Fix GeodeLX init variables in stage1 to be const. Real global variables have to use the special framework or they won't work.
Found by my section correctness checker.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Stefan Reinauer stepan@coresystems.de
Index: corebootv3-check_illegal_global_vars/northbridge/amd/geodelx/geodelxinit.c
--- corebootv3-check_illegal_global_vars/northbridge/amd/geodelx/geodelxinit.c (revision 789) +++ corebootv3-check_illegal_global_vars/northbridge/amd/geodelx/geodelxinit.c (working copy) @@ -25,7 +25,7 @@ #include <amd_geodelx.h> #include "geodelink.h"
-static struct msrinit clock_gating_default[] = { +static const struct msrinit clock_gating_default[] = { {GLIU0_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0005}}, {MC_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0001}}, {VG_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0015}}, @@ -41,7 +41,7 @@ };
/** GeodeLink priority table. */ -static struct msrinit geode_link_priority_table[] = { +static const struct msrinit geode_link_priority_table[] = { {CPU_GLD_MSR_CONFIG, {.hi = 0x00,.lo = 0x0220}}, {DF_GLD_MSR_MASTER_CONF, {.hi = 0x00,.lo = 0x0000}}, {VG_GLD_MSR_CONFIG, {.hi = 0x00,.lo = 0x0720}}, @@ -417,7 +417,7 @@ static void clock_gating_init(void) { struct msr msr;
- struct msrinit *gating = clock_gating_default;
const struct msrinit *gating = clock_gating_default;
for (; gating->msrnum != 0xffffffff; gating++) { msr = rdmsr(gating->msrnum);
@@ -433,7 +433,7 @@ static void geode_link_priority(void) { struct msr msr;
- struct msrinit *prio = geode_link_priority_table;
const struct msrinit *prio = geode_link_priority_table;
for (; prio->msrnum != 0xffffffff; prio++) { msr = rdmsr(prio->msrnum);