Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36864 )
Change subject: soc/intel/cannonlake: Add kconfig to override CPU flex ratio
......................................................................
soc/intel/cannonlake: Add kconfig to override CPU flex ratio
This patch provides options to override FIT default CPU flex
ratio from coreboot code. CONFIG_CPU_FLEX_RATIO to provide the
required CPU ratio and CONFIG_OVERRIDE_CPU_FLEX_RATIO to tell if
override is required.
TEST=Without override flex_ratio is 0 and verified booting to
OS after overriding with flex_ratio value 5.
Change-Id: Ib01650f52f3d402f669e7e7f5b28a648b86f08ec
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/cannonlake/romstage/fsp_params.c
2 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/36864/1
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index 5731cff..3f7afea 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -332,4 +332,17 @@
hex
default 0x40000 # 256KB
+config OVERRIDE_CPU_FLEX_RATIO
+ bool
+ help
+ Provide an option to override CPU ratio value.
+
+config CPU_FLEX_RATIO
+ hex
+ depends on OVERRIDE_CPU_FLEX_RATIO
+ default 0
+ help
+ CPU ratio value controls the maximum processor non-turbo ratio.
+ Valid Range 0 to 63. CPU Ratio is 0 when disabled.
+
endif
diff --git a/src/soc/intel/cannonlake/romstage/fsp_params.c b/src/soc/intel/cannonlake/romstage/fsp_params.c
index 996c135..5c0328b 100644
--- a/src/soc/intel/cannonlake/romstage/fsp_params.c
+++ b/src/soc/intel/cannonlake/romstage/fsp_params.c
@@ -77,7 +77,10 @@
/* Set CpuRatio to match existing MSR value */
msr_t flex_ratio;
flex_ratio = rdmsr(MSR_FLEX_RATIO);
- m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
+ if (CONFIG(OVERRIDE_CPU_FLEX_RATIO))
+ m_cfg->CpuRatio = CONFIG_CPU_FLEX_RATIO;
+ else
+ m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
/* If ISH is enabled, enable ISH elements */
if (!dev)
--
To view, visit https://review.coreboot.org/c/coreboot/+/36864
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib01650f52f3d402f669e7e7f5b28a648b86f08ec
Gerrit-Change-Number: 36864
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Hello Weiyi Lu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/37136
to review the following change.
Change subject: mediatek/mt8183: disable BBLPM of DCXO core
......................................................................
mediatek/mt8183: disable BBLPM of DCXO core
When we only enable XO_SOC and mask most BBLPM requests, the BBLPM HW arbiter
will have DCXO core to enter Baseband Low-Power Mode(BBLPM).
Under BBLPM mode, inaccurate(about 1.5KHz offset) 26MHz clocks from crystal is provided
and crystal voltage will drop from 1.8V to 0.7V or lower.
In order to ensure the stability by always outputting an accuarate system clock
when system is running. We should disable BBLPM when only XO_SOC enabled.
BUG=b:136980838
BRANCH=kukui
TEST=accurate 26MHz provided and correct crystal voltage swing
Change-Id: Iea72a964507a19735cf92e3774cd8a94c06545b2
Signed-off-by: Weiyi Lu <weiyi.lu(a)mediatek.com>
---
M src/soc/mediatek/mt8183/rtc.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/37136/1
diff --git a/src/soc/mediatek/mt8183/rtc.c b/src/soc/mediatek/mt8183/rtc.c
index 19b717c..6e17a30 100644
--- a/src/soc/mediatek/mt8183/rtc.c
+++ b/src/soc/mediatek/mt8183/rtc.c
@@ -435,8 +435,8 @@
{
/* Disable clock buffer XO_CEL */
rtc_write(PMIC_RG_DCXO_CW00_CLR, 0x0800);
- /* Mask bblpm */
- rtc_write(PMIC_RG_DCXO_CW23, 0x0053);
+ /* Mask bblpm request and switch off bblpm mode */
+ rtc_write(PMIC_RG_DCXO_CW23, 0x0052);
}
/* the rtc boot flow entry */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37136
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iea72a964507a19735cf92e3774cd8a94c06545b2
Gerrit-Change-Number: 37136
Gerrit-PatchSet: 1
Gerrit-Owner: Weiyi Lu <weiyi.lu(a)mediatek.corp-partner.google.com>
Gerrit-Reviewer: Weiyi Lu <weiyi.lu(a)mediatek.com>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37182 )
Change subject: soc/nvidia/tegra: Remove duplicate macros
......................................................................
soc/nvidia/tegra: Remove duplicate macros
These macros are already defined in stdbool.h or commonlib/helpers.h
Change-Id: I6e474fc233d3134c89c29840471797b1e0c9e3c3
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
---
M src/soc/nvidia/tegra/types.h
1 file changed, 0 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/37182/1
diff --git a/src/soc/nvidia/tegra/types.h b/src/soc/nvidia/tegra/types.h
index 9af4b20..0cbbd5d 100644
--- a/src/soc/nvidia/tegra/types.h
+++ b/src/soc/nvidia/tegra/types.h
@@ -26,29 +26,4 @@
#define IS_ERR_PTR(ptr) \
(ptr == (void *)-EPTR)
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef false
-#define false 0
-#endif
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef container_of
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-#endif
-
#endif /* __TEGRA_MISC_TYPES_H__ */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37182
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6e474fc233d3134c89c29840471797b1e0c9e3c3
Gerrit-Change-Number: 37182
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36941 )
Change subject: arch/x86: SMBIOS: Improve core count reporting
......................................................................
arch/x86: SMBIOS: Improve core count reporting
Current code uses CPUID leaf 0x1, EBX bits 16:23 to determine number for
"core count". However, it turns out this number has little to do with
real number of cores. According to SDM vol 2A, it stays for "maximum
number of addressable IDs for logical processors in this physical
package". This does not seem to take into account fusing of giving
processor.
The new code determines 'core count' by dividing thread-level cpus by
reported logical cores. This seems to be the only way to arrive
to number of cores as it is reported in official CPU datasheet.
TEST=tested on OCP monolake
Change-Id: Id4ba9e3079f92ffe38f9104ffcfafe62582dd259
Signed-off-by: Andrey Petrov <anpetrov(a)fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36941
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh(a)siemens.com>
---
M src/arch/x86/smbios.c
1 file changed, 20 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Werner Zeh: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 7e05408..a599add 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -647,7 +647,26 @@
t->processor_version = smbios_processor_name(t->eos);
t->processor_family = (res.eax > 0) ? 0x0c : 0x6;
t->processor_type = 3; /* System Processor */
- t->core_count = (res.ebx >> 16) & 0xff;
+ /*
+ * If CPUID leaf 11 is available, calculate "core count" by dividing
+ * SMT_ID (logical processors in a core) by Core_ID (number of cores).
+ * This seems to be the way to arrive to a number of cores mentioned on
+ * ark.intel.com.
+ */
+ if (cpu_have_cpuid() && cpuid_get_max_func() >= 0xb) {
+ uint32_t leaf_b_cores = 0, leaf_b_threads = 0;
+ res = cpuid_ext(0xb, 1);
+ leaf_b_cores = res.ebx;
+ res = cpuid_ext(0xb, 0);
+ leaf_b_threads = res.ebx;
+ /* if hyperthreading is not available, pretend this is 1 */
+ if (leaf_b_threads == 0) {
+ leaf_b_threads = 1;
+ }
+ t->core_count = leaf_b_cores / leaf_b_threads;
+ } else {
+ t->core_count = (res.ebx >> 16) & 0xff;
+ }
/* Assume we enable all the cores always, capped only by MAX_CPUS */
t->core_enabled = MIN(t->core_count, CONFIG_MAX_CPUS);
t->l1_cache_handle = 0xffff;
--
To view, visit https://review.coreboot.org/c/coreboot/+/36941
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id4ba9e3079f92ffe38f9104ffcfafe62582dd259
Gerrit-Change-Number: 36941
Gerrit-PatchSet: 4
Gerrit-Owner: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37185 )
Change subject: nb/intel/sandybridge: Fix mrc.bin path
......................................................................
nb/intel/sandybridge: Fix mrc.bin path
The mrc.bin uses a lot of stack.
Change-Id: Ic422980ca1a0549b6937e30a433ce52e0d7a595c
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/northbridge/intel/sandybridge/Kconfig
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/37185/1
diff --git a/src/northbridge/intel/sandybridge/Kconfig b/src/northbridge/intel/sandybridge/Kconfig
index 0502b50..7a27d09 100644
--- a/src/northbridge/intel/sandybridge/Kconfig
+++ b/src/northbridge/intel/sandybridge/Kconfig
@@ -74,7 +74,10 @@
config DCACHE_BSP_STACK_SIZE
hex
- default 0x2800
+ default 0x10000
+ help
+ The amount of BSP stack anticipated in bootblock and
+ other stages.
if USE_NATIVE_RAMINIT
--
To view, visit https://review.coreboot.org/c/coreboot/+/37185
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic422980ca1a0549b6937e30a433ce52e0d7a595c
Gerrit-Change-Number: 37185
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange