11 #include <soc/iomap.h>
13 #include <soc/pci_devs.h>
14 #include <soc/romstage.h>
25 FSP_M_TEST_CONFIG *tconfig = &mupd->FspmTestConfig;
34 const bool igd_on = !
CONFIG(SOC_INTEL_DISABLE_IGD) && dev && dev->
enabled;
37 m_cfg->InternalGfx = 1;
38 m_cfg->IgdDvmt50PreAlloc = 2;
40 m_cfg->InternalGfx = 0;
41 m_cfg->IgdDvmt50PreAlloc = 0;
42 tconfig->PanelPowerEnable = 0;
44 m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE;
45 m_cfg->IedSize = CONFIG_IED_REGION_SIZE;
46 m_cfg->SaGv =
config->SaGv;
47 if (
CONFIG(SOC_INTEL_CANNONLAKE_PCH_H))
54 if (
config->PcieRpEnable[i])
57 m_cfg->PcieRpEnableMask =
mask;
59 m_cfg->EnableC6Dram =
config->enable_c6dram;
60 #if CONFIG(SOC_INTEL_COMETLAKE)
61 m_cfg->SerialIoUartDebugControllerNumber = CONFIG_UART_FOR_CONSOLE;
62 memcpy(tconfig->PcieRpHotPlug,
config->PcieRpHotPlug,
sizeof(tconfig->PcieRpHotPlug));
64 m_cfg->PcdSerialIoUartNumber = CONFIG_UART_FOR_CONSOLE;
74 m_cfg->PcdDebugInterfaceFlags =
75 CONFIG(DRIVERS_UART_8250IO) ? 0x02 : 0x10;
78 m_cfg->VmxEnable =
CONFIG(ENABLE_VMX);
80 m_cfg->SkipMpInit = !
CONFIG(USE_INTEL_FSP_MP_INIT);
82 if (
config->cpu_ratio_override) {
83 m_cfg->CpuRatio =
config->cpu_ratio_override;
88 m_cfg->CpuRatio = (flex_ratio.
lo >> 8) & 0xff;
94 m_cfg->PchIshEnable = 0;
96 m_cfg->PchIshEnable = dev->
enabled;
101 m_cfg->PchHdaEnable = 0;
103 m_cfg->PchHdaEnable = dev->
enabled;
106 m_cfg->SaIpuEnable = 0;
109 m_cfg->SaIpuEnable = dev->
enabled;
113 if (
config->sata_port[i].RxGen3EqBoostMagEnable) {
114 m_cfg->PchSataHsioRxGen3EqBoostMagEnable[i] =
115 config->sata_port[i].RxGen3EqBoostMagEnable;
116 m_cfg->PchSataHsioRxGen3EqBoostMag[i] =
117 config->sata_port[i].RxGen3EqBoostMag;
119 if (
config->sata_port[i].TxGen3DownscaleAmpEnable) {
120 m_cfg->PchSataHsioTxGen3DownscaleAmpEnable[i] =
121 config->sata_port[i].TxGen3DownscaleAmpEnable;
122 m_cfg->PchSataHsioTxGen3DownscaleAmp[i] =
123 config->sata_port[i].TxGen3DownscaleAmp;
125 if (
config->sata_port[i].TxGen3DeEmphEnable) {
126 m_cfg->PchSataHsioTxGen3DeEmphEnable[i] =
127 config->sata_port[i].TxGen3DeEmphEnable;
128 m_cfg->PchSataHsioTxGen3DeEmph[i] =
129 config->sata_port[i].TxGen3DeEmph;
132 #if !CONFIG(SOC_INTEL_COMETLAKE)
133 if (
config->DisableHeciRetry)
134 tconfig->DisableHeciRetry =
config->DisableHeciRetry;
140 m_cfg->SmbusEnable = 0;
142 m_cfg->SmbusEnable = dev->
enabled;
145 m_cfg->PlatformDebugConsent =
146 CONFIG_SOC_INTEL_CANNONLAKE_DEBUG_CONSENT;
149 tconfig->VtdDisable = 0;
__weak void mainboard_memory_init_params(FSPM_UPD *memupd)
void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
void * memcpy(void *dest, const void *src, size_t n)
#define assert(statement)
#define printk(level,...)
int get_valid_prmrr_size(void)
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
static __always_inline msr_t rdmsr(unsigned int index)
static DEVTREE_CONST void * config_of(const struct device *dev)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
#define HECI1_BASE_ADDRESS
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
const struct smm_save_state_ops *legacy_ops __weak
#define SOC_INTEL_CML_SATA_DEV_MAX