diff options
author | Tim Chen <Tim-Chen@quantatw.com> | 2014-10-14 20:17:11 +0800 |
---|---|---|
committer | Marc Jones <marc@marcjonesconsulting.com> | 2015-10-16 22:41:17 +0000 |
commit | f3214d02482a4104d7276f06d6b326b2a54c4262 (patch) | |
tree | a9a3f714b1cb602d44e4159cfac131a8396c3957 /src | |
parent | cbda504eecc03f63313f054b83fc6b3c6988a9db (diff) | |
download | coreboot-f3214d02482a4104d7276f06d6b326b2a54c4262.tar.xz |
auron: fix can not recognize 4G memory
Part of the following patch was lost in the merge from chromium.
This patch fixes up the spd_index for the copy from the SPD file.
In spd.c "spd_index *= SPD_LEN" will change the original spd_index
from gpio and let the following if(spd_index>3) to misjudge and
disable channel 1 incorrectly. So we calculate the index for spd file
memcpy when calling memcpy().
BUG=chrome-os-partner:32879
TEST=Can get total memory 4G on yuna 4G SKU
BRANCH=Auron
Original-Change-Id: Iebc49e20e4ca15ef6db8c4defe43cc22382a28bf
Original-Signed-off-by: Tim Chen <Tim-Chen@quantatw.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/234420
Original-Reviewed-by: Shawn N <shawnn@chromium.org>
Original-Commit-Queue: Shawn N <shawnn@chromium.org>
Original-Tested-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit 3b1fce58b7b4b15e947b40fd011174d4e8e294bc)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: I03f9d63623e083c99d349d938fd802d828858f70
Reviewed-on: http://review.coreboot.org/11911
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Georg Wicherski <gw@oxff.net>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/auron/spd/spd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainboard/google/auron/spd/spd.c b/src/mainboard/google/auron/spd/spd.c index 2f3f20c2e2..4f35477e4a 100644 --- a/src/mainboard/google/auron/spd/spd.c +++ b/src/mainboard/google/auron/spd/spd.c @@ -122,14 +122,14 @@ void mainboard_fill_spd_data(struct pei_data *pei_data) die("Missing SPD data."); memcpy(pei_data->spd_data[0][0], - spd_file + spd_index, SPD_LEN); + spd_file + (spd_index * SPD_LEN), SPD_LEN); /* Index 0-2 are 4GB config with both CH0 and CH1. * Index 4-6 are 2GB config with CH0 only. */ if (spd_index > 3) pei_data->dimm_channel1_disabled = 3; else memcpy(pei_data->spd_data[1][0], - spd_file + spd_index, SPD_LEN); + spd_file + (spd_index * SPD_LEN), SPD_LEN); /* Make sure a valid SPD was found */ if (pei_data->spd_data[0][0][0] == 0) |