Patrick Rudolph has uploaded a new patch set (#11) to the change originally created by Evgeny Zinoviev. ( https://review.coreboot.org/c/coreboot/+/28380 )
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Adds ACPI code for dGPU power management using the dGPU kernel module.
With Nvidia Optimus active the idle power consumption drops from
22,8W to 13,8W with maximum screen brightness.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver
- bumblebee (from the "develop" branch)
- bbswitch
lspci turns on the dGPU, but that is expected, as otherwise it can't access
the device's address space.
The Nvidia Optimus driver needs to be enabled by setting
CONFIG_NVIDIA_OPTIMUS=y
Tested on ThinkPad W530 and Thinkpad T520.
Known problems:
- nvidia driver doens't work:
[ 275.244113] NVRM: failed to copy vbios to system memory.
[ 275.244345] NVRM: RmInitAdapter failed! (0x30:0xffff:663)
[ 275.244433] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 275.347956] NVRM: failed to copy vbios to system memory.
[ 275.348140] NVRM: RmInitAdapter failed! (0x30:0xffff:663)
[ 275.348163] NVRM: rm_init_adapter failed for device bearing minor number 0
- Random CPU core lockups
TODO:
- Disable PEG clock to decrease idle power by 1W.
- Do longterm stability tests.
- Document _DSM and code.
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
A src/drivers/nvidia/optimus/Kconfig
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/optimus_sandy_ivy.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/ec/lenovo/pmh7/pmh7.h
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/t520/cmos.default
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/northbridge/intel/sandybridge/acpi/hostbridge.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
20 files changed, 672 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/11
--
To view, visit https://review.coreboot.org/c/coreboot/+/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 11
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Name of user not set #1002090
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Maxim Polyakov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31948
Change subject: mb/asrock/h110m: Add PEG Gen3 support
......................................................................
mb/asrock/h110m: Add PEG Gen3 support
This patch adds support PCIe Gen 3 with 8GT/s link speed for PEG x16
slot. All parameters for FSP are set during initialization in
romstage. Now there is no need to additionally configure the FSP
before building the ROM image.
Tested on Intel Core i5-6600 processor with the following devices:
- LP11000e Fibre Channel HBA (Gen2 x8);
- PEX8734 PCIe Fabric/Switch (Gen3 x16);
- NVIDIA GeForce GTX 1060 GPU (Gen3 x16).
GPU works with an nouveau and proprietary driver under Ubuntu 18.04.2
(4.15.0-46-generic GNU/Linux kernel). Discrete graphic card is used as
primary device for display output (if CONFIG_ONBOARD_VGA_IS_PRIMARY is
not set). Dynamic switching is not yet supported.
Tianocore (edk2-stable201811-216-g51be9d0) is used as the payload.
Change-Id: Ia4f29df47d76de5069fe53120434cc7c2ab6f044
Signed-off-by: Maxim Polyakov <max.senia.poliak(a)gmail.com>
---
M src/mainboard/asrock/h110m/devicetree.cb
M src/mainboard/asrock/h110m/romstage.c
2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/31948/1
diff --git a/src/mainboard/asrock/h110m/devicetree.cb b/src/mainboard/asrock/h110m/devicetree.cb
index 9e2fca0..78e99f3 100644
--- a/src/mainboard/asrock/h110m/devicetree.cb
+++ b/src/mainboard/asrock/h110m/devicetree.cb
@@ -201,6 +201,13 @@
[PchSerialIoIndexUart2] = PchSerialIoDisabled, \
}"
+ # Use SRCCLKREQ0# and CLKSRC0 for PEG x16 root port
+ register "PcieRpClkReqSupport[0]" = "1"
+ register "PcieRpClkReqNumber[0]" = "0"
+ # Enable Latency Tolerance Reporting Mechanism
+ register "PcieRpLtrEnable[0]" = "1"
+ register "PcieRpClkSrcNumber[0]" = "0"
+
# Enable Root port 6(x1) for LAN.
register "PcieRpEnable[5]" = "1"
# Enable CLKREQ#
diff --git a/src/mainboard/asrock/h110m/romstage.c b/src/mainboard/asrock/h110m/romstage.c
index 4961a79..dacf47b 100644
--- a/src/mainboard/asrock/h110m/romstage.c
+++ b/src/mainboard/asrock/h110m/romstage.c
@@ -83,4 +83,24 @@
/* desktop type */
mem_cfg->UserBd = BOARD_TYPE_DESKTOP;
+
+ /* initialize PEG 0:1:0 x16 Gen3 (8GT/s) root port */
+ mupd->FspmConfig.Peg0Enable = 1;
+ mupd->FspmConfig.Peg0MaxLinkSpeed = 3;
+
+ /*
+ * use Phase 2 Link Equalization for Gen3 Data Rate
+ * to minimize the BER (bit error rate)
+ */
+ mupd->FspmTestConfig.Peg0Gen3EqPh2Enable = 1;
+
+ /*
+ * Set primary display device
+ * default value: 3 (AUTO)
+ * 0: iGPU, 1: external GPU on PEG
+ */
+ if(CONFIG(ONBOARD_VGA_IS_PRIMARY))
+ mupd->FspmConfig.PrimaryDisplay = 0;
+ else
+ mupd->FspmConfig.PrimaryDisplay = 1;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/31948
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia4f29df47d76de5069fe53120434cc7c2ab6f044
Gerrit-Change-Number: 31948
Gerrit-PatchSet: 1
Gerrit-Owner: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded a new patch set (#10) to the change originally created by Evgeny Zinoviev. ( https://review.coreboot.org/c/coreboot/+/28380 )
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Tested on ThinkPad W530 and Thinkpad T520.
Adds ACPI code for dGPU power management.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver
- bumblebee (from the "develop" branch)
- bbswitch
- VGA ROM loading
lspci turns on the dGPU, but that is expected, as otherwise it can't access
the device's address space.
The Nvidia Optimus driver needs to be enabled by setting
CONFIG_NVIDIA_OPTIMUS=y
Known problems:
- nvidia driver doens't work:
[ 275.244113] NVRM: failed to copy vbios to system memory.
[ 275.244345] NVRM: RmInitAdapter failed! (0x30:0xffff:663)
[ 275.244433] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 275.347956] NVRM: failed to copy vbios to system memory.
[ 275.348140] NVRM: RmInitAdapter failed! (0x30:0xffff:663)
[ 275.348163] NVRM: rm_init_adapter failed for device bearing minor number 0
- Random CPU core lockups
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/optimus_sandy_ivy.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/ec/lenovo/pmh7/pmh7.h
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/t520/cmos.default
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/northbridge/intel/sandybridge/acpi/hostbridge.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
19 files changed, 661 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/10
--
To view, visit https://review.coreboot.org/c/coreboot/+/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 10
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Name of user not set #1002090
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Okashi Odayakana has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/11791 )
Change subject: mainboard/lenovo/t410: Add new port
......................................................................
Patch Set 12:
Any new progress on this? Seems like a very interesting port potential.
--
To view, visit https://review.coreboot.org/c/coreboot/+/11791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9d872e643dd242e925bfb46d18076e6ad100995
Gerrit-Change-Number: 11791
Gerrit-PatchSet: 12
Gerrit-Owner: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
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-CC: Eloy
Gerrit-CC: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-CC: Okashi Odayakana <brianblevins316(a)gmail.com>
Gerrit-CC: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-Comment-Date: Sat, 06 Apr 2019 00:56:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32190
Change subject: device/dram: Remove set but unused variable
......................................................................
device/dram: Remove set but unused variable
The `printram` function only expands to a value when a
certain debug macro is defined. This isn't done in default
builds, and so Clang (being ever so fastidious) flags
`param` with -Werror=unused-but-set-variable. This inlines
the value of `param` into the function call to prevent the
error.
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Change-Id: I3da657e74723e7443c2ea9e7bd4142baa262d751
---
M src/device/dram/ddr3.c
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/32190/1
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index f27fdcb..e545b4d 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -136,7 +136,7 @@
u8 reg8;
u32 mtb; /* medium time base */
u32 ftb; /* fine time base */
- unsigned int val, param;
+ unsigned int val;
ret = SPD_STATUS_OK;
@@ -173,8 +173,7 @@
printram(" Invalid number of memory banks\n");
ret = SPD_STATUS_INVALID_FIELD;
}
- param = 1 << (val + 3);
- printram(" Banks : %u\n", param);
+ printram(" Banks : %u\n", 1 << (val + 3));
/* SDRAM capacity */
capacity_shift = reg8 & 0x0f;
if (capacity_shift > 0x06) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/32190
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3da657e74723e7443c2ea9e7bd4142baa262d751
Gerrit-Change-Number: 32190
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32183
Change subject: libpayload: Align main() data types
......................................................................
libpayload: Align main() data types
One of many steps to compile with -Wconversion, as unsigned int and int
aren't the same thing.
BUG=b:111443775
BRANCH=none
TEST=make junit.xml shows fewer warnings with -Wconversion enabled
Change-Id: I9673ca70da32a1e5117b27fa89167e03379af9c1
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
M payloads/libpayload/arch/arm/main.c
M payloads/libpayload/arch/arm64/main.c
M payloads/libpayload/arch/mips/main.c
M payloads/libpayload/arch/x86/main.c
4 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/32183/1
diff --git a/payloads/libpayload/arch/arm/main.c b/payloads/libpayload/arch/arm/main.c
index cb2d242..52c6162 100644
--- a/payloads/libpayload/arch/arm/main.c
+++ b/payloads/libpayload/arch/arm/main.c
@@ -30,7 +30,7 @@
#include <exception.h>
#include <libpayload.h>
-unsigned int main_argc; /**< The argc value to pass to main() */
+int main_argc; /**< The argc value to pass to main() */
/** The argv value to pass to main() */
char *main_argv[MAX_ARGC_COUNT];
diff --git a/payloads/libpayload/arch/arm64/main.c b/payloads/libpayload/arch/arm64/main.c
index 593c40e..9a9ae96 100644
--- a/payloads/libpayload/arch/arm64/main.c
+++ b/payloads/libpayload/arch/arm64/main.c
@@ -31,7 +31,7 @@
#include <libpayload.h>
#include <arch/mmu.h>
-unsigned int main_argc; /**< The argc value to pass to main() */
+int main_argc; /**< The argc value to pass to main() */
/** The argv value to pass to main() */
char *main_argv[MAX_ARGC_COUNT];
diff --git a/payloads/libpayload/arch/mips/main.c b/payloads/libpayload/arch/mips/main.c
index b8c0c4d..7a71f90 100644
--- a/payloads/libpayload/arch/mips/main.c
+++ b/payloads/libpayload/arch/mips/main.c
@@ -17,7 +17,7 @@
#include <libpayload.h>
/* The argc value to pass to main() */
-unsigned int main_argc;
+int main_argc;
/* The argv value to pass to main() */
char *main_argv[MAX_ARGC_COUNT];
diff --git a/payloads/libpayload/arch/x86/main.c b/payloads/libpayload/arch/x86/main.c
index 4da0bba..2e876f2 100644
--- a/payloads/libpayload/arch/x86/main.c
+++ b/payloads/libpayload/arch/x86/main.c
@@ -34,7 +34,7 @@
unsigned long loader_eax; /**< The value of EAX passed from the loader */
unsigned long loader_ebx; /**< The value of EBX passed from the loader */
-unsigned int main_argc; /**< The argc value to pass to main() */
+int main_argc; /**< The argc value to pass to main() */
/** The argv value to pass to main() */
char *main_argv[MAX_ARGC_COUNT];
--
To view, visit https://review.coreboot.org/c/coreboot/+/32183
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9673ca70da32a1e5117b27fa89167e03379af9c1
Gerrit-Change-Number: 32183
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange