Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/23178 )
Change subject: ec/lenovo/h8: Implement ACPI methods to set battery thresholds
......................................................................
Patch Set 25:
(3 comments)
https://review.coreboot.org/#/c/23178/24//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23178/24//COMMIT_MSG@9
PS24, Line 9: There are two known (yet) different ways to manage battery thresholds.
: This patch implements them and adds a way to enable them for
: different mainboards.
> Are those methods documented somewhere? Is there a specification?
No, it's all reverse engineered AFAIK.
https://review.coreboot.org/#/c/23178/24//COMMIT_MSG@22
PS24, Line 22:
> What do the `_24` and `_b0` in the filename mean?
24 and b0 are EC registers used to control thresholds. We don't have a meaningful names for them as they were reverse-engineered.
https://review.coreboot.org/#/c/23178/24//COMMIT_MSG@26
PS24, Line 26: Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
> Please put this right above the Signed-off-by lines.
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/23178
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Gerrit-Change-Number: 23178
Gerrit-PatchSet: 25
Gerrit-Owner: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck(a)sylv.io>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Tue, 22 Jan 2019 13:08:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: comment
Evgeny Zinoviev has uploaded a new patch set (#25) to the change originally created by Alexey Derlaft. ( https://review.coreboot.org/c/coreboot/+/23178 )
Change subject: ec/lenovo/h8: Implement ACPI methods to set battery thresholds
......................................................................
ec/lenovo/h8: Implement ACPI methods to set battery thresholds
There are two known (yet) different ways to manage battery thresholds.
This patch implements them and adds a way to enable them for
different mainboards.
Tested on W530 with 4.18.3-gentoo kernel. Works fine with new
Linux userspace API for controlling battery thresholds, available since
4.17.
(/sys/class/power_supply/BAT0/charge_(start|stop)_threshold).
The new API is supported by TLP (you might need to set NATACPI_ENABLE=1
in /etc/tlp.conf).
tpacpi-bat works fine too.
Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Signed-off-by: Alexey Kharlamov <der(a)2-47.ru>
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
M src/ec/lenovo/h8/Kconfig
M src/ec/lenovo/h8/acpi/thinkpad.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_24.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_b0.asl
M src/mainboard/lenovo/t400/Kconfig
M src/mainboard/lenovo/t400/acpi/ec.asl
M src/mainboard/lenovo/t420/Kconfig
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420s/Kconfig
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t430/Kconfig
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430s/Kconfig
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t520/Kconfig
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/x1_carbon_gen1/Kconfig
M src/mainboard/lenovo/x1_carbon_gen1/acpi/ec.asl
M src/mainboard/lenovo/x200/Kconfig
M src/mainboard/lenovo/x200/acpi/ec.asl
M src/mainboard/lenovo/x201/Kconfig
M src/mainboard/lenovo/x201/acpi/ec.asl
M src/mainboard/lenovo/x220/Kconfig
M src/mainboard/lenovo/x220/acpi/ec.asl
M src/mainboard/lenovo/x230/Kconfig
M src/mainboard/lenovo/x230/acpi/ec.asl
29 files changed, 461 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/23178/25
--
To view, visit https://review.coreboot.org/c/coreboot/+/23178
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Gerrit-Change-Number: 23178
Gerrit-PatchSet: 25
Gerrit-Owner: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck(a)sylv.io>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newpatchset
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28950 )
Change subject: lenovo/x230: introduce FHD variant
......................................................................
Patch Set 6: Code-Review+1
looks good to me, but should be tested again before i give a +2
--
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: 6
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: 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: Richard Slindee
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Kilian Neuner <cb(a)9-r.net>
Gerrit-CC: Sergey Alirzaev <zl29ah(a)gmail.com>
Gerrit-CC: Tom Hiller <thrilleratplay(a)gmail.com>
Gerrit-Comment-Date: Tue, 22 Jan 2019 12:35:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Arthur Heymans has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30868 )
Change subject: cpu/intel/smm/gen1: Add pineview to the check for alt SMRR MSR's
......................................................................
cpu/intel/smm/gen1: Add pineview to the check for alt SMRR MSR's
Intel pineview has the same alternative SMRR MSR and
IA32_FEATURE_CONTROL enable bit as core2 CPUs so properly check for
that before enabling this feature.
This also exposes a function to fetch whether alternative SMRR MSR's
ought to be used.
Change-Id: Iccaabfa95b8dc4366b8e7e2c2a526081d4af0efa
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30868
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/cpu/intel/smm/gen1/smi.h
M src/cpu/intel/smm/gen1/smmrelocate.c
2 files changed, 23 insertions(+), 7 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
diff --git a/src/cpu/intel/smm/gen1/smi.h b/src/cpu/intel/smm/gen1/smi.h
index f4cbbc3..cc6811f 100644
--- a/src/cpu/intel/smm/gen1/smi.h
+++ b/src/cpu/intel/smm/gen1/smi.h
@@ -19,3 +19,5 @@
u32 northbridge_get_tseg_size(void);
int cpu_get_apic_id_map(int *apic_id_map);
void northbridge_write_smram(u8 smram);
+
+bool cpu_has_alternative_smrr(void);
diff --git a/src/cpu/intel/smm/gen1/smmrelocate.c b/src/cpu/intel/smm/gen1/smmrelocate.c
index 5667648..105b9a4 100644
--- a/src/cpu/intel/smm/gen1/smmrelocate.c
+++ b/src/cpu/intel/smm/gen1/smmrelocate.c
@@ -56,17 +56,31 @@
static struct smm_relocation_params smm_reloc_params;
static void *default_smm_area = NULL;
-static void write_smrr(struct smm_relocation_params *relo_params)
+/* On model_6fx, model_1067x and model_106cx SMRR functions slightly
+ differently. The MSR are at different location from the rest
+ and need to be explicitly enabled in IA32_FEATURE_CONTROL MSR. */
+bool cpu_has_alternative_smrr(void)
{
struct cpuinfo_x86 c;
+ get_fms(&c, cpuid_eax(1));
+ if (c.x86 != 6)
+ return false;
+ switch (c.x86_model) {
+ case 0xf:
+ case 0x17: /* core2 */
+ case 0x1c: /* Bonnell */
+ return true;
+ default:
+ return false;
+ }
+}
+static void write_smrr(struct smm_relocation_params *relo_params)
+{
printk(BIOS_DEBUG, "Writing SMRR. base = 0x%08x, mask=0x%08x\n",
relo_params->smrr_base.lo, relo_params->smrr_mask.lo);
- /* Both model_6fx and model_1067x SMRR function slightly differently
- from the rest. The MSR are at different location from the rest
- and need to be explicitly enabled. */
- get_fms(&c, cpuid_eax(1));
- if (c.x86 == 6 && (c.x86_model == 0xf || c.x86_model == 0x17)) {
+
+ if (cpu_has_alternative_smrr()) {
msr_t msr;
msr = rdmsr(IA32_FEATURE_CONTROL);
/* SMRR enabled and feature locked */
@@ -171,7 +185,7 @@
/* On model_6fx and model_1067x bits [0:11] on smrr_base
are reserved */
get_fms(&c, cpuid_eax(1));
- if (c.x86 == 6 && (c.x86_model == 0xf || c.x86_model == 0x17))
+ if (cpu_has_alternative_smrr())
params->smrr_base.lo = (params->smram_base & rmask);
else
params->smrr_base.lo = (params->smram_base & rmask)
--
To view, visit https://review.coreboot.org/c/coreboot/+/30868
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iccaabfa95b8dc4366b8e7e2c2a526081d4af0efa
Gerrit-Change-Number: 30868
Gerrit-PatchSet: 5
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30019 )
Change subject: sb/intel/common/smi.c: Remove unused functions
......................................................................
Patch Set 12: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/30019
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibdc2bb0f1412366b945813efbc1b6451d27f376f
Gerrit-Change-Number: 30019
Gerrit-PatchSet: 12
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 22 Jan 2019 12:02:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/26298 )
Change subject: cpu/intel/model_2065x: Put stage cache in TSEG
......................................................................
Patch Set 41:
Has this been tested?
--
To view, visit https://review.coreboot.org/c/coreboot/+/26298
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I89cbfb6ece62f554ac676fe686115e841d2c1e40
Gerrit-Change-Number: 26298
Gerrit-PatchSet: 41
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
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-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 22 Jan 2019 12:01:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Angel Pons has uploaded a new patch set (#6) to the change originally created by Alexander Couzens. ( https://review.coreboot.org/c/coreboot/+/28950 )
Change subject: lenovo/x230: introduce FHD variant
......................................................................
lenovo/x230: introduce FHD variant
There is a modification for the x230 which uses the 2nd DP from the dock
as the integrated panel's connection, which allows using a Full HD (FHD)
eDP panel instead of the stock LVDS display.
To make this work with coreboot, the internal LVDS connector should be
disabled in libgfxinit. The VBT has been modified as well, which allows
brightness controls to work out of the box.
The modifications done to the VBT are:
- Remove the LVDS port entry.
- Move the DP-3 (which is the 2nd DP on the dock) entry to the first
position on the list.
- Set the DP-3 as internally connected.
This has been reported to work with panel LP125WF2 SPB4.
Change-Id: I0355d39a61956792e69bccd5274cfc2749d72bf0
Signed-off-by: Alexander Couzens <lynxis(a)fe80.eu>
---
M src/mainboard/lenovo/x230/Kconfig
M src/mainboard/lenovo/x230/Kconfig.name
M src/mainboard/lenovo/x230/Makefile.inc
R src/mainboard/lenovo/x230/variants/x230/data.vbt
R src/mainboard/lenovo/x230/variants/x230/gma-mainboard.ads
A src/mainboard/lenovo/x230/variants/x230_fhd/data.vbt
A src/mainboard/lenovo/x230/variants/x230_fhd/gma-mainboard.ads
7 files changed, 45 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/28950/6
--
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: 6
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: 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: Richard Slindee
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Kilian Neuner <cb(a)9-r.net>
Gerrit-CC: Sergey Alirzaev <zl29ah(a)gmail.com>
Gerrit-CC: Tom Hiller <thrilleratplay(a)gmail.com>
Gerrit-MessageType: newpatchset
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28950 )
Change subject: lenovo/x230: introduce FHD variant
......................................................................
Patch Set 5:
(1 comment)
I was wondering whether GFX_GMA_INTERNAL_IS_EDP would be needed, but I don't think that is the case since "internal" does not exist on nitrocaster.
https://review.coreboot.org/#/c/28950/5/src/mainboard/lenovo/x230/Kconfig
File src/mainboard/lenovo/x230/Kconfig:
https://review.coreboot.org/#/c/28950/5/src/mainboard/lenovo/x230/Kconfig@23
PS5, Line 23: GFX_GMA_INTERNAL_IS_LVDS
> only for BOARD_LENOVO_X230 and not for BOARD_LENOVO_X230_FHD
Ack
--
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: 5
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: 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: Richard Slindee
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Kilian Neuner <cb(a)9-r.net>
Gerrit-CC: Sergey Alirzaev <zl29ah(a)gmail.com>
Gerrit-CC: Tom Hiller <thrilleratplay(a)gmail.com>
Gerrit-Comment-Date: Tue, 22 Jan 2019 10:07:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment