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 <
option.h
>
4
#include <
soc/cnl_memcfg_init.h
>
5
#include <soc/gpio.h>
6
#include <soc/romstage.h>
7
#include <variant.h>
8
#include <variant/gpio.h>
9
10
void
mainboard_memory_init_params
(FSPM_UPD *memupd)
11
{
12
const
struct
cnl_mb_cfg
cfg = {
13
.
spd
= {
14
[0] = {
READ_SMBUS
, { 0x50 << 1 } },
15
[2] = {
READ_SMBUS
, { 0x52 << 1 } },
16
},
17
.rcomp_resistor = { 121, 75, 100 },
18
.rcomp_targets = { 50, 25, 20, 20, 26 },
19
.dq_pins_interleaved = 1,
20
.vref_ca_config = 2,
21
.ect = 0,
22
};
23
cannonlake_memcfg_init
(&memupd->FspmConfig, &cfg);
24
memupd->FspmConfig.EccSupport = 1;
25
memupd->FspmConfig.UserBd =
BOARD_TYPE_MOBILE
;
26
27
const
uint8_t
vtd =
get_uint_option
(
"vtd"
, 1);
28
memupd->FspmTestConfig.VtdDisable = !vtd;
29
const
uint8_t
ht =
get_uint_option
(
"hyper_threading"
, memupd->FspmConfig.HyperThreading);
30
memupd->FspmConfig.HyperThreading = ht;
31
32
variant_romstage_params
(memupd);
33
34
variant_configure_gpios
();
35
}
36
37
__weak
void
variant_romstage_params
(FSPM_UPD *
const
mupd)
38
{
39
}
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
READ_SMBUS
@ READ_SMBUS
Definition:
cnl_memcfg_init.h:35
mainboard_memory_init_params
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition:
romstage.c:22
variant_configure_gpios
void variant_configure_gpios(void)
Definition:
gpio.c:238
variant_romstage_params
__weak void variant_romstage_params(FSPM_UPD *const mupd)
Definition:
romstage.c:37
get_uint_option
unsigned int get_uint_option(const char *name, const unsigned int fallback)
Definition:
option.c:116
option.h
__weak
const struct smm_save_state_ops *legacy_ops __weak
Definition:
save_state.c:8
BOARD_TYPE_MOBILE
@ BOARD_TYPE_MOBILE
Definition:
romstage.h:14
uint8_t
unsigned char uint8_t
Definition:
stdint.h:8
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
src
mainboard
siemens
chili
romstage.c
Generated by
1.9.1