diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2015-07-20 16:59:20 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-07-23 16:42:35 +0200 |
commit | 82286219557baa0a46ab110d8f21afc1980553ac (patch) | |
tree | ad7b40f132c6af1c24c17e41fc7d66e9f475d950 /src | |
parent | 46a2c77aaf6e2a74cffbe6ebcfed568a1277f738 (diff) | |
download | coreboot-82286219557baa0a46ab110d8f21afc1980553ac.tar.xz |
glados: Add SPD manufacturer and part number
The FSP memory info hob does not return this data so we need
to supply it from the SPD included with the mainboard.
BUG=chrome-os-partner:42975, chrome-os-partner:42561
BRANCH=none
TEST=execute "mosys memory spd print all" on glados
Change-Id: Idfb71d36d1f8163d0daceb68675b10194db7cde7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7feece45900e5166864927047ad3ab7b997f8258
Original-Change-Id: Id2bc544ac5faf53f0f676fe132fea1db5640a401
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/286877
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11034
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/glados/romstage.c | 24 | ||||
-rw-r--r-- | src/mainboard/google/glados/spd/spd.h | 1 |
2 files changed, 17 insertions, 8 deletions
diff --git a/src/mainboard/google/glados/romstage.c b/src/mainboard/google/glados/romstage.c index afcad8cad7..4d9aaf4208 100644 --- a/src/mainboard/google/glados/romstage.c +++ b/src/mainboard/google/glados/romstage.c @@ -21,6 +21,7 @@ #include <cbfs.h> #include <console/console.h> +#include <memory_info.h> #include <string.h> #include <ec/google/chromeec/ec.h> #include <soc/pei_data.h> @@ -45,14 +46,6 @@ void mainboard_memory_init_params(struct romstage_params *params, (UINT32)(params->pei_data->spd_data[0][0]); memory_params->MemorySpdPtr10 = (UINT32)(params->pei_data->spd_data[1][0]); - printk(BIOS_SPEW, "0x%08x: SpdDataBuffer_0_0\n", - memory_params->MemorySpdPtr00); - printk(BIOS_SPEW, "0x%08x: SpdDataBuffer_0_1\n", - memory_params->MemorySpdPtr01); - printk(BIOS_SPEW, "0x%08x: SpdDataBuffer_1_0\n", - memory_params->MemorySpdPtr10); - printk(BIOS_SPEW, "0x%08x: SpdDataBuffer_1_1\n", - memory_params->MemorySpdPtr11); } memcpy(memory_params->DqByteMapCh0, params->pei_data->dq_map[0], sizeof(params->pei_data->dq_map[0])); @@ -69,3 +62,18 @@ void mainboard_memory_init_params(struct romstage_params *params, memory_params->MemorySpdDataLen = SPD_LEN; memory_params->DqPinsInterleaved = FALSE; } + +void mainboard_add_dimm_info(struct romstage_params *params, + struct memory_info *mem_info, + int channel, int dimm, int index) +{ + /* Set the manufacturer */ + memcpy(&mem_info->dimm[index].mod_id, + ¶ms->pei_data->spd_data[channel][dimm][SPD_MANU_OFF], + sizeof(mem_info->dimm[index].mod_id)); + + /* Set the module part number */ + memcpy(mem_info->dimm[index].module_part_number, + ¶ms->pei_data->spd_data[channel][dimm][SPD_PART_OFF], + sizeof(mem_info->dimm[index].module_part_number)); +} diff --git a/src/mainboard/google/glados/spd/spd.h b/src/mainboard/google/glados/spd/spd.h index abb964ed82..f1b733f756 100644 --- a/src/mainboard/google/glados/spd/spd.h +++ b/src/mainboard/google/glados/spd/spd.h @@ -32,5 +32,6 @@ #define SPD_BUS_DEV_WIDTH 8 #define SPD_PART_OFF 128 #define SPD_PART_LEN 18 +#define SPD_MANU_OFF 148 #endif |