Hello Aamir Bohra,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/31955
to review the following change.
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement
1. Gfx stolen memory requirement for ICL GFX 2. Enable PeiGraphicsPeim support
Change-Id: I22dd14249b7402873f1ac07bee164ee7bee36414 Signed-off-by: Aamir Bohra aamir.bohra@intel.com Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/intel/icelake/fsp_params.c M src/soc/intel/icelake/romstage/fsp_params.c 2 files changed, 243 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/31955/1
diff --git a/src/soc/intel/icelake/fsp_params.c b/src/soc/intel/icelake/fsp_params.c index 513ef00..533555d 100644 --- a/src/soc/intel/icelake/fsp_params.c +++ b/src/soc/intel/icelake/fsp_params.c @@ -13,14 +13,199 @@ * GNU General Public License for more details. */
+#include <chip.h> #include <console/console.h> +#include <device/device.h> +#include <device/pci.h> #include <fsp/api.h> +#include <fsp/util.h> +#include <intelblocks/xdci.h> +#include <soc/intel/common/vbt.h> +#include <soc/pci_devs.h> #include <soc/ramstage.h> +#include <string.h> + +static void parse_devicetree(FSP_S_CONFIG *params) +{ + struct device *dev = SA_DEV_ROOT; + if (!dev) { + printk(BIOS_ERR, "Could not find root device\n"); + return; + } + + const config_t *config = dev->chip_info; + + for (int i = 0; i < CONFIG_SOC_INTEL_I2C_DEV_MAX; i++) { + params->SerialIoI2cMode[i] = config->SerialIoI2cMode[i]; + } + + for (int i = 0; i < CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX; i++) { + params->SerialIoSpiMode[i] = config->SerialIoGSpiMode[i]; + params->SerialIoSpiCsMode[i] = config->SerialIoGSpiCsMode[i]; + params->SerialIoSpiCsState[i] = config->SerialIoGSpiCsState[i]; + } + + for (int i = 0; i < CONFIG_SOC_INTEL_UART_DEV_MAX; i++) { + params->SerialIoUartMode[i] = config->SerialIoUartMode[i]; + } +}
/* UPD parameters to be initialized before SiliconInit */ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) { - /* ToDo: update with UPD override as FSP matures */ + int i; + FSP_S_CONFIG *params = &supd->FspsConfig; + struct device *dev = SA_DEV_ROOT; + config_t *config = dev->chip_info; + + /* Parse device tree and enable/disable devices */ + parse_devicetree(params); + + /* Load VBT before devicetree-specific config. */ + params->GraphicsConfigPtr = (uintptr_t)vbt_get(); + + /* Set USB OC pin to 0 first */ + for (i = 0; i < ARRAY_SIZE(params->Usb2OverCurrentPin); i++) { + params->Usb2OverCurrentPin[i] = 0; + } + + for (i = 0; i < ARRAY_SIZE(params->Usb3OverCurrentPin); i++) { + params->Usb3OverCurrentPin[i] = 0; + } + + mainboard_silicon_init_params(params); + + params->PeiGraphicsPeimInit = 1; + params->GtFreqMax = 2; + params->CdClock = 3; + /* Unlock upper 8 bytes of RTC RAM */ + params->PchLockDownRtcMemoryLock = 0; + + params->CnviBtAudioOffload = config->CnviBtAudioOffload; + /* SATA */ + dev = dev_find_slot(0, PCH_DEVFN_SATA); + if (!dev) + params->SataEnable = 0; + else { + params->SataEnable = dev->enabled; + params->SataMode = config->SataMode; + params->SataSalpSupport = config->SataSalpSupport; + memcpy(params->SataPortsEnable, config->SataPortsEnable, + sizeof(params->SataPortsEnable)); + memcpy(params->SataPortsDevSlp, config->SataPortsDevSlp, + sizeof(params->SataPortsDevSlp)); + } + + /* Lan */ + dev = dev_find_slot(0, PCH_DEVFN_GBE); + if (!dev) + params->PchLanEnable = 0; + else + params->PchLanEnable = dev->enabled; + + /* Audio */ + params->PchHdaDspEnable = config->PchHdaDspEnable; + params->PchHdaAudioLinkHda = config->PchHdaAudioLinkHda; + params->PchHdaAudioLinkDmic0 = config->PchHdaAudioLinkDmic0; + params->PchHdaAudioLinkDmic1 = config->PchHdaAudioLinkDmic1; + params->PchHdaAudioLinkSsp0 = config->PchHdaAudioLinkSsp0; + params->PchHdaAudioLinkSsp1 = config->PchHdaAudioLinkSsp1; + params->PchHdaAudioLinkSsp2 = config->PchHdaAudioLinkSsp2; + params->PchHdaAudioLinkSndw1 = config->PchHdaAudioLinkSndw1; + params->PchHdaAudioLinkSndw2 = config->PchHdaAudioLinkSndw2; + params->PchHdaAudioLinkSndw3 = config->PchHdaAudioLinkSndw3; + params->PchHdaAudioLinkSndw4 = config->PchHdaAudioLinkSndw4; + + /* disable Legacy PME */ + memset(params->PcieRpPmSci, 0, sizeof(params->PcieRpPmSci)); + + /* S0ix */ + params->PchPmSlpS0Enable = config->s0ix_enable; + + /* USB */ + for (i = 0; i < ARRAY_SIZE(config->usb2_ports); i++) { + params->PortUsb20Enable[i] = + config->usb2_ports[i].enable; + params->Usb2OverCurrentPin[i] = + config->usb2_ports[i].ocpin; + params->Usb2PhyPetxiset[i] = + config->usb2_ports[i].pre_emp_bias; + params->Usb2PhyTxiset[i] = + config->usb2_ports[i].tx_bias; + params->Usb2PhyPredeemp[i] = + config->usb2_ports[i].tx_emp_enable; + params->Usb2PhyPehalfbit[i] = + config->usb2_ports[i].pre_emp_bit; + } + + for (i = 0; i < ARRAY_SIZE(config->usb3_ports); i++) { + params->PortUsb30Enable[i] = config->usb3_ports[i].enable; + params->Usb3OverCurrentPin[i] = config->usb3_ports[i].ocpin; + if (config->usb3_ports[i].tx_de_emp) { + params->Usb3HsioTxDeEmphEnable[i] = 1; + params->Usb3HsioTxDeEmph[i] = + config->usb3_ports[i].tx_de_emp; + } + if (config->usb3_ports[i].tx_downscale_amp) { + params->Usb3HsioTxDownscaleAmpEnable[i] = 1; + params->Usb3HsioTxDownscaleAmp[i] = + config->usb3_ports[i].tx_downscale_amp; + } + } + + /* Enable xDCI controller if enabled in devicetree and allowed */ + dev = dev_find_slot(0, PCH_DEVFN_USBOTG); + if (!xdci_can_enable()) + dev->enabled = 0; + params->XdciEnable = dev->enabled; + + /* PCI Express */ + for (i = 0; i < ARRAY_SIZE(config->PcieClkSrcUsage); i++) { + if (config->PcieClkSrcUsage[i] == 0) + config->PcieClkSrcUsage[i] = PCIE_CLK_NOTUSED; + } + memcpy(params->PcieClkSrcUsage, config->PcieClkSrcUsage, + sizeof(config->PcieClkSrcUsage)); + memcpy(params->PcieClkSrcClkReq, config->PcieClkSrcClkReq, + sizeof(config->PcieClkSrcClkReq)); + + /* eMMC */ + dev = dev_find_slot(0, PCH_DEVFN_EMMC); + if (!dev) + params->ScsEmmcEnabled = 0; + else { + params->ScsEmmcEnabled = dev->enabled; + params->ScsEmmcHs400Enabled = config->ScsEmmcHs400Enabled; + params->EmmcUseCustomDlls = config->EmmcUseCustomDlls; + if (config->EmmcUseCustomDlls == 1) { + params->EmmcTxCmdDelayRegValue = + config->EmmcTxCmdDelayRegValue; + params->EmmcTxDataDelay1RegValue = + config->EmmcTxDataDelay1RegValue; + params->EmmcTxDataDelay2RegValue = + config->EmmcTxDataDelay2RegValue; + params->EmmcRxCmdDataDelay1RegValue = + config->EmmcRxCmdDataDelay1RegValue; + params->EmmcRxCmdDataDelay2RegValue = + config->EmmcRxCmdDataDelay2RegValue; + params->EmmcRxStrobeDelayRegValue = + config->EmmcRxStrobeDelayRegValue; + } + } + + /* SD */ + dev = dev_find_slot(0, PCH_DEVFN_SDCARD); + if (!dev) + params->ScsSdCardEnabled = 0; + else { + params->ScsSdCardEnabled = dev->enabled; + params->SdCardPowerEnableActiveHigh = + config->SdCardPowerEnableActiveHigh; + } + + params->Heci3Enabled = config->Heci3Enabled; + params->Device4Enable = config->Device4Enable; + params->SkipMpInit = !chip_get_fsp_mp_init(); }
/* Mainboard GPIO Configuration */ diff --git a/src/soc/intel/icelake/romstage/fsp_params.c b/src/soc/intel/icelake/romstage/fsp_params.c index 69b5b7a..7c7a26d 100644 --- a/src/soc/intel/icelake/romstage/fsp_params.c +++ b/src/soc/intel/icelake/romstage/fsp_params.c @@ -13,13 +13,69 @@ * GNU General Public License for more details. */
+#include <assert.h> +#include <chip.h> #include <console/console.h> #include <fsp/util.h> +#include <soc/iomap.h> +#include <soc/pci_devs.h> #include <soc/romstage.h>
+static void soc_memory_init_params(FSP_M_CONFIG *m_cfg, const config_t *config) +{ + unsigned int i; + const struct device *dev = dev_find_slot(0, PCH_DEVFN_HDA); + uint32_t mask = 0; + + /* Set IGD stolen size to 60MB. */ + m_cfg->IgdDvmt50PreAlloc = 0xFE; + /* Vt-D config */ + m_cfg->VtdDisable = config->VtdDisable; + m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE; + m_cfg->IedSize = CONFIG_IED_REGION_SIZE; + m_cfg->SaGv = config->SaGv; + m_cfg->UserBd = BOARD_TYPE_ULT_ULX; + m_cfg->RMT = config->RMT; + /* If Audio Codec is enabled, enable FSP UPD */ + if (!dev) + m_cfg->PchHdaEnable = 0; + else + m_cfg->PchHdaEnable = dev->enabled; + + for (i = 0; i < ARRAY_SIZE(config->PcieRpEnable); i++) { + if (config->PcieRpEnable[i]) + mask |= (1 << i); + } + m_cfg->PcieRpEnableMask = mask; + m_cfg->PrmrrSize = config->PrmrrSize; + m_cfg->EnableC6Dram = config->enable_c6dram; + /* Disable BIOS Guard */ + m_cfg->BiosGuard = 0; + /* Disable Cpu Ratio Override temporary. */ + m_cfg->CpuRatio = 0; + m_cfg->PcdSerialIoUartNumber = CONFIG_UART_FOR_CONSOLE; + /* Disable Vmx if Vt-d is already disabled */ + if (config->VtdDisable) + m_cfg->VmxEnable = 0; + else + m_cfg->VmxEnable = config->VmxEnable; +} + void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) { - /* ToDo: update with UPD override as FSP matures */ + const struct device *dev = dev_find_slot(0, PCH_DEVFN_LPC); + assert(dev != NULL); + const config_t *config = dev->chip_info; + FSP_M_CONFIG *m_cfg = &mupd->FspmConfig; + + soc_memory_init_params(m_cfg, config); + + /* Enable SMBus controller based on config */ + m_cfg->SmbusEnable = config->SmbusEnable; + /* Set debug probe type */ + m_cfg->PlatformDebugConsent = config->DebugConsent; + + mainboard_memory_init_params(mupd); }
__weak void mainboard_memory_init_params(FSPM_UPD *mupd)
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/#/c/31955/1/src/soc/intel/icelake/fsp_params.c File src/soc/intel/icelake/fsp_params.c:
https://review.coreboot.org/#/c/31955/1/src/soc/intel/icelake/fsp_params.c@3... PS1, Line 38: for (int i = 0; i < CONFIG_SOC_INTEL_I2C_DEV_MAX; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/1/src/soc/intel/icelake/fsp_params.c@4... PS1, Line 48: for (int i = 0; i < CONFIG_SOC_INTEL_UART_DEV_MAX; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/1/src/soc/intel/icelake/fsp_params.c@6... PS1, Line 68: for (i = 0; i < ARRAY_SIZE(params->Usb2OverCurrentPin); i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/1/src/soc/intel/icelake/fsp_params.c@7... PS1, Line 72: for (i = 0; i < ARRAY_SIZE(params->Usb3OverCurrentPin); i++) { braces {} are not necessary for single statement blocks
Subrata Banik has removed Patrick Rudolph from this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Removed reviewer Patrick Rudolph.
Subrata Banik has removed Aamir Bohra from this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Removed reviewer Aamir Bohra.
Subrata Banik has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Abandoned
Subrata Banik has restored this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Restored
Subrata Banik has removed build bot (Jenkins) from this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Removed reviewer build bot (Jenkins).
Subrata Banik has removed Aamir Bohra from this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Removed reviewer Aamir Bohra.
Ronak Kanabar has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... File src/soc/intel/icelake/romstage/fsp_params.c:
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 64: m_cfg->VmxEnable = config->VmxEnable; Now, we are using Kconfig for Vmx
m_cfg->VmxEnable = CONFIG(ENABLE_VMX);
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 13:
(17 comments)
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c File src/soc/intel/icelake/fsp_params.c:
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 32: SA_DEV_ROOT Using a macro to hide a call to a function is not a good idea.
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 38: config_t don't use typedefs for structs.
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 40: CONFIG_SOC_INTEL_I2C_DEV_MAX Why is there a Kconfig option for this? Does it change depending on soc variants?
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 44: CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX Why is there a Kconfig option for this? Does it change depending on soc variants?
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 50: CONFIG_SOC_INTEL_UART_DEV_MAX Why is there a Kconfig option for this? Does it change depending on soc variants?
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 95: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 109: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 166: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 182: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 206: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 220: __weak void mainboard_silicon_init_params(FSP_S_CONFIG *params) : { : printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); : } Please remove this. You don't want it to build without an implementation.
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... File src/soc/intel/icelake/romstage/fsp_params.c:
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 27: dev_find_slot use pcidev_on_root()
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 31: 0xFE can you make this number sensible instead of needing a comment?
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 37: BOARD_TYPE_ULT_ULX Should this be configurable?
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 69: dev_find_slot pcidev_on_root
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 71: config_t Don't use typedefs for this.
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 84: __weak void mainboard_memory_init_params(FSPM_UPD *mupd) : { : printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); : } Please remove this. You generally don't want it to compile without an implementation of this.
Hello Aaron Durbin, Aamir Bohra, Aamir Bohra, Wonkyu Kim, Ravishankar Sarawadi, Rizwan Qureshi, Shelley Chen, Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31955
to look at the new patch set (#14).
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement
1. Gfx stolen memory requirement for ICL GFX 2. Enable PeiGraphicsPeim support
Change-Id: I22dd14249b7402873f1ac07bee164ee7bee36414 Signed-off-by: Aamir Bohra aamir.bohra@intel.com Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/intel/icelake/chip.h M src/soc/intel/icelake/fsp_params.c M src/soc/intel/icelake/romstage/fsp_params.c 3 files changed, 252 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/31955/14
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 14:
(4 comments)
https://review.coreboot.org/#/c/31955/14/src/soc/intel/icelake/fsp_params.c File src/soc/intel/icelake/fsp_params.c:
https://review.coreboot.org/#/c/31955/14/src/soc/intel/icelake/fsp_params.c@... PS14, Line 40: for (int i = 0; i < CONFIG_SOC_INTEL_I2C_DEV_MAX; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/14/src/soc/intel/icelake/fsp_params.c@... PS14, Line 50: for (int i = 0; i < CONFIG_SOC_INTEL_UART_DEV_MAX; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/14/src/soc/intel/icelake/fsp_params.c@... PS14, Line 70: for (i = 0; i < ARRAY_SIZE(params->Usb2OverCurrentPin); i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/31955/14/src/soc/intel/icelake/fsp_params.c@... PS14, Line 74: for (i = 0; i < ARRAY_SIZE(params->Usb3OverCurrentPin); i++) { braces {} are not necessary for single statement blocks
Hello Aaron Durbin, Aamir Bohra, Aamir Bohra, Wonkyu Kim, Ravishankar Sarawadi, Rizwan Qureshi, Shelley Chen, build bot (Jenkins), Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31955
to look at the new patch set (#15).
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement
1. Gfx stolen memory requirement for ICL GFX 2. Enable PeiGraphicsPeim support
Change-Id: I22dd14249b7402873f1ac07bee164ee7bee36414 Signed-off-by: Aamir Bohra aamir.bohra@intel.com Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/intel/icelake/chip.h M src/soc/intel/icelake/fsp_params.c M src/soc/intel/icelake/romstage/fsp_params.c 3 files changed, 248 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/31955/15
Hello Aaron Durbin, Aamir Bohra, Aamir Bohra, Wonkyu Kim, Ravishankar Sarawadi, Rizwan Qureshi, Shelley Chen, build bot (Jenkins), Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31955
to look at the new patch set (#16).
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement
1. Gfx stolen memory requirement for ICL GFX 2. Enable PeiGraphicsPeim support
Change-Id: I22dd14249b7402873f1ac07bee164ee7bee36414 Signed-off-by: Aamir Bohra aamir.bohra@intel.com Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/intel/icelake/chip.h M src/soc/intel/icelake/fsp_params.c M src/soc/intel/icelake/romstage/fsp_params.c 3 files changed, 250 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/31955/16
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 16:
(18 comments)
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c File src/soc/intel/icelake/fsp_params.c:
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 32: SA_DEV_ROOT
Using a macro to hide a call to a function is not a good idea.
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 38: config_t
don't use typedefs for structs.
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 40: CONFIG_SOC_INTEL_I2C_DEV_MAX
Why is there a Kconfig option for this? Does it change depending on soc variants?
yes, it is between LP and H PCH
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 44: CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX
Why is there a Kconfig option for this? Does it change depending on soc variants?
yes, it is between LP and H PCH
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 50: CONFIG_SOC_INTEL_UART_DEV_MAX
Why is there a Kconfig option for this? Does it change depending on soc variants?
yes, it is between LP and H PCH
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 95: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 109: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 166: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 182: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 206: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/fsp_params.c@... PS13, Line 220: __weak void mainboard_silicon_init_params(FSP_S_CONFIG *params) : { : printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); : }
Please remove this. You don't want it to build without an implementation.
I don't think, i can remove it now till all mb initial patches got merged
here is the error when i was trying to delete this function, but i agree to remove this once we have entire ICL tree merged.
i386-elf-ld.bfd: /cb-build/coreboot-gerrit.0/INTEL_ICELAKE_RVPU/generated/ramstage.o: in function `platform_fsp_silicon_init_params_cb': /home/coreboot/slave-root/workspace/coreboot-gerrit/src/soc/intel/icelake/fsp_params.c:85: undefined reference to `mainboard_silicon_init_params' make[1]: *** [src/arch/x86/Makefile.inc:388: /cb-build/coreboot-gerrit.0/INTEL_ICELAKE_RVPU/cbfs/fallback/ramstage.debug] Error 1 make[1]: Leaving directory '/home/coreboot/slave-root/workspace/coreboot-gerrit'
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... File src/soc/intel/icelake/romstage/fsp_params.c:
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 27: dev_find_slot
use pcidev_on_root()
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 31: 0xFE
can you make this number sensible instead of needing a comment?
https://review.coreboot.org/c/coreboot/+/31954/13/src/vendorcode/intel/fsp/f... + 1802
/** Offset 0x025D - Internal Graphics Pre-allocated Memory Size of memory preallocated for internal graphics. 0x00:0MB, 0x01:32MB, 0x02:64MB, 0x03:96MB, 0x04:128MB, 0x05:160MB, 0xF0:4MB, 0xF1:8MB, 0xF2:12MB, 0xF3:16MB, 0xF4:20MB, 0xF5:24MB, 0xF6:28MB, 0xF7:32MB, 0xF8:36MB, 0xF9:40MB, 0xFA:44MB, 0xFB:48MB, 0xFC:52MB, 0xFD:56MB, 0xFE:60MB **/ UINT8 IgdDvmt50PreAlloc;
this is what we are feeding into coreboot from FSP
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 37: BOARD_TYPE_ULT_ULX
Should this be configurable?
https://review.coreboot.org/c/coreboot/+/31954/13/src/vendorcode/intel/fsp/f... + 1768
/** Offset 0x0234 - Board Type MrcBoardType, Options are 0=Mobile/Mobile Halo, 1=Desktop/DT Halo, 5=ULT/ULX/Mobile Halo, 7=UP Server 0:Mobile/Mobile Halo, 1:Desktop/DT Halo, 5:ULT/ULX/Mobile Halo, 7:UP Server **/ UINT8 UserBd;
ICL with coreboot is not targeted for 0:Mobile/Mobile Halo, 1:Desktop/DT Halo, or 7:UP Server
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 64: m_cfg->VmxEnable = config->VmxEnable;
Now, we are using Kconfig for Vmx […]
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 69: dev_find_slot
pcidev_on_root
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 71: config_t
Don't use typedefs for this.
Done
https://review.coreboot.org/#/c/31955/13/src/soc/intel/icelake/romstage/fsp_... PS13, Line 84: __weak void mainboard_memory_init_params(FSPM_UPD *mupd) : { : printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); : }
Please remove this. You generally don't want it to compile without an implementation of this.
same as other file
Wonkyu Kim has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31955 )
Change subject: soc/intel/icelake: Pass FSP-M/S UPD as per ICL requirement ......................................................................
Patch Set 17: Code-Review+2