coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <gpio.h>
6 #include <soc/romstage.h>
7 
8 static const struct mb_cfg ddr4_mem_config = {
10 
11  .rcomp = {
12  /* Baseboard uses only 100ohm Rcomp resistors */
13  .resistor = 100,
14 
15  /* Baseboard Rcomp target values */
16  .targets = {50, 20, 25, 25, 25},
17  },
18 
19  .ect = 1, /* Early Command Training */
20 
21  .UserBd = BOARD_TYPE_MOBILE,
22 
23  .ddr_config = {
24  .dq_pins_interleaved = 1,
25  },
26 };
27 
28 const struct mb_cfg *__weak variant_memory_params(void)
29 {
30  return &ddr4_mem_config;
31 }
32 
34 {
35  return false;
36 }
37 
39 {
41  spd_info->smbus[0].addr_dimm[0] = 0x50;
42  spd_info->smbus[0].addr_dimm[1] = 0x51;
43  spd_info->smbus[1].addr_dimm[0] = 0x52;
44  spd_info->smbus[1].addr_dimm[1] = 0x53;
45 }
@ MEM_TYPE_DDR4
Definition: meminit.h:11
@ MEM_TOPO_DIMM_MODULE
Definition: meminit.h:26
const struct mb_cfg *__weak variant_memory_params(void)
Definition: memory.c:67
void variant_get_spd_info(struct mem_spd *spd_info)
Definition: memory.c:32
bool variant_is_half_populated(void)
Definition: memory.c:27
static const struct mb_cfg ddr4_mem_config
Definition: memory.c:8
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
@ BOARD_TYPE_MOBILE
Definition: romstage.h:14
Definition: meminit.h:71
enum mem_type type
Definition: meminit.h:72
Definition: spd.h:11