Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48282 )
Change subject: drivers/intel/fsp2_0: FSP-T requires NO_CBFS_MCACHE
......................................................................
drivers/intel/fsp2_0: FSP-T requires NO_CBFS_MCACHE
When FSP-T is used, the first thing done in postcar is to call FSP-M
to tear down CAR. This is done before cbmem is initialized, which
means CBFS_MCACHE is not accessible, which results in FSP-M not being
found, failing the boot.
TESTED: ocp/deltalake boots again.
Change-Id: Icb41b802c636d42b0ebeb3e3850551813accda91
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/drivers/intel/fsp2_0/Kconfig
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/48282/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index 03b9c2b..96ae282 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -113,6 +113,7 @@
config FSP_CAR
bool
default n
+ select NO_CBFS_MCACHE
help
Use FSP APIs to initialize & Tear Down the Cache-As-Ram
--
To view, visit https://review.coreboot.org/c/coreboot/+/48282
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icb41b802c636d42b0ebeb3e3850551813accda91
Gerrit-Change-Number: 48282
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Stanislaw Kaminski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28950 )
Change subject: lenovo/x230: introduce FHD variant
......................................................................
Patch Set 12:
> I've created https://code.fe80.eu/lynxis/vbtparse to modify the vbt.
Surely took me a while, but I figured it out.
I used intel_vbt_decode tool to find what's different in VBT provided by you and the one from Coreboot tree (x230.vbt). Turns out that yours has header that says:
VBT signature: "$VBT SNB/IVB-MOBILE "
While the one provided in your patch is
VBT signature: "$VBT SANDYBRIDGE-M "
I have used your tool on x230.vbt from the tree, flashed, and now both Linux and Windows boot perfectly fine on FHD screen. Awesome!
I hope that you'll excuse me not proposing a merge for this - I'm not a developer by any means, and learning how to do that seems like an investment of time that I don't have. I'll be glad to upload my modified VBT wherever you please, though - just say the word.
And thanks for all the help you provided, and for your tool!
--
To view, visit https://review.coreboot.org/c/coreboot/+/28950
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0355d39a61956792e69bccd5274cfc2749d72bf0
Gerrit-Change-Number: 28950
Gerrit-PatchSet: 12
Gerrit-Owner: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Kilian Neuner <cb(a)9-r.net>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-Reviewer: Richard Slindee
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Aleksei Kharlamov <derlafff(a)ya.ru>
Gerrit-CC: Christian Herzog
Gerrit-CC: Holger Levsen <holger(a)layer-acht.org>
Gerrit-CC: Matthias Wiedhalm
Gerrit-CC: Pavel Kovalenko <su(a)nitrocaster.me>
Gerrit-CC: Sergey Alirzaev <zl29ah(a)gmail.com>
Gerrit-CC: Stanislaw Kaminski <stanislaw.kaminski(a)gmail.com>
Gerrit-CC: Tom Hiller <thrilleratplay(a)gmail.com>
Gerrit-CC: Tomasz Jan Góralczyk
Gerrit-CC: clayton craft
Gerrit-CC: slact
Gerrit-Comment-Date: Fri, 04 Dec 2020 08:38:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Shreesh Chhabbi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/47983
to review the following change.
Change subject: soc/common: Program SF Mask MSRs for eNEM
......................................................................
soc/common: Program SF Mask MSRs for eNEM
Signed-off-by: Shreesh Chhabbi <shreesh.chhabbi(a)intel.corp-partner.google.com>
Change-Id: I5781008a1447813317878a722cb894edcd6df946
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/common/block/cpu/Kconfig
M src/soc/intel/common/block/cpu/car/cache_as_ram.S
M src/soc/intel/denverton_ns/Kconfig
M src/soc/intel/icelake/Kconfig
M src/soc/intel/jasperlake/Kconfig
M src/soc/intel/skylake/Kconfig
M src/soc/intel/tigerlake/Kconfig
8 files changed, 36 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/47983/1
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index f427340..06f8c2e 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -315,7 +315,7 @@
config USE_CANNONLAKE_CAR_NEM_ENHANCED
bool "Enhanced Non-evict mode"
select SOC_INTEL_COMMON_BLOCK_CAR
- select USE_CAR_NEM_ENHANCED_V1
+ select INTEL_CAR_NEM_ENHANCED
help
A current limitation of NEM (Non-Evict mode) is that code and data
sizes are derived from the requirement to not write out any modified
diff --git a/src/soc/intel/common/block/cpu/Kconfig b/src/soc/intel/common/block/cpu/Kconfig
index 9023b58..e66b0fb 100644
--- a/src/soc/intel/common/block/cpu/Kconfig
+++ b/src/soc/intel/common/block/cpu/Kconfig
@@ -51,21 +51,6 @@
ENHANCED NEM guarantees that modified data is always
kept in cache while clean data is replaced.
-config USE_CAR_NEM_ENHANCED_V1
- bool
- select INTEL_CAR_NEM_ENHANCED
- help
- This config supports INTEL_CAR_NEM_ENHANCED mode on
- SKL, KBL, CNL, WHL, CML and ICL and JSL platforms.
-
-config USE_CAR_NEM_ENHANCED_V2
- bool
- select INTEL_CAR_NEM_ENHANCED
- select COS_MAPPED_TO_MSB
- help
- This config supports INTEL_CAR_NEM_ENHANCED mode on
- TGL platform.
-
config COS_MAPPED_TO_MSB
bool
depends on INTEL_CAR_NEM_ENHANCED
@@ -73,6 +58,14 @@
On TGL and JSL platform the class of service configuration
is mapped to MSB of MSR IA32_PQR_ASSOC.
+config CAR_HAS_SF_MASKS
+ bool
+ depends on INTEL_CAR_NEM_ENHANCED
+ help
+ In the case of non-inclusive cache architecture Snoop Filter MSR
+ IA32_L3_SF_MASK_x programming is required along with the data ways.
+ This is applicable for TGL and beyond.
+
config USE_INTEL_FSP_MP_INIT
bool "Perform MP Initialization by FSP"
default n
diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram.S b/src/soc/intel/common/block/cpu/car/cache_as_ram.S
index 5af1fc6..600399c 100644
--- a/src/soc/intel/common/block/cpu/car/cache_as_ram.S
+++ b/src/soc/intel/common/block/cpu/car/cache_as_ram.S
@@ -403,8 +403,28 @@
set_eviction_mask:
mov %ebx, %ecx /* back up the number of ways */
mov %eax, %ebx /* back up the non-eviction mask*/
+
+#if CONFIG(CAR_HAS_SF_MASKS)
/*
* Set MSR 0xC91 IA32_L3_MASK_1 or MSR 0x1891 IA32_CR_SF_QOS_MASK_1
+ * Program MSR 0x1891 IA32_CR_SF_QOS_MASK_1 with
+ * total number of LLC ways
+ */
+ mov %ecx, %eax
+ movl $IA32_CR_SF_QOS_MASK_1, %ecx
+ xorl %edx, %edx
+ wrmsr
+ /*
+ * Program MSR 0x1892 IA32_CR_SF_QOS_MASK_2 with
+ * total number of LLC ways
+ */
+ movl $IA32_CR_SF_QOS_MASK_2, %ecx
+ xorl %edx, %edx
+ wrmsr
+#endif
+
+ /*
+ * Program MSR 0xC91 IA32_L3_MASK_1
* This MSR contain one bit per each way of LLC
* - If this bit is '0' - the way is protected from eviction
* - If this bit is '1' - the way is not protected from eviction
@@ -417,26 +437,18 @@
xor $~0, %eax /* invert 32 bits */
and %ecx, %eax
-#if CONFIG(USE_CAR_NEM_ENHANCED_V1)
movl $IA32_L3_MASK_1, %ecx
-#elif CONFIG(USE_CAR_NEM_ENHANCED_V2)
- movl $IA32_CR_SF_QOS_MASK_1, %ecx
-#endif
xorl %edx, %edx
wrmsr
/*
- * Set MSR 0xC92 IA32_L3_MASK_1 or MSR 0x1892 IA32_CR_SF_QOS_MASK_2
+ * Program MSR 0xC92 IA32_L3_MASK_2
* This MSR contain one bit per each way of LLC
* - If this bit is '0' - the way is protected from eviction
* - If this bit is '1' - the way is not protected from eviction
*/
mov %ebx, %eax
-#if CONFIG(USE_CAR_NEM_ENHANCED_V1)
movl $IA32_L3_MASK_2, %ecx
-#elif CONFIG(USE_CAR_NEM_ENHANCED_V2)
- movl $IA32_CR_SF_QOS_MASK_2, %ecx
-#endif
xorl %edx, %edx
wrmsr
/*
diff --git a/src/soc/intel/denverton_ns/Kconfig b/src/soc/intel/denverton_ns/Kconfig
index 4981205..4fe491f 100644
--- a/src/soc/intel/denverton_ns/Kconfig
+++ b/src/soc/intel/denverton_ns/Kconfig
@@ -170,7 +170,7 @@
config USE_DENVERTON_NS_CAR_NEM_ENHANCED
bool "Enhanced Non-evict mode"
select SOC_INTEL_COMMON_BLOCK_CAR
- select USE_CAR_NEM_ENHANCED_V1
+ select INTEL_CAR_NEM_ENHANCED
help
A current limitation of NEM (Non-Evict mode) is that code and data sizes
are derived from the requirement to not write out any modified cache line.
diff --git a/src/soc/intel/icelake/Kconfig b/src/soc/intel/icelake/Kconfig
index 52e9a74..fee52e6 100644
--- a/src/soc/intel/icelake/Kconfig
+++ b/src/soc/intel/icelake/Kconfig
@@ -23,6 +23,7 @@
select INTEL_DESCRIPTOR_MODE_CAPABLE
select HAVE_SMI_HANDLER
select IDT_IN_EVERY_STAGE
+ select INTEL_CAR_NEM_ENHANCED
select INTEL_GMA_ACPI
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
select IOAPIC
@@ -64,7 +65,6 @@
select DISPLAY_FSP_VERSION_INFO
select HECI_DISABLE_USING_SMM
select USE_INTEL_FSP_TO_CALL_COREBOOT_PUBLISH_MP_PPI
- select USE_CAR_NEM_ENHANCED_V1
config DCACHE_RAM_BASE
default 0xfef00000
diff --git a/src/soc/intel/jasperlake/Kconfig b/src/soc/intel/jasperlake/Kconfig
index 294f19f8..0a15f05 100644
--- a/src/soc/intel/jasperlake/Kconfig
+++ b/src/soc/intel/jasperlake/Kconfig
@@ -23,6 +23,7 @@
select INTEL_DESCRIPTOR_MODE_CAPABLE
select HAVE_SMI_HANDLER
select IDT_IN_EVERY_STAGE
+ select INTEL_CAR_NEM_ENHANCED
select INTEL_GMA_ACPI
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
select IOAPIC
@@ -61,7 +62,6 @@
select TSC_MONOTONIC_TIMER
select UDELAY_TSC
select UDK_202005_BINDING
- select USE_CAR_NEM_ENHANCED_V1
select DISPLAY_FSP_VERSION_INFO
select HECI_DISABLE_USING_SMM
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index ba3af84..731e033 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -32,6 +32,7 @@
select HAVE_FSP_LOGO_SUPPORT
select INTEL_DESCRIPTOR_MODE_CAPABLE
select HAVE_SMI_HANDLER
+ select INTEL_CAR_NEM_ENHANCED
select INTEL_GMA_ACPI
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
select HAVE_INTEL_FSP_REPO
@@ -77,7 +78,6 @@
select TSC_SYNC_MFENCE
select UDELAY_TSC
select UDK_2015_BINDING
- select USE_CAR_NEM_ENHANCED_V1
config FSP_HYPERTHREADING
bool "Enable Hyper-Threading"
diff --git a/src/soc/intel/tigerlake/Kconfig b/src/soc/intel/tigerlake/Kconfig
index b97b92e..dd14ad2 100644
--- a/src/soc/intel/tigerlake/Kconfig
+++ b/src/soc/intel/tigerlake/Kconfig
@@ -23,7 +23,8 @@
select INTEL_DESCRIPTOR_MODE_CAPABLE
select HAVE_SMI_HANDLER
select IDT_IN_EVERY_STAGE
- select USE_CAR_NEM_ENHANCED_V1 if !INTEL_CAR_NEM
+ select INTEL_CAR_NEM_ENHANCED if !INTEL_CAR_NEM
+ select CAR_HAS_SF_MASKS if INTEL_CAR_NEM_ENHANCED
select COS_MAPPED_TO_MSB if INTEL_CAR_NEM_ENHANCED
select INTEL_GMA_ACPI
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
--
To view, visit https://review.coreboot.org/c/coreboot/+/47983
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5781008a1447813317878a722cb894edcd6df946
Gerrit-Change-Number: 47983
Gerrit-PatchSet: 1
Gerrit-Owner: Shreesh Chhabbi <shreesh.chhabbi(a)intel.com>
Gerrit-Reviewer: Shreesh Chhabbi <shreesh.chhabbi(a)intel.corp-partner.google.com>
Gerrit-MessageType: newchange