coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/variants.h>
5 #include <gpio.h>
6 #include <memory_info.h>
7 #include <soc/meminit.h>
8 #include <soc/romstage.h>
9 #include <variant/gpio.h>
10 
11 void mainboard_memory_init_params(FSPM_UPD *memupd)
12 {
13  const struct mb_cfg *board_cfg = variant_memcfg_config();
14  const struct spd_info spd_info = {
16  .spd_spec.spd_index = variant_memory_sku(),
17  };
18  bool half_populated = variant_mem_is_half_populated();
19 
20  memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated);
21 }
void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg, const struct mem_spd *spd_info, bool half_populated)
Definition: meminit.c:238
@ READ_SPD_CBFS
bool variant_mem_is_half_populated(void)
Get data whether memory channel is half-populated or not.
Definition: memory.c:63
const struct mb_cfg * variant_memcfg_config(void)
Definition: memory.c:46
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition: romstage.c:22
int __weak variant_memory_sku(void)
Definition: memory.c:74
static const struct mb_cfg board_cfg
Definition: romstage.c:8
Definition: meminit.h:71
Definition: spd.h:11
enum mem_info_read_type read_type