Naresh Solanki (naresh.solanki(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17553
-gerrit
commit bb4fd7f959abe22ba84b3ddb0ce14904bd0136f6
Author: Naresh G Solanki <naresh.solanki(a)intel.com>
Date: Wed Nov 16 21:27:38 2016 +0530
soc/intel/skylake: Disable Legacy PME for Root ports
Legacy PME are enabled by default in FSP UPD region.
When Legacy PME is enabled, then an SCI is generated and should be
handled by OS and BIOS/Coreboot in collboration. OS requires some
ACPI methods (eg _L69) which help to determine the wake source and also
to clear some registers. But this infrastructure is not present as of
now in coreboot and also linux handles PMEs natively.
Hence the SCI was never handled by OS and the status bits were never
cleared i.e., PCI_EXP_STS.
For this reason the level triggered SCI will remain active and the
system will wake up as soon as it enters S3.
To fix this, diabled Legacy PME (PmSci for Root ports).
Change-Id: I61317eb45305bdb14be3cc1a54fd9961d6ed593e
Signed-off-by: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Signed-off-by: Naresh G Solanki <naresh.solanki(a)intel.com>
---
src/soc/intel/skylake/chip_fsp20.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c
index 49569d9..8ef3cf4 100644
--- a/src/soc/intel/skylake/chip_fsp20.c
+++ b/src/soc/intel/skylake/chip_fsp20.c
@@ -148,6 +148,9 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
memcpy(params->PcieRpClkReqNumber, config->PcieRpClkReqNumber,
sizeof(params->PcieRpClkReqNumber));
+ /* disable Legacy PME */
+ memset(params->PcieRpPmSci, 0, sizeof(params->PcieRpPmSci));
+
memcpy(params->SerialIoDevMode, config->SerialIoDevMode,
sizeof(params->SerialIoDevMode));
Naresh Solanki (naresh.solanki(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17555
-gerrit
commit fe49718d8709cbc7e9a379b4ef9b205864cf5137
Author: Naresh G Solanki <naresh.solanki(a)intel.com>
Date: Wed Nov 16 21:34:41 2016 +0530
soc/intel/skylake: Pass proper CPU flex ratio override
In bootblock, cpu flex ratio is set to TDP nomial.
When not supplied with CPU flex ratio override of TDP nominal(as set in
bootblock) to FSP, then FSP by default tries to set it zero & gives
reset.
Set FSP UPD for CPU flex ratio override to that set in bootblock to
avoid reset.
Change-Id: I8cae5530ec97cedfbd71771f291db6f55a9fd5c2
Signed-off-by: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
Signed-off-by: Naresh G Solanki <naresh.solanki(a)intel.com>
---
src/soc/intel/skylake/romstage/romstage_fsp20.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/soc/intel/skylake/romstage/romstage_fsp20.c b/src/soc/intel/skylake/romstage/romstage_fsp20.c
index 8e08323..7752255 100644
--- a/src/soc/intel/skylake/romstage/romstage_fsp20.c
+++ b/src/soc/intel/skylake/romstage/romstage_fsp20.c
@@ -19,12 +19,14 @@
#include <arch/symbols.h>
#include <assert.h>
#include <cpu/x86/mtrr.h>
+#include <cpu/x86/msr.h>
#include <cbmem.h>
#include <chip.h>
#include <console/console.h>
#include <device/pci_def.h>
#include <fsp/util.h>
#include <fsp/memmap.h>
+#include <soc/msr.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/romstage.h>
@@ -94,6 +96,17 @@ asmlinkage void *car_stage_c_entry(void)
return postcar_commit_mtrrs(&pcf);
}
+static void cpu_flex_override(FSP_M_CONFIG *m_cfg)
+{
+ msr_t flex_ratio;
+ m_cfg->CpuRatioOverride = 1;
+ /* Set cpuratio to that we set in bootblock, This will ensure fspm know
+ * what flex ratio we intend to use.
+ */
+ flex_ratio = rdmsr(MSR_FLEX_RATIO);
+ m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
+}
+
static void soc_memory_init_params(FSP_M_CONFIG *m_cfg)
{
const struct device *dev;
@@ -130,6 +143,8 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg)
mask |= (1<<i);
}
m_cfg->PcieRpEnableMask = mask;
+
+ cpu_flex_override(m_cfg);
}
void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd)
the following patch was just integrated into master:
commit 673a4d0f4d06bfb6556756c97300b4cea336d484
Author: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
Date: Thu Nov 10 21:06:51 2016 +0800
soc/intel/skylake: Initialize UART based on CONFIG_UART_DEBUG
Current implementation checks for CONFIG_BOOTBLOCK_CONSOLE and then
initializes UART. If only CONFIG_BOOTBLOCK_CONSOLE
is enabled without enabling CONFIG_UART_DEBUG, there are
compilation issues. This is the case when using SIO UART for Skylake
DT platform. Hence initialize UART when CONFIG_UART_DEBUG is enabled
and not based on CONFIG_BOOTBLOCK_CONSOLE.
Also move BOOTBLOCK_CONSOLE out from UART_DEBUG to CPU_SPECIFIC_OPTIONS
as part of the fix needed.
Change-Id: Id422a55a68d64a06fc874bddca46b0ef5be6d596
Signed-off-by: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
Reviewed-on: https://review.coreboot.org/17349
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17349 for details.
-gerrit