Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6145
-gerrit
commit 6750f9e0e0836f3e9010fd615651180cc73de00d Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sat Jun 28 15:29:26 2014 +1000
northbridge/amd/{gx2,lx}/raminit.c: spd_byte can end up uninitialised
If the if-else construct falls though to 'else' then spd_byte is used before initialised. Set it to zero to be safe.
Change-Id: I514dc3d673758f8f546d43a7a0868485d1d8d5ab Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/northbridge/amd/gx2/raminit.c | 2 +- src/northbridge/amd/lx/raminit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/amd/gx2/raminit.c b/src/northbridge/amd/gx2/raminit.c index 71d0a16..a73b389 100644 --- a/src/northbridge/amd/gx2/raminit.c +++ b/src/northbridge/amd/gx2/raminit.c @@ -290,7 +290,7 @@ static void setCAS(void) * Destroys: We really use everything ! */ uint16_t glspeed; - uint8_t spd_byte, casmap0, casmap1; + uint8_t spd_byte, casmap0, casmap1 = 0; msr_t msr;
glspeed = GeodeLinkSpeed(); diff --git a/src/northbridge/amd/lx/raminit.c b/src/northbridge/amd/lx/raminit.c index 6dfb073..389af11 100644 --- a/src/northbridge/amd/lx/raminit.c +++ b/src/northbridge/amd/lx/raminit.c @@ -303,7 +303,7 @@ static void setCAS(void) ;* Destroys: We really use everything ! ;*****************************************************************************/ uint16_t glspeed; - uint8_t spd_byte, casmap0, casmap1; + uint8_t spd_byte, casmap0, casmap1 = 0; msr_t msr;
glspeed = GeodeLinkSpeed();