blob: 81f1ef3272bcf0b1020a08a88a8a013d84bb8ce3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <option.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
#include <types.h>
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
const struct mb_cfg mem_config = {
.type = MEM_TYPE_DDR4,
};
const bool half_populated = false;
const struct mem_spd ddr4_spd_info = {
.topo = MEM_TOPO_DIMM_MODULE,
.smbus = {
[0] = {
.addr_dimm[0] = 0x50,
},
[1] = {
.addr_dimm[0] = 0x52,
},
},
};
memcfg_init(mupd, &mem_config, &ddr4_spd_info, half_populated);
const uint8_t vtd = get_uint_option("vtd", 1);
mupd->FspmConfig.VtdDisable = !vtd;
/* Enable/Disable Wireless (RP05) based on CMOS settings */
if (get_uint_option("wireless", 1) == 0)
mupd->FspmConfig.PcieRpEnableMask &= ~(1 << 4);
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
};
|