Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47738 )
Change subject: soc/intel/xeon_sp: Work around FSP-T not respecting its own API
......................................................................
soc/intel/xeon_sp: Work around FSP-T not respecting its own API
The CPX FSP-T does not respect the FSP2.x spec and uses registers where
coreboot has its initial timestamp stored.
Change-Id: I4ba15decec22cd473e63149ec399d82c5e3fd214
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/xeon_sp/bootblock.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/47738/1
diff --git a/src/soc/intel/xeon_sp/bootblock.c b/src/soc/intel/xeon_sp/bootblock.c
index 5adda44..5524c66 100644
--- a/src/soc/intel/xeon_sp/bootblock.c
+++ b/src/soc/intel/xeon_sp/bootblock.c
@@ -33,11 +33,20 @@
.UpdTerminator = 0x55AA,
};
+static uint64_t assembly_timestamp;
+static uint64_t bootblock_timestamp;
+
asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
{
+ /*
+ * FSP-T does not respect its own API and trashes registers
+ * coreboot uses to store its initial timestamp.
+ */
+ assembly_timestamp = base_timestamp;
+ bootblock_timestamp = timestamp_get();
fast_spi_cache_bios_region();
- bootblock_main_with_basetime(base_timestamp);
+ bootblock_main_with_basetime(MIN(assembly_timestamp, bootblock_timestamp));
}
void bootblock_soc_early_init(void)
@@ -55,6 +64,10 @@
{
if (CONFIG(BOOTBLOCK_CONSOLE))
printk(BIOS_DEBUG, "FSP TempRamInit successful...\n");
+
+ if (assembly_timestamp < bootblock_timestamp)
+ printk(BIOS_WARNING, "Invalid initial timestamp detected\n");
+
if (CONFIG(FSP_CAR))
report_fspt_output();
bootblock_pch_init();
--
To view, visit https://review.coreboot.org/c/coreboot/+/47738
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4ba15decec22cd473e63149ec399d82c5e3fd214
Gerrit-Change-Number: 47738
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47756 )
Change subject: soc/intel/block/pmc: Only include the PCI driver when it is not hidden
......................................................................
soc/intel/block/pmc: Only include the PCI driver when it is not hidden
On more recent Intel platforms FSP-S hides the PMC PCI device and the
driver is broken for those devices so don't include it at all.
Change-Id: I784be250698ec1c1e9b3b766cf1bcca55730c021
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/apollolake/Kconfig
M src/soc/intel/common/block/pmc/Kconfig
M src/soc/intel/common/block/pmc/Makefile.inc
M src/soc/intel/skylake/Kconfig
4 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/47756/1
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 3917fea..4f762a9 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -78,6 +78,7 @@
select SOC_INTEL_COMMON_BLOCK_PCR
select SOC_INTEL_COMMON_BLOCK_P2SB
select SOC_INTEL_COMMON_BLOCK_PMC
+ select SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE
select SOC_INTEL_COMMON_BLOCK_SRAM
select SOC_INTEL_COMMON_BLOCK_RTC
select SOC_INTEL_COMMON_BLOCK_SA
diff --git a/src/soc/intel/common/block/pmc/Kconfig b/src/soc/intel/common/block/pmc/Kconfig
index b420865..8cd2635 100644
--- a/src/soc/intel/common/block/pmc/Kconfig
+++ b/src/soc/intel/common/block/pmc/Kconfig
@@ -13,6 +13,12 @@
config POWER_STATE_DEFAULT_ON_AFTER_FAILURE
default y
+config SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE
+ bool
+ help
+ Select this on platforms where the PMC device is discoverable
+ when scanning busses.
+
endif # SOC_INTEL_COMMON_BLOCK_PMC
config PMC_INVALID_READ_AFTER_WRITE
diff --git a/src/soc/intel/common/block/pmc/Makefile.inc b/src/soc/intel/common/block/pmc/Makefile.inc
index 49a0902..de69b63 100644
--- a/src/soc/intel/common/block/pmc/Makefile.inc
+++ b/src/soc/intel/common/block/pmc/Makefile.inc
@@ -1,7 +1,7 @@
ifeq ($(CONFIG_SOC_INTEL_COMMON_BLOCK_PMC),y)
bootblock-y += pmclib.c
romstage-y += pmclib.c
-ramstage-y += pmc.c
+ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE) += pmc.c
ramstage-y += pmclib.c pmc_ipc.c
smm-y += pmclib.c
verstage-y += pmclib.c
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index ce46d06..ed81e24 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -55,6 +55,7 @@
select SOC_INTEL_COMMON_BLOCK_GPIO_PADCFG_PADTOL
select SOC_INTEL_COMMON_BLOCK_GSPI
select SOC_INTEL_COMMON_BLOCK_HDA
+ select SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE
select SOC_INTEL_COMMON_BLOCK_SA
select SOC_INTEL_COMMON_BLOCK_SCS
select SOC_INTEL_COMMON_BLOCK_SGX
--
To view, visit https://review.coreboot.org/c/coreboot/+/47756
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I784be250698ec1c1e9b3b766cf1bcca55730c021
Gerrit-Change-Number: 47756
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange