blob: 221c6c41d5d2e6410fb6bb49bd18cfdb305efc39 [file] [log] [blame]
Rizwan Qureshi1222a732016-08-23 14:31:23 +05301/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2016 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053016#include <arch/cpu.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053017#include <arch/symbols.h>
18#include <assert.h>
19#include <cpu/x86/mtrr.h>
Naresh G Solanki79239b72016-11-16 21:34:41 +053020#include <cpu/x86/msr.h>
Kyösti Mälkkib2a5f0b2019-08-04 19:54:32 +030021#include <cpu/x86/smm.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053022#include <cbmem.h>
Rizwan Qureshi1222a732016-08-23 14:31:23 +053023#include <console/console.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053024#include <device/pci_def.h>
Rizwan Qureshi1222a732016-08-23 14:31:23 +053025#include <fsp/util.h>
Shaunak Sahad3476802017-07-08 01:08:40 -070026#include <intelblocks/pmclib.h>
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053027#include <memory_info.h>
Barnali Sarkarf7f01f72018-01-11 16:40:54 +053028#include <smbios.h>
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053029#include <soc/intel/common/smbios.h>
Naresh G Solanki79239b72016-11-16 21:34:41 +053030#include <soc/msr.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053031#include <soc/pci_devs.h>
32#include <soc/pm.h>
Rizwan Qureshi1222a732016-08-23 14:31:23 +053033#include <soc/romstage.h>
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053034#include <string.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053035#include <timestamp.h>
Philipp Deppenwiesefea24292017-10-17 17:02:29 +020036#include <security/vboot/vboot_common.h>
Barnali Sarkar5bf42c62016-08-24 20:48:46 +053037
Elyes HAOUASc3385072019-03-21 15:38:06 +010038#include "../chip.h"
39
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053040#define FSP_SMBIOS_MEMORY_INFO_GUID \
41{ \
42 0xd4, 0x71, 0x20, 0x9b, 0x54, 0xb0, 0x0c, 0x4e, \
43 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \
44}
45
Subrata Banik54fa28e2018-02-07 14:59:34 +053046/* Memory Channel Present Status */
47enum {
48 CHANNEL_NOT_PRESENT,
49 CHANNEL_DISABLED,
50 CHANNEL_PRESENT
51};
52
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053053/* Save the DIMM information for SMBIOS table 17 */
54static void save_dimm_info(void)
55{
56 int channel, dimm, dimm_max, index;
57 size_t hob_size;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +053058 uint8_t ddr_type;
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053059 const CONTROLLER_INFO *ctrlr_info;
60 const CHANNEL_INFO *channel_info;
61 const DIMM_INFO *src_dimm;
62 struct dimm_info *dest_dimm;
63 struct memory_info *mem_info;
64 const MEMORY_INFO_DATA_HOB *memory_info_hob;
Subrata Banik54fa28e2018-02-07 14:59:34 +053065 const uint8_t smbios_memory_info_guid[16] =
66 FSP_SMBIOS_MEMORY_INFO_GUID;
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053067
68 /* Locate the memory info HOB, presence validated by raminit */
69 memory_info_hob =
70 fsp_find_extension_hob_by_guid(smbios_memory_info_guid,
71 &hob_size);
Subrata Banik54fa28e2018-02-07 14:59:34 +053072 if (memory_info_hob == NULL || hob_size == 0) {
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053073 printk(BIOS_ERR, "SMBIOS MEMORY_INFO_DATA_HOB not found\n");
74 return;
75 }
76
77 /*
78 * Allocate CBMEM area for DIMM information used to populate SMBIOS
79 * table 17
80 */
81 mem_info = cbmem_add(CBMEM_ID_MEMINFO, sizeof(*mem_info));
82 if (mem_info == NULL) {
83 printk(BIOS_ERR, "CBMEM entry for DIMM info missing\n");
84 return;
85 }
86 memset(mem_info, 0, sizeof(*mem_info));
87
88 /* Describe the first N DIMMs in the system */
89 index = 0;
90 dimm_max = ARRAY_SIZE(mem_info->dimm);
91 ctrlr_info = &memory_info_hob->Controller[0];
Nico Huber9dc62ea2017-07-19 15:45:14 +020092 for (channel = 0; channel < MAX_CH && index < dimm_max; channel++) {
Balaji Manigandan Bbd55c022017-09-22 14:27:56 +053093 channel_info = &ctrlr_info->ChannelInfo[channel];
Subrata Banik54fa28e2018-02-07 14:59:34 +053094 if (channel_info->Status != CHANNEL_PRESENT)
Nico Huber9dc62ea2017-07-19 15:45:14 +020095 continue;
96 for (dimm = 0; dimm < MAX_DIMM && index < dimm_max; dimm++) {
Balaji Manigandan Bbd55c022017-09-22 14:27:56 +053097 src_dimm = &channel_info->DimmInfo[dimm];
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +053098 dest_dimm = &mem_info->dimm[index];
99
Nico Huber9dc62ea2017-07-19 15:45:14 +0200100 if (src_dimm->Status != DIMM_PRESENT)
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +0530101 continue;
102
Elyes HAOUAS0ce41f12018-11-13 10:03:31 +0100103 switch (memory_info_hob->MemoryType) {
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530104 case MRC_DDR_TYPE_DDR4:
Elyes HAOUAS28114ae2018-11-14 17:51:00 +0100105 ddr_type = MEMORY_TYPE_DDR4;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530106 break;
107 case MRC_DDR_TYPE_DDR3:
Elyes HAOUAS28114ae2018-11-14 17:51:00 +0100108 ddr_type = MEMORY_TYPE_DDR3;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530109 break;
110 case MRC_DDR_TYPE_LPDDR3:
Elyes HAOUAS28114ae2018-11-14 17:51:00 +0100111 ddr_type = MEMORY_TYPE_LPDDR3;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530112 break;
113 default:
Elyes HAOUAS28114ae2018-11-14 17:51:00 +0100114 ddr_type = MEMORY_TYPE_UNKNOWN;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530115 break;
116 }
Christian Walterf9723222019-05-28 10:37:24 +0200117 u8 memProfNum = memory_info_hob->MemoryProfile;
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530118
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +0530119 /* Populate the DIMM information */
120 dimm_info_fill(dest_dimm,
121 src_dimm->DimmCapacity,
Barnali Sarkarf7f01f72018-01-11 16:40:54 +0530122 ddr_type,
Balaji Manigandan Bbd55c022017-09-22 14:27:56 +0530123 memory_info_hob->ConfiguredMemoryClockSpeed,
Francois Toguo993f68a2019-02-04 17:05:51 -0800124 src_dimm->RankInDimm,
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +0530125 channel_info->ChannelId,
126 src_dimm->DimmId,
127 (const char *)src_dimm->ModulePartNum,
128 sizeof(src_dimm->ModulePartNum),
Duncan Laurie46340d02019-05-17 14:57:31 -0600129 src_dimm->SpdSave + SPD_SAVE_OFFSET_SERIAL,
Christian Walterf9723222019-05-28 10:37:24 +0200130 memory_info_hob->DataWidth,
131 memory_info_hob->VddVoltage[memProfNum],
Duncan Laurie1a86cda2019-06-10 14:00:56 -0700132 memory_info_hob->EccSupport,
133 src_dimm->MfgId,
134 src_dimm->SpdModuleType);
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +0530135 index++;
136 }
137 }
138 mem_info->dimm_cnt = index;
139 printk(BIOS_DEBUG, "%d DIMMs found\n", mem_info->dimm_cnt);
140}
141
Aaron Durbin79f07412017-04-16 21:49:29 -0500142asmlinkage void car_stage_entry(void)
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530143{
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530144 bool s3wake;
145 struct postcar_frame pcf;
146 uintptr_t top_of_ram;
147 struct chipset_power_state *ps;
148
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530149 console_init();
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530150
151 /* Program MCHBAR, DMIBAR, GDXBAR and EDRAMBAR */
152 systemagent_early_init();
153
Shaunak Sahad3476802017-07-08 01:08:40 -0700154 ps = pmc_get_power_state();
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530155 timestamp_add_now(TS_START_ROMSTAGE);
Shaunak Sahad3476802017-07-08 01:08:40 -0700156 s3wake = pmc_fill_power_state(ps) == ACPI_S3;
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530157 fsp_memory_init(s3wake);
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530158 pmc_set_disb();
Barnali Sarkarb7fa7fb2017-02-10 21:36:58 +0530159 if (!s3wake)
160 save_dimm_info();
Kyösti Mälkki6e2d0c12019-06-28 10:08:51 +0300161 if (postcar_frame_init(&pcf, 0))
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530162 die("Unable to initialize postcar frame.\n");
163
164 /*
165 * We need to make sure ramstage will be run cached. At this
166 * point exact location of ramstage in cbmem is not known.
167 * Instruct postcar to cache 16 megs under cbmem top which is
168 * a safe bet to cover ramstage.
169 */
170 top_of_ram = (uintptr_t) cbmem_top();
171 printk(BIOS_DEBUG, "top_of_ram = 0x%lx\n", top_of_ram);
172 top_of_ram -= 16*MiB;
173 postcar_frame_add_mtrr(&pcf, top_of_ram, 16*MiB, MTRR_TYPE_WRBACK);
174
Julius Wernercd49cce2019-03-05 16:53:33 -0800175 if (CONFIG(HAVE_SMI_HANDLER)) {
Kyösti Mälkki14222d82019-08-05 15:10:18 +0300176 uintptr_t smm_base;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530177 size_t smm_size;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530178
179 /*
180 * Cache the TSEG region at the top of ram. This region is
181 * not restricted to SMM mode until SMM has been relocated.
182 * By setting the region to cacheable it provides faster access
183 * when relocating the SMM handler as well as using the TSEG
184 * region for other purposes.
185 */
186 smm_region(&smm_base, &smm_size);
Kyösti Mälkki14222d82019-08-05 15:10:18 +0300187 postcar_frame_add_mtrr(&pcf, smm_base, smm_size,
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530188 MTRR_TYPE_WRBACK);
189 }
190
191 /* Cache the ROM as WP just below 4GiB. */
Nico Huber6ea67752018-05-27 14:37:52 +0200192 postcar_frame_add_romcache(&pcf, MTRR_TYPE_WRPROT);
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530193
Aaron Durbin79f07412017-04-16 21:49:29 -0500194 run_postcar_phase(&pcf);
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530195}
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530196
Naresh G Solanki79239b72016-11-16 21:34:41 +0530197static void cpu_flex_override(FSP_M_CONFIG *m_cfg)
198{
199 msr_t flex_ratio;
200 m_cfg->CpuRatioOverride = 1;
201 /*
202 * Set cpuratio to that value set in bootblock, This will ensure FSPM
203 * knows the intended flex ratio.
204 */
205 flex_ratio = rdmsr(MSR_FLEX_RATIO);
206 m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
207}
208
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300209static void soc_peg_init_params(FSP_M_CONFIG *m_cfg,
210 FSP_M_TEST_CONFIG *m_t_cfg,
211 const struct soc_intel_skylake_config *config)
212{
213 const struct device *dev;
214 /*
215 * To enable or disable the corresponding PEG root port you need to
216 * add to the devicetree.cb:
217 *
218 * device pci 01.0 on end # enable PEG0 root port
219 * device pci 01.1 off end # do not configure PEG1
220 *
221 * If PEG port is not defined in the device tree, it will be disabled
222 * in FSP
223 */
Kyösti Mälkki71756c212019-07-12 13:10:19 +0300224 dev = pcidev_on_root(SA_DEV_SLOT_PEG, 0); /* PEG 0:1:0 */
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300225 if (!dev || !dev->enabled)
226 m_cfg->Peg0Enable = 0;
227 else if (dev->enabled) {
228 m_cfg->Peg0Enable = dev->enabled;
229 m_cfg->Peg0MaxLinkWidth = config->Peg0MaxLinkWidth;
230 /* Use maximum possible link speed */
231 m_cfg->Peg0MaxLinkSpeed = 0;
232 /* Power down unused lanes based on the max possible width */
233 m_cfg->Peg0PowerDownUnusedLanes = 1;
234 /* Set [Auto] for options to enable equalization methods */
235 m_t_cfg->Peg0Gen3EqPh2Enable = 2;
236 m_t_cfg->Peg0Gen3EqPh3Method = 0;
237 }
238
Kyösti Mälkki71756c212019-07-12 13:10:19 +0300239 dev = pcidev_on_root(SA_DEV_SLOT_PEG, 1); /* PEG 0:1:1 */
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300240 if (!dev || !dev->enabled)
241 m_cfg->Peg1Enable = 0;
242 else if (dev->enabled) {
243 m_cfg->Peg1Enable = dev->enabled;
244 m_cfg->Peg1MaxLinkWidth = config->Peg1MaxLinkWidth;
245 m_cfg->Peg1MaxLinkSpeed = 0;
246 m_cfg->Peg1PowerDownUnusedLanes = 1;
247 m_t_cfg->Peg1Gen3EqPh2Enable = 2;
248 m_t_cfg->Peg1Gen3EqPh3Method = 0;
249 }
250
Kyösti Mälkki71756c212019-07-12 13:10:19 +0300251 dev = pcidev_on_root(SA_DEV_SLOT_PEG, 2); /* PEG 0:1:2 */
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300252 if (!dev || !dev->enabled)
253 m_cfg->Peg2Enable = 0;
254 else if (dev->enabled) {
255 m_cfg->Peg2Enable = dev->enabled;
256 m_cfg->Peg2MaxLinkWidth = config->Peg2MaxLinkWidth;
257 m_cfg->Peg2MaxLinkSpeed = 0;
258 m_cfg->Peg2PowerDownUnusedLanes = 1;
259 m_t_cfg->Peg2Gen3EqPh2Enable = 2;
260 m_t_cfg->Peg2Gen3EqPh3Method = 0;
261 }
262}
263
Aamir Bohra63755122017-02-06 21:48:48 +0530264static void soc_memory_init_params(FSP_M_CONFIG *m_cfg,
265 const struct soc_intel_skylake_config *config)
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530266{
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530267 int i;
268 uint32_t mask = 0;
269
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530270 m_cfg->MmioSize = 0x800; /* 2GB in MB */
271 m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE;
272 m_cfg->IedSize = CONFIG_IED_REGION_SIZE;
273 m_cfg->ProbelessTrace = config->ProbelessTrace;
Subrata Banik3214bc42017-07-10 13:17:09 +0530274 m_cfg->SaGv = config->SaGv;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530275 m_cfg->UserBd = BOARD_TYPE_ULT_ULX;
276 m_cfg->RMT = config->Rmt;
Shaunak Sahaef250c42018-08-31 12:49:08 -0700277 m_cfg->CmdTriStateDis = config->CmdTriStateDis;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530278 m_cfg->DdrFreqLimit = config->DdrFreqLimit;
Julius Wernercd49cce2019-03-05 16:53:33 -0800279 m_cfg->VmxEnable = CONFIG(ENABLE_VMX);
Robbie Zhange65affa2017-02-13 12:07:53 -0800280 m_cfg->PrmrrSize = config->PrmrrSize;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530281 for (i = 0; i < ARRAY_SIZE(config->PcieRpEnable); i++) {
282 if (config->PcieRpEnable[i])
283 mask |= (1<<i);
284 }
285 m_cfg->PcieRpEnableMask = mask;
Naresh G Solanki79239b72016-11-16 21:34:41 +0530286
287 cpu_flex_override(m_cfg);
Nico Huber2afe4dc2017-09-19 09:36:03 +0200288
289 if (!config->ignore_vtd) {
290 m_cfg->PchHpetBdfValid = 1;
291 m_cfg->PchHpetBusNumber = 250;
292 m_cfg->PchHpetDeviceNumber = 15;
293 m_cfg->PchHpetFunctionNumber = 0;
294 }
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530295}
296
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300297static void soc_primary_gfx_config_params(FSP_M_CONFIG *m_cfg,
298 const struct soc_intel_skylake_config *config)
299{
300 const struct device *dev;
301
Kyösti Mälkki903b40a2019-07-03 07:25:59 +0300302 dev = pcidev_path_on_root(SA_DEVFN_IGD);
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300303 if (!dev || !dev->enabled) {
304 /*
305 * If iGPU is disabled or not defined in the devicetree.cb,
306 * the FSP does not initialize this device
307 */
308 m_cfg->InternalGfx = 0;
Maxim Polyakov58066652019-04-25 12:32:15 +0300309 m_cfg->IgdDvmt50PreAlloc = 0;
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300310 } else {
311 m_cfg->InternalGfx = 1;
Maxim Polyakov58066652019-04-25 12:32:15 +0300312 /*
313 * Set IGD stolen size to 64MB. The FBC hardware for skylake
314 * does not have access to the bios_reserved range so it always
315 * assumes 8MB is used and so the kernel will avoid the last
316 * 8MB of the stolen window. With the default stolen size of
317 * 32MB(-8MB) there is not enough space for FBC to work with
318 * a high resolution panel
319 */
320 m_cfg->IgdDvmt50PreAlloc = 2;
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300321 }
Maxim Polyakov3ba38072019-05-06 12:07:24 +0300322 m_cfg->PrimaryDisplay = config->PrimaryDisplay;
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300323}
324
Andrey Petrovf796c6e2016-11-18 14:57:51 -0800325void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530326{
Aamir Bohra63755122017-02-06 21:48:48 +0530327 const struct soc_intel_skylake_config *config;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530328 FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
329 FSP_M_TEST_CONFIG *m_t_cfg = &mupd->FspmTestConfig;
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530330
Kyösti Mälkki8950cfb2019-07-13 22:16:25 +0300331 config = config_of_path(PCH_DEVFN_LPC);
Aamir Bohra63755122017-02-06 21:48:48 +0530332
333 soc_memory_init_params(m_cfg, config);
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300334 soc_peg_init_params(m_cfg, m_t_cfg, config);
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530335
Duncan Lauriee0b57952017-08-10 16:27:48 -0700336 /* Skip creating Management Engine MBP HOB */
337 m_t_cfg->SkipMbpHob = 0x01;
338
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530339 /* Enable DMI Virtual Channel for ME */
340 m_t_cfg->DmiVcm = 0x01;
341
342 /* Enable Sending DID to ME */
343 m_t_cfg->SendDidMsg = 0x01;
344 m_t_cfg->DidInitStat = 0x01;
345
Aamir Bohra63755122017-02-06 21:48:48 +0530346 /* DCI and TraceHub configs */
347 m_t_cfg->PchDciEn = config->PchDciEn;
348 m_cfg->EnableTraceHub = config->EnableTraceHub;
349 m_cfg->TraceHubMemReg0Size = config->TraceHubMemReg0Size;
350 m_cfg->TraceHubMemReg1Size = config->TraceHubMemReg1Size;
351
Naresh G Solankiff48b3b2017-07-12 23:01:26 +0530352 /* Enable SMBus controller based on config */
353 m_cfg->SmbusEnable = config->SmbusEnable;
354
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300355 /* Set primary graphic device */
356 soc_primary_gfx_config_params(m_cfg, config);
Maxim Polyakova12e9b02019-04-03 11:21:17 +0300357 m_t_cfg->SkipExtGfxScan = config->SkipExtGfxScan;
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300358
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530359 mainboard_memory_init_params(mupd);
360}
361
Pratik Prajapatiffc934d2016-11-18 14:36:34 -0800362void soc_update_memory_params_for_mma(FSP_M_CONFIG *memory_cfg,
363 struct mma_config_param *mma_cfg)
364{
365 /* Boot media is memory mapped for Skylake and Kabylake (SPI). */
Julius Wernercd49cce2019-03-05 16:53:33 -0800366 assert(CONFIG(BOOT_DEVICE_MEMORY_MAPPED));
Pratik Prajapatiffc934d2016-11-18 14:36:34 -0800367
368 memory_cfg->MmaTestContentPtr =
369 (uintptr_t) rdev_mmap_full(&mma_cfg->test_content);
370 memory_cfg->MmaTestContentSize =
371 region_device_sz(&mma_cfg->test_content);
372 memory_cfg->MmaTestConfigPtr =
373 (uintptr_t) rdev_mmap_full(&mma_cfg->test_param);
374 memory_cfg->MmaTestConfigSize =
375 region_device_sz(&mma_cfg->test_param);
376 memory_cfg->MrcFastBoot = 0x00;
377 memory_cfg->SaGv = 0x02;
378}
379
Aaron Durbin64031672018-04-21 14:45:32 -0600380__weak void mainboard_memory_init_params(FSPM_UPD *mupd)
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530381{
382 /* Do nothing */
383}