Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12294
-gerrit
commit 3fa01f5b580765392ca019d14fadae1e53eaa413
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Wed Jan 27 08:18:16 2016 +0100
Provide a gcc-safe zero pointer
zeroptr is a linker object pointing at 0 that can be used to thwart
GCC's (and other compilers') "dereferencing NULL is undefined"
optimization strategy when it gets in the way.
Change-Id: I6aa6f28283281ebae73d6349811e290bf1b99483
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
---
src/include/stddef.h | 8 ++++++++
src/lib/program.ld | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/src/include/stddef.h b/src/include/stddef.h
index b58f645..35326ed 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -34,4 +34,12 @@ typedef unsigned int wint_t;
#define MAYBE_STATIC static
#endif
+#ifndef __ROMCC__
+/* Provide a pointer to address 0 that thwarts any "accessing this is
+ * undefined behaviour and do whatever" trickery in compilers.
+ * Use when you _really_ need to read32(zeroptr) (ie. read address 0).
+ */
+extern void *zeroptr;
+#endif
+
#endif /* STDDEF_H */
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 865b5f6..9b8c7c9 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -133,6 +133,10 @@ _eprogram = .;
/* Discard the sections we don't need/want */
+.zeroptr 0 (NOLOAD) : {
+ zeroptr = .;
+}
+
/DISCARD/ : {
*(.comment)
*(.comment.*)
the following patch was just integrated into master:
commit 4b7a00867aba15f71679d406d140014a03d8e7a0
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Jan 26 09:25:09 2016 -0700
intel/sklrvp: Remove mainboard
The Intel Skylake RVP3 mainboard is not building, and according
to Intel, there is no plan to continue working on it for coreboot.
The intel/kunimitsu board is the Skylake reference design for
coreboot.org.
Change-Id: Icb4e42fdb560cc3188ca29c465674f5e0b11569b
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/13469
Tested-by: build bot (Jenkins)
Reviewed-by: Leroy P Leahy <leroy.p.leahy(a)intel.com>
See https://review.coreboot.org/13469 for details.
-gerrit
the following patch was just integrated into master:
commit 393d9322ba51feeea33cd08f77945f593cb70e32
Author: Andrey Korolyov <andrey(a)xdel.ru>
Date: Tue Jan 5 14:27:59 2016 +0300
ectool: fix NetBSD compilation
Since NetBSD does not support uname -o, push check for CygWin
inside separate non-failing condition in Makefile.
Change-Id: Ibd264384f49b33412f0ef8554bd9c9fb8f60a892
Signed-off-by: Andrey Korolyov <andrey(a)xdel.ru>
Reviewed-on: https://review.coreboot.org/12831
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/12831 for details.
-gerrit
the following patch was just integrated into master:
commit ffc2260d749a1774a79805ec51bcb67021c07c28
Author: Julius Werner <jwerner(a)chromium.org>
Date: Thu Jan 21 11:12:38 2016 -0800
chromeos: vpd: Avoid reading uninitialized VPDs
This patch adds a check to the VPD parsing code to avoid reading the
whole thing if the first byte ('type' of the first VPD entry) is 0x00
or 0xff. These values match the TERMINATOR and IMPLICIT_TERMINATOR types
which should never occur as the first entry, so this usually means that
the VPD FMAP section has simply never been initialized correctly. This
early abort avoids wasting time to read the whole section from SPI flash
(which we'd otherwise have to since we're not going to find a Google VPD
2.0 header either).
BRANCH=None
BUG=None
TEST=Booted Oak, confirmed that VPD read times dropped from 100ms to
1.5ms.
Change-Id: I9fc473e06440aef4e1023238fb9e53d45097ee9d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 20a726237e03941ad626a6146700170a45ee7720
Original-Change-Id: I09bfec3c24d24214fa4e9180878b58d00454f399
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/322897
Original-Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-on: https://review.coreboot.org/13467
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13467 for details.
-gerrit
the following patch was just integrated into master:
commit 4f7a3614cd07acdb6855c32eea38e5585834ee24
Author: Julius Werner <jwerner(a)chromium.org>
Date: Wed Jan 20 18:01:15 2016 -0800
chromeos: Add timestamps to measure VPD read times
This patch adds three timestamps to coreboot and the cbmem utility that
track the time required to read in the Chrome OS Vital Product Data
(VPD) blocks (RO and RW). It's useful to account for these like all
other large flash accesses, since their size is variable.
BRANCH=None
BUG=None
TEST=Booted Oak, found my weird 100ms gap at the start of ramstage
properly accounted for.
Change-Id: I2024ed4f7d5e5ae81df9ab5293547cb5a10ff5e0
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: b97288b5ac67ada56e2ee7b181b28341d54b7234
Original-Change-Id: Ie69c1a4ddb6bd3f1094b3880201d53f1b5373aef
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/322831
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Reviewed-on: https://review.coreboot.org/13139
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13139 for details.
-gerrit
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13489
-gerrit
commit 9e788837a042580f8c206f457bc9a44cafbc97e5
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Wed Jan 27 08:19:47 2016 +0100
cbfstool: Add compression attribute to ramstage
Currently, compression attribute is added to every cbfs file but
ramstage. This patch adds compression attribute for ramstage, too.
Change-Id: If66a9d3129740fcd5e703b9f3035a31431afb851
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
util/cbfstool/cbfs-mkstage.c | 3 +++
util/cbfstool/cbfstool.c | 20 +++++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 9d88658..2a2d062 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -5,6 +5,7 @@
* 2009 coresystems GmbH
* written by Patrick Georgi <patrick.georgi(a)coresystems.de>
* Copyright (C) 2012 Google, Inc.
+ * Copyright (C) 2016 Siemens AG. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -285,6 +286,8 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
*location -= sizeof(struct cbfs_stage);
output->size = sizeof(struct cbfs_stage) + outlen;
ret = 0;
+ if (algo == CBFS_COMPRESS_NONE)
+ ret = 1;
err:
parsed_elf_destroy(&pelf);
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 23787d8..c0a4b32 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -504,12 +504,30 @@ static int cbfstool_convert_mkstage(struct buffer *buffer, uint32_t *offset,
ret = parse_elf_to_xip_stage(buffer, &output, offset,
param.ignore_section);
- } else
+ } else {
ret = parse_elf_to_stage(buffer, &output, param.compression,
offset, param.ignore_section);
+ /* Add compression header. Compression was disabled in */
+ /* parse_elf_to_stage() when ret == 1, take it into account */
+ if (ret == 1)
+ param.compression = CBFS_COMPRESS_NONE;
+ struct cbfs_file_attr_compression *attrs =
+ (struct cbfs_file_attr_compression *)
+ cbfs_add_file_attr(header,
+ CBFS_FILE_ATTR_TAG_COMPRESSION,
+ sizeof(struct cbfs_file_attr_compression));
+ if (attrs == NULL)
+ ret = -1;
+ else {
+ attrs->compression = htonl(param.compression);
+ attrs->decompressed_size = htonl(buffer->size);
+ ret = 0;
+ }
+ }
if (ret != 0)
return -1;
+
buffer_delete(buffer);
// direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12294
-gerrit
commit d2bf503f8cea28b95ce4fcd4dead9b69b2196ac1
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Wed Jan 27 08:18:16 2016 +0100
Provide a gcc-safe null pointer
nullptr is a linker object pointing at 0 that can be used to thwart
GCC's (and other compilers') "dereferencing NULL is undefined"
optimization strategy when it gets in the way.
Change-Id: I6aa6f28283281ebae73d6349811e290bf1b99483
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
---
src/include/stddef.h | 4 ++++
src/lib/program.ld | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/include/stddef.h b/src/include/stddef.h
index b58f645..4fe4e05 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -34,4 +34,8 @@ typedef unsigned int wint_t;
#define MAYBE_STATIC static
#endif
+#ifndef __ROMCC__
+extern void *nullptr;
+#endif
+
#endif /* STDDEF_H */
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 865b5f6..0a966ad 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -133,6 +133,10 @@ _eprogram = .;
/* Discard the sections we don't need/want */
+.nullptr 0 (NOLOAD) : {
+ nullptr = .;
+}
+
/DISCARD/ : {
*(.comment)
*(.comment.*)