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/meminit.h>
5
#include <soc/romstage.h>
6
#include <types.h>
7
8
void
mainboard_memory_init_params
(FSPM_UPD *mupd)
9
{
10
const
struct
mb_cfg
mem_config
= {
11
.
type
=
MEM_TYPE_DDR4
,
12
};
13
14
const
bool
half_populated =
false
;
15
16
const
struct
mem_spd
ddr4_spd_info = {
17
.
topo
=
MEM_TOPO_DIMM_MODULE
,
18
.smbus = {
19
[0] = {
20
.addr_dimm[0] = 0x50,
21
},
22
[1] = {
23
.addr_dimm[0] = 0x52,
24
},
25
},
26
};
27
28
memcfg_init
(mupd, &
mem_config
, &ddr4_spd_info, half_populated);
29
30
const
uint8_t
vtd =
get_uint_option
(
"vtd"
, 1);
31
mupd->FspmConfig.VtdDisable = !vtd;
32
33
const
uint8_t
ht =
get_uint_option
(
"hyper_threading"
,
34
mupd->FspmConfig.HyperThreading);
35
mupd->FspmConfig.HyperThreading = ht;
36
37
/* Enable/Disable Thunderbolt based on CMOS settings */
38
if
(
get_uint_option
(
"thunderbolt"
, 1) == 0) {
39
mupd->FspmConfig.VtdItbtEnable = 0;
40
mupd->FspmConfig.VtdBaseAddress[3] = 0;
41
mupd->FspmConfig.TcssDma0En = 0;
42
mupd->FspmConfig.TcssItbtPcie0En = 0;
43
}
44
};
memcfg_init
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
MEM_TYPE_DDR4
@ MEM_TYPE_DDR4
Definition:
meminit.h:11
MEM_TOPO_DIMM_MODULE
@ MEM_TOPO_DIMM_MODULE
Definition:
meminit.h:26
mainboard_memory_init_params
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition:
romstage.c:22
mem_config
static const struct mb_cfg mem_config
Definition:
memory.c:11
get_uint_option
unsigned int get_uint_option(const char *name, const unsigned int fallback)
Definition:
option.c:116
option.h
uint8_t
unsigned char uint8_t
Definition:
stdint.h:8
mb_cfg
Definition:
meminit.h:71
mb_cfg::type
enum mem_type type
Definition:
meminit.h:72
mem_spd
Definition:
meminit.h:37
mem_spd::topo
enum mem_topology topo
Definition:
meminit.h:38
src
mainboard
starlabs
labtop
variants
tgl
romstage.c
Generated by
1.9.1