Christian Walter has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39722 )
Change subject: soc/intel/cannonlake: Steal no memory for disabled IGD ......................................................................
soc/intel/cannonlake: Steal no memory for disabled IGD
Set IgdDvmt50PreAlloc to zero if InternalGfx is disabled. It is 'correct' to do it like this, otherwise the FSP would always allocate memory for the IGD even if it is disabled.
Tested on: * CFL platform with IGD * CFL platform without IGD
Change-Id: I811ca5eff41d3b2d85cb62af35ea0d4902d13c54 Signed-off-by: Christian Walter christian.walter@9elements.com --- M src/soc/intel/cannonlake/romstage/fsp_params.c 1 file changed, 17 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/39722/1
diff --git a/src/soc/intel/cannonlake/romstage/fsp_params.c b/src/soc/intel/cannonlake/romstage/fsp_params.c index 3c5be30..53e69d9 100644 --- a/src/soc/intel/cannonlake/romstage/fsp_params.c +++ b/src/soc/intel/cannonlake/romstage/fsp_params.c @@ -14,6 +14,8 @@ */
#include <assert.h> +#include <device/pci_def.h> +#include <device/pci.h> #include <cpu/x86/msr.h> #include <console/console.h> #include <fsp/util.h> @@ -31,10 +33,17 @@ { unsigned int i; uint32_t mask = 0; - const struct device *dev = pcidev_path_on_root(PCH_DEVFN_ISH); + const struct device *dev = pcidev_path_on_root(SA_DEVFN_IGD);
- /* Set IGD stolen size to 64MB. */ - m_cfg->IgdDvmt50PreAlloc = 2; + if (!dev || !dev->enabled || + (dev && (pci_read_config16(SA_DEV_IGD, PCI_VENDOR_ID) == 0xffff))) { + m_cfg->InternalGfx = 0; + m_cfg->IgdDvmt50PreAlloc = 0; + } else { + /* Set IGD stolen size to 64MB. */ + m_cfg->InternalGfx = 1; + m_cfg->IgdDvmt50PreAlloc = 2; + } m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE; m_cfg->IedSize = CONFIG_IED_REGION_SIZE; m_cfg->SaGv = config->SaGv; @@ -83,6 +92,7 @@ m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff; }
+ dev = pcidev_path_on_root(PCH_DEVFN_ISH); /* If ISH is enabled, enable ISH elements */ if (!dev) m_cfg->PchIshEnable = 0; @@ -149,6 +159,10 @@ /* Configure VT-d */ tconfig->VtdDisable = 0;
+ /* Fix broken FSPM 7.0.68.40 */ + if (m_cfg->InternalGfx == 0) + tconfig->PanelPowerEnable = 0; + mainboard_memory_init_params(mupd); }
Christian Walter has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/39722 )
Change subject: soc/intel/cannonlake: Steal no memory for disabled IGD ......................................................................
Abandoned
Double