Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18037
-gerrit
commit 057835d47f9d247ce85c3b4ed068ccba3c86d419
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jan 4 22:31:22 2017 +0100
libpayload: ata: check that ata_strncpy actually works correctly
Change-Id: Icc3bfb3de57f0b8cd8d708aa3f8bb3f988b4008d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1260717, #1260739, #1261099, #1261106
---
payloads/libpayload/drivers/storage/ata.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/payloads/libpayload/drivers/storage/ata.c b/payloads/libpayload/drivers/storage/ata.c
index 80178c3..799df6a 100644
--- a/payloads/libpayload/drivers/storage/ata.c
+++ b/payloads/libpayload/drivers/storage/ata.c
@@ -28,6 +28,7 @@
*/
#include <libpayload.h>
+#include <assert.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
@@ -186,6 +187,12 @@ char *ata_strncpy(char *const dest, const u16 *const src, const size_t n)
{
int i;
+ /* This is what the code below expects:
+ * a positive and even number of characters
+ */
+ assert(n > 0);
+ assert(n % 2 == 0);
+
for (i = 0; i < (n - 1); i += 2) {
dest[i] = ((const char *)src)[i + 1];
dest[i + 1] = ((const char *)src)[i];
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18036
-gerrit
commit fbf9c68038109be671f7be3c3933c630f2c19d24
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jan 4 22:22:56 2017 +0100
libpayload: usb: handle situation with no free device address
Change-Id: I1308bdca90f1a09d980f384ee85552198a39b965
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1260940
---
payloads/libpayload/drivers/usb/usb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index bfb697d..bb42f89 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -336,6 +336,8 @@ generic_set_address (hci_t *controller, usb_speed speed,
int hubport, int hubaddr)
{
int adr = get_free_address (controller); // address to set
+ if (adr < 0)
+ return NULL;
dev_req_t dr;
memset (&dr, 0, sizeof (dr));
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17981
-gerrit
commit 9271d3b1aff5378240181a471e4472aaa6570c10
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Wed Dec 28 21:20:45 2016 +0100
nb/intel/945gc: Hardcode the integrated graphic frequencies
The code to set the igd frequencies is written with the mobile version
of the 945 chipset in mind and seems to cause cause strange igd
related problems on the desktop versions.
Some psosible problems are:
* on 800MHz fsb CPUs the igd sometimes has artefacts on the screen;
* on 800MHz fsb CPU memtest results vary a lot;
* since a commit 45e11aa0a5 "Add/Combine Broadwell Chromebooks using
variant board scheme" that does not affect this northbridge, the
display shows garbage as soon as Linux (4.8) modesets the display.
A fix is to hardcode the core display and render clocks to their
maximum, potentially also improving graphical performance.
Vendor bios on all boards in coreboot with this northbridge have the
same value in this PCI config address.
TESTED on P5GC-MX (display works fine again in Linux) and
user reports of it making GA-945GCM-S2L run more stable.
Change-Id: I8b046edbc952631d9b79023e3d385160ff682c24
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/i945/raminit.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c
index a4a1eaf..1de29fc 100644
--- a/src/northbridge/intel/i945/raminit.c
+++ b/src/northbridge/intel/i945/raminit.c
@@ -3116,8 +3116,14 @@ void sdram_initialize(int boot_path, const u8 *spd_addresses)
/* Program PLL settings */
sdram_program_pll_settings(&sysinfo);
- /* Program Graphics Frequency */
- sdram_program_graphics_frequency(&sysinfo);
+ /*
+ * Program Graphics Frequency
+ * Set core display and rendor clock on 945GC to the max
+ */
+ if (IS_ENABLED(CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GM))
+ sdram_program_graphics_frequency(&sysinfo);
+ else
+ pci_write_config16(PCI_DEV(0, 2, 0), GCFC, 0x0534);
/* Program System Memory Frequency */
sdram_program_memory_frequency(&sysinfo);
the following patch was just integrated into master:
commit ab8f7d315ec845d0fe86b440b4773d22f97946cd
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Dec 7 10:45:55 2016 -0700
util/crossgcc: update jenkins-build-toolchain
This allows the make jenkins-build-toolchain to use the
BUILDGCC_OPTIONS variable. Previously, the options were hardcoded.
Change-Id: I5f4c1d3fc8c714ec3640356ae3c86ae157f486d2
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/17766
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
See https://review.coreboot.org/17766 for details.
-gerrit
the following patch was just integrated into master:
commit 2c1c02ea6aaff39de78d0cc2406886200360a71b
Author: Nico Huber <nico.h(a)gmx.de>
Date: Mon Jan 2 20:51:28 2017 +0100
buildgcc: Remove quotes around a $CC call
If we use ccache we have to interpret spaces in $CC as separation
characters. The downside is that we can't support spaces in the
compiler's path. But, well...
Change-Id: I4e6e6324389354669a755f570083a40ff00b1bbf
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/18018
Reviewed-by: Martin Roth <martinroth(a)google.com>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/18018 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/18035
-gerrit
commit 9749efadcac07afe6dbc34d8680ffa542afe779f
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jan 4 22:08:10 2017 +0100
libpayload: xhci: plug leak
Change-Id: Ia163872846906c6c78144a984a405812f856f626
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Found-by: Coverity Scan #1325835
---
payloads/libpayload/drivers/usb/xhci_devconf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/payloads/libpayload/drivers/usb/xhci_devconf.c b/payloads/libpayload/drivers/usb/xhci_devconf.c
index 48d928c..b697b0f 100644
--- a/payloads/libpayload/drivers/usb/xhci_devconf.c
+++ b/payloads/libpayload/drivers/usb/xhci_devconf.c
@@ -451,6 +451,7 @@ xhci_destroy_dev(hci_t *const controller, const int slot_id)
*ic->drop = (1 << num_eps) - 1; /* Drop all endpoints we can. */
*ic->drop &= ~(1 << 1 | 1 << 0); /* Not allowed to drop EP0 or Slot. */
int cc = xhci_cmd_evaluate_context(xhci, slot_id, ic);
+ free(ic);
if (cc != CC_SUCCESS)
xhci_debug("Failed to quiesce slot %d: %d\n", slot_id, cc);
cc = xhci_cmd_stop_endpoint(xhci, slot_id, 1);