From 81fb981e8ecec077674b5d3bce823b0efd9459cc Mon Sep 17 00:00:00 2001 From: Mario Scheithauer Date: Tue, 4 Jul 2023 15:32:39 +0200 Subject: mb/siemens/mc_ehl: Make DRAM population configurable There can be mainboard variants, which are only equipped with half-populated DRAM. For this reason, the meminit parameter for populatation should be adjustable. The default setting remains at full-populated DRAM. At mainboard variant level a different selection via individual input paths can be made. Change-Id: I390bbfa680b5505bb2230fa0740720bd9dd1fafb Signed-off-by: Mario Scheithauer Reviewed-on: https://review.coreboot.org/c/coreboot/+/76244 Reviewed-by: Eric Lai Reviewed-by: Jan Samek Tested-by: build bot (Jenkins) --- src/mainboard/siemens/mc_ehl/romstage_fsp_params.c | 7 ++++++- .../siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mainboard/siemens/mc_ehl/romstage_fsp_params.c b/src/mainboard/siemens/mc_ehl/romstage_fsp_params.c index 98c93489ea..28fca2da10 100644 --- a/src/mainboard/siemens/mc_ehl/romstage_fsp_params.c +++ b/src/mainboard/siemens/mc_ehl/romstage_fsp_params.c @@ -10,6 +10,11 @@ #include #include +bool __weak half_populated(void) +{ + return false; +} + void mainboard_memory_init_params(FSPM_UPD *memupd) { static struct spd_info spd_info; @@ -29,7 +34,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) die("SPD in HW-Info not valid!\n"); } /* Initialize variant specific configurations */ - memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, false); + memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated()); /* Enable Row-Hammer prevention */ memupd->FspmConfig.RhPrevention = 1; diff --git a/src/mainboard/siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h b/src/mainboard/siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h index 0893d99e03..901047991d 100644 --- a/src/mainboard/siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h @@ -15,6 +15,9 @@ const struct pad_config *variant_early_gpio_table(size_t *num); /* This function returns SPD related FSP-M mainboard configs */ const struct mb_cfg *variant_memcfg_config(void); +/* This function can select half-populate DRAM */ +bool half_populated(void); + /* The following function performs board specific things. */ void variant_mainboard_final(void); -- cgit v1.2.3