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 <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76244
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Mario Scheithauer 2023-07-04 15:32:39 +02:00 committed by Felix Held
parent 6aaa4f9198
commit 81fb981e8e
2 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,11 @@
#include <string.h>
#include <types.h>
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;

View File

@ -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);