Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18015
-gerrit
commit 5183b81985321b7da6a2ff28f2032ee84930f5d8
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Mon Jan 2 18:54:28 2017 +0100
util/romcc: free variable after use
closure_type is copied then never used again. Close that leak.
Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1287073
---
util/romcc/romcc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index 871dde1..7217c8c 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -14376,6 +14376,8 @@ static void expand_function_call(
/* Update the called functions closure variable */
closure_idx = add_closure_type(state, func, closure_type);
+ free(closure_type);
+ closure_type = NULL;
/* Generate some needed triples */
ret_loc = label(state);
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18014
-gerrit
commit d00268dd99d05a419b9afad50d60667dad8b4c60
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Mon Jan 2 18:47:50 2017 +0100
util/romcc: avoid shifting more than the variable's width
That's undefined behavior in C
Change-Id: I671ed8abf02e57a7cc993d1a85354e905f51717d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1229557
---
util/romcc/romcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index cc1a3ac..871dde1 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -10023,7 +10023,7 @@ static void simplify_copy(struct compile_state *state, struct triple *ins)
/* Ensure I am properly sign extended */
if (size_of(state, right->type) < size_of(state, ins->type) &&
is_signed(right->type)) {
- long_t val;
+ uint64_t val;
int shift;
shift = SIZEOF_LONG - size_of(state, right->type);
val = left;
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18012
-gerrit
commit 64daa0557c26325c22a1ef497a68d785165e3d1d
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Jan 2 18:41:37 2017 +0100
sb/intel/common/gpio: Support ICH9M and prior
Reorder the commands executed to support ICH9M and prior where
GPIO level and direction are only set on pins configured as GPIO.
Required to set correct GPIO layout on T500.
Tested on T500.
Change-Id: I691e672c7cb52ca51a80fd29657ada7488db0d41
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/southbridge/intel/common/gpio.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/southbridge/intel/common/gpio.c b/src/southbridge/intel/common/gpio.c
index aadd519..c07a5bc 100644
--- a/src/southbridge/intel/common/gpio.c
+++ b/src/southbridge/intel/common/gpio.c
@@ -37,13 +37,17 @@ void setup_pch_gpios(const struct pch_gpio_map *gpio)
{
u16 gpiobase = get_gpio_base();
+ /* The order of these calls does matter on ICH9M and prior.
+ * The direction and level are only set on pins configured as GPIO,
+ * thus make sure that mode register is written first !*/
+
/* GPIO Set 1 */
- if (gpio->set1.level)
- outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
if (gpio->set1.mode)
outl(*((u32 *)gpio->set1.mode), gpiobase + GPIO_USE_SEL);
if (gpio->set1.direction)
outl(*((u32 *)gpio->set1.direction), gpiobase + GP_IO_SEL);
+ if (gpio->set1.level)
+ outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
if (gpio->set1.reset)
outl(*((u32 *)gpio->set1.reset), gpiobase + GP_RST_SEL1);
if (gpio->set1.invert)
@@ -52,22 +56,22 @@ void setup_pch_gpios(const struct pch_gpio_map *gpio)
outl(*((u32 *)gpio->set1.blink), gpiobase + GPO_BLINK);
/* GPIO Set 2 */
- if (gpio->set2.level)
- outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
if (gpio->set2.mode)
outl(*((u32 *)gpio->set2.mode), gpiobase + GPIO_USE_SEL2);
if (gpio->set2.direction)
outl(*((u32 *)gpio->set2.direction), gpiobase + GP_IO_SEL2);
+ if (gpio->set2.level)
+ outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
if (gpio->set2.reset)
outl(*((u32 *)gpio->set2.reset), gpiobase + GP_RST_SEL2);
/* GPIO Set 3 */
- if (gpio->set3.level)
- outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
if (gpio->set3.mode)
outl(*((u32 *)gpio->set3.mode), gpiobase + GPIO_USE_SEL3);
if (gpio->set3.direction)
outl(*((u32 *)gpio->set3.direction), gpiobase + GP_IO_SEL3);
+ if (gpio->set3.level)
+ outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
if (gpio->set3.reset)
outl(*((u32 *)gpio->set3.reset), gpiobase + GP_RST_SEL3);
}
the following patch was just integrated into master:
commit 2ed7295cd995f1e28fe442ce50a4a7aa3362395c
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Dec 16 14:51:53 2016 +0100
util/cbfstool: Don't print region information on stderr by default
It's usually not too interesting, so hide it behind -v.
Change-Id: Icffb5ea4d70300ab06dfa0c9134d265433260368
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17899
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17899 for details.
-gerrit