summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorMario Scheithauer <mario.scheithauer@siemens.com>2023-07-04 15:32:39 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-06 13:55:21 +0000
commit81fb981e8ecec077674b5d3bce823b0efd9459cc (patch)
tree1a2efb7b92a3b099c8e49f16f50157f05ef84c00 /src/mainboard
parent6aaa4f9198666b28f6081458f4d5184167305f99 (diff)
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>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/siemens/mc_ehl/romstage_fsp_params.c7
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/baseboard/include/baseboard/variants.h3
2 files changed, 9 insertions, 1 deletions
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 <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;
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);