From 46a2c77aaf6e2a74cffbe6ebcfed568a1277f738 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 20 Jul 2015 16:48:55 -0700 Subject: intel: common: Let mainboard supplement FSP memory info Since the FSP memory info HOB does not return all the data that we need about a DIMM add a weak function that will allow the mainboard to supplement the generated memory_info structure. Ideally this would not be necessary but until FSP returns the module part number we need this. BUG=chrome-os-partner:42975, chrome-os-partner:42561 BRANCH=none TEST=run "mosys memory spd print all" on glados Change-Id: Ic6d0ee0a31d23efcf7e7d7f18a74e944e09e7b46 Signed-off-by: Patrick Georgi Original-Commit-Id: 34ad7f1906ba526e52d38d5a6bce7b88b83f0c13 Original-Change-Id: I8509c5c627c1605894473fdea567e7f7ede08cf9 Original-Signed-off-by: Duncan Laurie Original-Reviewed-on: https://chromium-review.googlesource.com/286876 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11033 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/common/romstage.c | 13 +++++++++++++ src/soc/intel/common/romstage.h | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'src') diff --git a/src/soc/intel/common/romstage.c b/src/soc/intel/common/romstage.c index 99ac890d5f..7a05e177f1 100644 --- a/src/soc/intel/common/romstage.c +++ b/src/soc/intel/common/romstage.c @@ -363,6 +363,10 @@ __attribute__((weak)) void mainboard_save_dimm_info( MEMORY_BUS_WIDTH_128; break; } + + /* Add any mainboard specific information */ + mainboard_add_dimm_info(params, mem_info, + channel, dimm, index); index++; } } @@ -371,6 +375,15 @@ __attribute__((weak)) void mainboard_save_dimm_info( printk(BIOS_DEBUG, "%d DIMMs found\n", mem_info->dimm_cnt); } +/* Add any mainboard specific information */ +__attribute__((weak)) void mainboard_add_dimm_info( + struct romstage_params *params, + struct memory_info *mem_info, + int channel, int dimm, int index) +{ + printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); +} + /* Get the memory configuration data */ __attribute__((weak)) int mrc_cache_get_current( const struct mrc_saved_data **cache) diff --git a/src/soc/intel/common/romstage.h b/src/soc/intel/common/romstage.h index c677095e06..403016e3b5 100644 --- a/src/soc/intel/common/romstage.h +++ b/src/soc/intel/common/romstage.h @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -76,6 +77,9 @@ void mainboard_memory_init_params(struct romstage_params *params, void mainboard_pre_console_init(struct romstage_params *params); void mainboard_romstage_entry(struct romstage_params *params); void mainboard_save_dimm_info(struct romstage_params *params); +void mainboard_add_dimm_info(struct romstage_params *params, + struct memory_info *mem_info, + int channel, int dimm, int index); void raminit(struct romstage_params *params); void report_memory_config(void); void report_platform_info(void); -- cgit v1.2.3