Philipp Deppenwiese (zaolin.daisuki(a)googlemail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17855
-gerrit
commit d39c8543535ce26767e2ff04b3fc14a7ed45147e
Author: Philipp Deppenwiese <zaolin(a)das-labor.org>
Date: Wed Dec 14 01:06:55 2016 +0100
drivers/pc80/tpm: Set default TPM acpi path if unset
Enable default acpi path PCI0.LPCB if TPM support is
selected in the kconfig system and the acpi path is not set via
acpi_name callback in the platform code.
Thanks to Aaron Durbin for providing this fix.
Change-Id: Idb56cafe71efc8a52eee5a5a663478da99152360
Signed-off-by: Philipp Deppenwiese <zaolin(a)das-labor.org>
---
src/drivers/pc80/tpm/tpm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/drivers/pc80/tpm/tpm.c b/src/drivers/pc80/tpm/tpm.c
index 57ea919..83dc923 100644
--- a/src/drivers/pc80/tpm/tpm.c
+++ b/src/drivers/pc80/tpm/tpm.c
@@ -875,8 +875,10 @@ static void lpc_tpm_fill_ssdt(struct device *dev)
struct opregion opreg = OPREGION("TREG", SYSTEMMEMORY,
CONFIG_TPM_TIS_BASE_ADDRESS, 0x5000);
- if (!path)
- return;
+ if (!path) {
+ path = "PCI0.LPCB";
+ printk(BIOS_DEBUG, "Using default TPM ACPI path: '%s'\n", path);
+ }
/* Device */
acpigen_write_scope(path);
the following patch was just integrated into master:
commit a1df15efc82a0ec03bd7353f5f51a2f288c01685
Author: Matt DeVillier <matt.devillier(a)gmail.com>
Date: Fri Jan 8 17:22:09 2016 -0800
soc/intel/broadwell/lpc.c: don't zeroize existing gnvs table
The gnvs table only needs to be zeroized after init;
zeroizing an existing/populated table renders all I2C devices
completely non-functional.
TEST: boot Linux and observe all I2C devices functional
Change-Id: Id149ad645dfe5ed999a65d10e786e17585abc477
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
Reviewed-on: https://review.coreboot.org/17828
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
See https://review.coreboot.org/17828 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17837
-gerrit
commit 8ee399c5606afbbc1ec50737255d0c28104b63ca
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:55:26 2016 +0100
libpayload/drivers/video: Improve check in if condition
Coverity considers this a copy&paste error, and maybe it is. In any
case, it makes sense to check the variable that (if the condition is
true) is changed, and the values are the same before that test, so the
change is harmless.
Change-Id: I163c6a9f5baa05e715861dc19643b19a9c79c883
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1347376
---
payloads/libpayload/drivers/video/graphics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/video/graphics.c b/payloads/libpayload/drivers/video/graphics.c
index 943f8ed..f1d916a 100644
--- a/payloads/libpayload/drivers/video/graphics.c
+++ b/payloads/libpayload/drivers/video/graphics.c
@@ -322,7 +322,7 @@ static int draw_bitmap_v3(const struct vector *top_left,
for (d.y = 0; d.y < dim->height; d.y++, p.y += dir) {
s0.y = d.y * scale->y.d / scale->y.n;
s1.y = s0.y;
- if (s0.y + 1 < dim_org->height)
+ if (s1.y + 1 < dim_org->height)
s1.y++;
ty.d = scale->y.n;
ty.n = (d.y * scale->y.d) % scale->y.n;
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17836
-gerrit
commit 2e20fa3cd59eddb18d9e9eb5ff13aac457dbc8c2
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:50:23 2016 +0100
libpayload/.../PDCurses: Improve compatibility with ncurses
Coverity erroneously complains that we call wmove with x or y == -1,
even though our copy of that function properly checks for that.
But: setsyx is documented to always return OK (even on errors), so let
it do that. (and make coverity happy in the process)
Change-Id: I1bc9ba2a075037f0e1a855b67a93883978564887
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1260797
---
payloads/libpayload/curses/PDCurses/pdcurses/getyx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
index 1c03917..0f39c48 100644
--- a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
@@ -135,9 +135,14 @@ int setsyx(int y, int x)
curscr->_leaveit = TRUE;
return OK;
}
+ else if (y == -1 || x == -1)
+ {
+ return OK;
+ }
else
{
curscr->_leaveit = FALSE;
- return wmove(curscr, y, x);
+ wmove(curscr, y, x);
+ return OK;
}
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17835
-gerrit
commit 30534d7c384a60a3a7948ed7f818dcfe528d8509
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:47:22 2016 +0100
libpayload/.../PDCurses: avoid reading orig before NULL checking it
Coverity complains and that (unfortunately) means that some compiler
might take advantage of the same fact.
Change-Id: I59aff77820c524fa5a0fcb251c1268da475101fb
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1261105
---
payloads/libpayload/curses/PDCurses/pdcurses/window.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/window.c b/payloads/libpayload/curses/PDCurses/pdcurses/window.c
index b5634c7..24c5fd2 100644
--- a/payloads/libpayload/curses/PDCurses/pdcurses/window.c
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/window.c
@@ -294,9 +294,7 @@ int mvwin(WINDOW *win, int y, int x)
WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx)
{
WINDOW *win;
- int i;
- int j = begy - orig->_begy;
- int k = begx - orig->_begx;
+ int i, j, k;
PDC_LOG(("subwin() - called: lines %d cols %d begy %d begx %d\n",
nlines, ncols, begy, begx));
@@ -308,6 +306,9 @@ WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx)
(begx + ncols) > (orig->_begx + orig->_maxx))
return (WINDOW *)NULL;
+ j = begy - orig->_begy;
+ k = begx - orig->_begx;
+
if (!nlines)
nlines = orig->_maxy - 1 - j;
if (!ncols)
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17834
-gerrit
commit 47afcf5b4e35f11711d69030ea4af0e7a23794e1
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:42:58 2016 +0100
vendorcode/amd: Fix non-terminating loop
Code is copied from agesa/common's amdlib.c.
Things can probably be deduplicated.
Change-Id: I9c8adab5db7e9fd41aecc522136dfa705c1e2ee6
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1229662
---
src/vendorcode/amd/pi/Lib/amdlib.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/vendorcode/amd/pi/Lib/amdlib.c b/src/vendorcode/amd/pi/Lib/amdlib.c
index 4c8a56d..03ca207 100644
--- a/src/vendorcode/amd/pi/Lib/amdlib.c
+++ b/src/vendorcode/amd/pi/Lib/amdlib.c
@@ -381,11 +381,17 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
- for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
- }
- return (UINT8) Index;
+ uint8_t bit = 31;
+ do {
+ if (value & (1 << 31))
+ return bit;
+
+ value <<= 1;
+ bit--;
+
+ } while (value != 0);
+
+ return 0xFF; /* Error code indicating no bit found */
}
AMDLIB_OPTIMIZE
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17837
-gerrit
commit 794c994df87dfefd8dd561fddf428236dc23cfd7
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:55:26 2016 +0100
libpayload/drivers/video: Improve check in if condition
Coverity considers this a copy&paste error, and maybe it is. In any
case, it makes sense to check the variable that (if the condition is
true) is changed, and the values are the same before that test, so the
change is harmless.
Change-Id: I163c6a9f5baa05e715861dc19643b19a9c79c883
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1347376
---
payloads/libpayload/drivers/video/graphics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/video/graphics.c b/payloads/libpayload/drivers/video/graphics.c
index 943f8ed..f1d916a 100644
--- a/payloads/libpayload/drivers/video/graphics.c
+++ b/payloads/libpayload/drivers/video/graphics.c
@@ -322,7 +322,7 @@ static int draw_bitmap_v3(const struct vector *top_left,
for (d.y = 0; d.y < dim->height; d.y++, p.y += dir) {
s0.y = d.y * scale->y.d / scale->y.n;
s1.y = s0.y;
- if (s0.y + 1 < dim_org->height)
+ if (s1.y + 1 < dim_org->height)
s1.y++;
ty.d = scale->y.n;
ty.n = (d.y * scale->y.d) % scale->y.n;
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17836
-gerrit
commit 82555878e2acd05e288edb8b7f5cf9b059a09b9c
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:50:23 2016 +0100
libpayload/.../PDCurses: Improve compatibility with ncurses
Coverity erroneously complains that we call wmove with x or y == -1,
even though our copy of that function properly checks for that.
But: setsyx is documented to always return OK (even on errors), so let
it do that. (and make coverity happy in the process)
Change-Id: I1bc9ba2a075037f0e1a855b67a93883978564887
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1260797
---
payloads/libpayload/curses/PDCurses/pdcurses/getyx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
index 1c03917..0f39c48 100644
--- a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
@@ -135,9 +135,14 @@ int setsyx(int y, int x)
curscr->_leaveit = TRUE;
return OK;
}
+ else if (y == -1 || x == -1)
+ {
+ return OK;
+ }
else
{
curscr->_leaveit = FALSE;
- return wmove(curscr, y, x);
+ wmove(curscr, y, x);
+ return OK;
}
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17835
-gerrit
commit c00c36f84d54ce53f6012714ddb6c5cb003980bb
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue Dec 13 15:47:22 2016 +0100
libpayload/.../PDCurses: avoid reading orig before NULL checking it
Coverity complains and that (unfortunately) means that some compiler
might take advantage of the same fact.
Change-Id: I59aff77820c524fa5a0fcb251c1268da475101fb
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1261105
---
payloads/libpayload/curses/PDCurses/pdcurses/window.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/window.c b/payloads/libpayload/curses/PDCurses/pdcurses/window.c
index b5634c7..24c5fd2 100644
--- a/payloads/libpayload/curses/PDCurses/pdcurses/window.c
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/window.c
@@ -294,9 +294,7 @@ int mvwin(WINDOW *win, int y, int x)
WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx)
{
WINDOW *win;
- int i;
- int j = begy - orig->_begy;
- int k = begx - orig->_begx;
+ int i, j, k;
PDC_LOG(("subwin() - called: lines %d cols %d begy %d begx %d\n",
nlines, ncols, begy, begx));
@@ -308,6 +306,9 @@ WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx)
(begx + ncols) > (orig->_begx + orig->_maxx))
return (WINDOW *)NULL;
+ j = begy - orig->_begy;
+ k = begx - orig->_begx;
+
if (!nlines)
nlines = orig->_maxy - 1 - j;
if (!ncols)