the following patch was just integrated into master:
commit d0d7e7d7619e469dc936a579a6ce2adee9425ca6
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Fri Mar 22 11:05:38 2013 -0700
lynxpoint: Rework ACPI NVS to add new SerialIO variables
This reclaims space in ACPI NVS by removing unused fields and
adds new fields for SerialIO BARs which will be used to communicate
the allocated resources to ACPI.
Change-Id: I002bf396cf7b495bc5b7e54b741527e507aff716
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: http://review.coreboot.org/2969
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Fri Mar 29 23:06:33 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Sun Mar 31 23:46:55 2013, giving +2
See http://review.coreboot.org/2969 for details.
-gerrit
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2934
-gerrit
commit c896acf51810403b6bd37f368659eec95c6128bd
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed Mar 27 09:50:30 2013 +0100
PDCurses: pdcscrn.c: Use `#ifdef` instead of `#if CONFIG_SPEAKER`
Building libpayload with the PDCurses backend the following warning
is shown.
/src/coreboot/payloads/libpayload(master) $ make clean
/src/coreboot/payloads/libpayload(master) $ make
[…]
CC curses/pdcurses-backend/pdcscrn.libcurses.o
curses/pdcurses-backend/pdcscrn.c: In function 'PDC_scr_open':
curses/pdcurses-backend/pdcscrn.c:75:5: warning: "CONFIG_SPEAKER" is not defined [-Wundef]
[…]
The GCC documentation states [1]
In some contexts this shortcut is undesirable. The -Wundef option
causes GCC to warn whenever it encounters an identifier which is
not a macro in an ‘#if’.
and therefore use `#ifdef` [2] to silence this warning. No functional
change is done, as `CONFIG_SPEAKER` is assigned the value `Y` when
defined.
There was some discussion going on the list [3], but my points in there
turned out to be incorrect.
[1] http://gcc.gnu.org/onlinedocs/cpp/If.html
[2] http://gcc.gnu.org/onlinedocs/cpp/Ifdef.html
[3] http://www.coreboot.org/pipermail/coreboot/2013-March/075561.html
Change-Id: I8e9c9b5d01985b21ad05018986d614cf9bf2b439
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
payloads/libpayload/curses/pdcurses-backend/pdcscrn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
index d3f1849..e741b15 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
@@ -72,7 +72,7 @@ int PDC_scr_open(int argc, char **argv)
SP->lines = PDC_get_rows();
SP->cols = PDC_get_columns();
-#if CONFIG_SPEAKER
+#ifdef CONFIG_SPEAKER
SP->audible = TRUE;
#endif
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2997
-gerrit
commit 927e38b487e2a73d848d846c77ef09ce4255bd1b
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Fri Jan 25 15:36:59 2013 +0100
libpayload: cbfs_core.h: Add missing third person s in »it need*s*«
Introduced in »libpayload: New CBFS to support multiple firmware
media sources.« (d01d0368) [1].
[1] http://review.coreboot.org/2191
Change-Id: I9feb9ab49825744cd00d6392a526f7af0ed053d1
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
payloads/libpayload/include/cbfs_core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index 81ca866..2dc1992 100644
--- a/payloads/libpayload/include/cbfs_core.h
+++ b/payloads/libpayload/include/cbfs_core.h
@@ -85,7 +85,7 @@
#define CBFS_HEADER_INVALID_ADDRESS ((void*)(0xffffffff))
-/** this is the master cbfs header - it need to be located somewhere available
+/** this is the master cbfs header - it needs to be located somewhere available
to bootblock (to load romstage). Where it actually lives is up to coreboot.
On x86, a pointer to this header will live at 0xFFFFFFFC.
For other platforms, you need to define CONFIG_CBFS_HEADER_ROM_OFFSET */
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2996
-gerrit
commit 62c88966d6c7bd75fd62a8759fdbb7f444a34319
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 31 22:15:43 2013 +0200
inteltool: Allow to override Makefile variables
Allow to override the variables `CC`, `INSTALL`, `PREFIX`,
`CFLAGS` and `LDFLAGS`. Though append `-lpci -lz` to `LDFLAGS`.
This way for example a different compiler can easily be used.
CC=clang make
As a side note, Clang in contrast to GCC does *not* issue the
following warnings.
$ clang --version
Debian clang version 3.2-1~exp6 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: i386-pc-linux-gnu
Thread model: posix
$ gcc --version
gcc-4.7.real (Debian 4.7.2-15) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
[…]
amb.c: In function ‘amb_read_config32’:
amb.c:31:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:31:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
amb.c: In function ‘amb_read_config16’:
amb.c:45:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:45:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
amb.c: In function ‘amb_read_config8’:
amb.c:60:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:60:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[…]
Change-Id: Id75dea081ecb35390f283520a7e5dce520f4c98d
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/inteltool/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile
index 6c94460..2028a4a 100644
--- a/util/inteltool/Makefile
+++ b/util/inteltool/Makefile
@@ -21,17 +21,17 @@
PROGRAM = inteltool
-CC = gcc
-INSTALL = /usr/bin/install
-PREFIX = /usr/local
-CFLAGS = -O2 -g -Wall -W
-LDFLAGS = -lpci -lz
+CC ?= gcc
+INSTALL ?= /usr/bin/install
+PREFIX ?= /usr/local
+CFLAGS ?= -O2 -g -Wall -W
+LDFLAGS += -lpci -lz
OBJS = inteltool.o cpu.o gpio.o rootcmplx.o powermgt.o memory.o pcie.o amb.o
OS_ARCH = $(shell uname)
ifeq ($(OS_ARCH), Darwin)
-LDFLAGS = -framework DirectHW -lpci -lz
+LDFLAGS += -framework DirectHW
endif
ifeq ($(OS_ARCH), FreeBSD)
CFLAGS += -I/usr/local/include
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2994
-gerrit
commit 69f78c59ef8882ab2f5d29dc78ed01310f111ebe
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 31 22:02:16 2013 +0200
inteltool: Use `ll` instead of `l` as the length modifier for `uint64_t`
When buidling inteltool with GCC, the following warning is printed.
$ make
[…]
gcc -O2 -g -Wall -W -c -o memory.o memory.c
memory.c: In function ‘print_mchbar’:
memory.c:287:7: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat]
[…]
This was introduced in commit »inteltool: Add support for H65 Express
chipset« (c7fc4422) [1].
Address this warning, by using `%llx` instead of `%lx`.
[1] http://review.coreboot.org/1258
Change-Id: I4f714edce7e8b405e1a7a417d02fa498322c88a8
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/inteltool/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/inteltool/memory.c b/util/inteltool/memory.c
index 72a2de4..6847e5c 100644
--- a/util/inteltool/memory.c
+++ b/util/inteltool/memory.c
@@ -197,7 +197,7 @@ int print_mchbar(struct pci_dev *nb, struct pci_access *pacc)
for (i = 0; i < size; i++) {
switch (mch_registers[i].size) {
case 8:
- printf("mchbase+0x%04x: 0x%016lx (%s)\n",
+ printf("mchbase+0x%04x: 0x%016llx (%s)\n",
mch_registers[i].addr,
*(uint64_t *)(mchbar+mch_registers[i].addr),
mch_registers[i].name);
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2991
-gerrit
commit 8e36bf8099019ecdb9bf9d1f7480234e9a7d9c2f
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sat Mar 30 12:15:12 2013 +0100
util/cbmem: Don't output trailing garbage for cbmemc
Current code outputs the whole cbmemc buffer even if only part of
it is really used. Fix it to output only the used part and notify
the user if the buffer was too small for the required data.
Change-Id: I68c1970cf84d49b2d7d6007dae0679d7a7a0cb99
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
util/cbmem/cbmem.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index bc6bd6b..aed133a 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -308,12 +308,21 @@ static void dump_timestamps(void)
unmap_memory();
}
+static const char *future_ngettext (const char *sing, const char *plural,
+ unsigned long int n)
+{
+ if (n == 1)
+ return sing;
+ return plural;
+}
+
/* dump the cbmem console */
static void dump_console(void)
{
void *console_p;
char *console_c;
uint32_t size;
+ uint32_t cursor;
if (console.tag != LB_TAG_CBMEM_CONSOLE) {
fprintf(stderr, "No console found in coreboot table.\n");
@@ -328,6 +337,12 @@ static void dump_console(void)
* Hence we have to add 8 to get to the actual console string.
*/
size = *(uint32_t *)console_p;
+ cursor = *(uint32_t *) (console_p + 4);
+ /* Cursor continues to go on even after no more data fits in
+ * the buffer but the data is dropped in this case.
+ */
+ if (size > cursor)
+ size = cursor;
console_c = malloc(size + 1);
if (!console_c) {
fprintf(stderr, "Not enough memory for console.\n");
@@ -337,7 +352,11 @@ static void dump_console(void)
memcpy(console_c, console_p + 8, size);
console_c[size] = 0;
- printf("%s", console_c);
+ printf("%s\n", console_c);
+ if (size < cursor)
+ printf(future_ngettext("one byte lost\n",
+ "%d bytes lost\n", cursor - size),
+ cursor - size);
free(console_c);
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2990
-gerrit
commit dc322e66370034efefb830df83e5ce78a08b1d88
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sat Mar 30 12:04:23 2013 +0100
Intel: Return on missing microcode file to fix null pointer dereference
Selecting `CPU_MICROCODE_IN_CBFS` in Kconfig but not having the
microcode blob `cpu_microcode_blob.bin` in CBFS results in a
null pointer dereference later on resulting in a crash.
for(c = microcode_updates; m->hdrver; m = (const struct microcode *)c) {
Fix this by returning if `microcode_updates` is `NULL`, that means
no file is found.
This patch is successfully tested on the Lenovo X201.
Change-Id: I6e18fd37256910bf047061e4633a66cf29ad7b69
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/cpu/intel/microcode/microcode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index d908c25..82ab7a2 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -130,6 +130,9 @@ const void *intel_microcode_find(void)
CBFS_TYPE_MICROCODE);
#endif
+ /* No need for explicit error message since the user already gets
+ "file not found" from cbfs.
+ */
if (!microcode_updates)
return microcode_updates;
@@ -202,6 +205,9 @@ void intel_update_microcode(const void *microcode_updates)
const char *c;
msr_t msr;
+ if (!microcode_updates)
+ return;
+
/* CPUID sets MSR 0x8B iff a microcode update has been loaded. */
msr.lo = 0;
msr.hi = 0;