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-only */
2
3
#include <
soc/cnl_memcfg_init.h
>
4
#include <soc/romstage.h>
5
6
static
const
struct
cnl_mb_cfg
memcfg
= {
7
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
8
.
spd
[0] = {
9
.
read_type
=
READ_SPD_CBFS
,
10
.spd_spec = {.spd_index = 0},
11
},
12
.spd[1] = {.read_type =
NOT_EXISTING
},
13
.spd[2] = {
14
.read_type =
READ_SMBUS
,
15
.spd_spec = {.spd_smbus_address = 0xa4},
16
},
17
.spd[3] = {.read_type =
NOT_EXISTING
},
18
19
/*
20
* Rcomp resistor values. These values represent the resistance in
21
* ohms of the three rcomp resistors attached to the DDR_COMP_0,
22
* DDR_COMP_1, and DDR_COMP_2 pins on the DRAM.
23
*/
24
.rcomp_resistor = { 121, 81, 100 },
25
26
/* Rcomp target values */
27
.rcomp_targets = { 100, 40, 20, 20, 26 },
28
29
/*
30
* Indicates whether memory is interleaved.
31
* Set to 1 for an interleaved design,
32
* set to 0 for non-interleaved design.
33
*/
34
.dq_pins_interleaved = 1,
35
36
/*
37
* VREF_CA configuration.
38
* Set to 0 VREF_CA goes to both CH_A and CH_B,
39
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
40
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
41
*/
42
.vref_ca_config = 2,
43
44
/* Early Command Training */
45
.ect = 0,
46
};
47
48
void
mainboard_memory_init_params
(FSPM_UPD *memupd)
49
{
50
cannonlake_memcfg_init
(&memupd->FspmConfig, &
memcfg
);
51
}
cannonlake_memcfg_init
void cannonlake_memcfg_init(FSP_M_CONFIG *mem_cfg, const struct cnl_mb_cfg *cnl_cfg)
Definition:
cnl_memcfg_init.c:108
cnl_memcfg_init.h
NOT_EXISTING
@ NOT_EXISTING
Definition:
cnl_memcfg_init.h:34
READ_SMBUS
@ READ_SMBUS
Definition:
cnl_memcfg_init.h:35
READ_SPD_CBFS
@ READ_SPD_CBFS
Definition:
cnl_memcfg_init.h:36
mainboard_memory_init_params
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition:
romstage.c:22
memcfg
static const struct cnl_mb_cfg memcfg
Definition:
romstage.c:6
cnl_mb_cfg
Definition:
cnl_memcfg_init.h:55
cnl_mb_cfg::spd
struct spd_info spd[NUM_DIMM_SLOT]
Definition:
cnl_memcfg_init.h:57
spd_info::read_type
enum mem_info_read_type read_type
Definition:
cnl_memcfg_init.h:41
src
mainboard
system76
lemp9
romstage.c
Generated by
1.9.1