Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10262
-gerrit
commit bd2650c9d5b099cb88afc5cd544621191d724f57
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed May 20 07:35:56 2015 +0200
util/board_status: Fetch and rebase after failed push
Currently, when the remote master branch of the board-status
repository changes between cloning and pushing, `git push origin`
fails.
This race condition happens quite often with REACTS testing commits at
the same time on different systems.
If that happens, just download the objects and refs from the
board-status repository and rebase the local changes on it. Try that
three times before exiting with an error message.
Change-Id: I628ebce54895f44be6232b622d56acbcc421b847
Reported-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/board_status/board_status.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 2cb4e5c..298765d 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -286,11 +286,19 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
echo "Uploading results"
git add "${vendor}"
git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
- git push origin
+ COUNT=0
+ until [[ $(git push origin) -eq 0 || $COUNT -gt 2 ]]; do
+ git pull --rebase
+ COUNT=$((COUNT + 1))
+ done;
# Results have been uploaded so it's pointless to keep the
# temporary files around.
rm -rf "${tmpdir}"
+ if [ $COUNT -gt 2 ]; then
+ "Error uploading to board-status repo, aborting"
+ exit $EXIT_FAILURE
+ fi
fi
cd "$coreboot_dir"
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10262
-gerrit
commit 03a3631b56c43b2178e1eff243590d91c03261d7
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed May 20 07:35:56 2015 +0200
util/board_status: Fetch and rebase after failed push
Currently, when the remote master branch of the board-status
repository changes between cloning and pushing, `git push origin`
fails.
This race condition happens quite often with REACTS testing commits at
the same time on different systems.
If that happens, just download the objects and refs from the
board-status repository and rebase the local changes on it. Try that
three times before exiting with an error message.
Change-Id: I628ebce54895f44be6232b622d56acbcc421b847
Reported-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/board_status/board_status.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 2cb4e5c..22a1391 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -286,11 +286,19 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
echo "Uploading results"
git add "${vendor}"
git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
- git push origin
+ COUNT=0
+ until [[ git push origin -eq 0 || $COUNT -gt 2 ]]; do
+ git pull --rebase
+ COUNT=$((COUNT + 1))
+ done;
# Results have been uploaded so it's pointless to keep the
# temporary files around.
rm -rf "${tmpdir}"
+ if [ $COUNT -gt 2 ]; then
+ "Error uploading to board-status repo, aborting"
+ exit $EXIT_FAILURE
+ fi
fi
cd "$coreboot_dir"
the following patch was just integrated into master:
commit eec8dfb5e7eec7d837005ce97eb09d18386fabdd
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu May 7 22:24:41 2015 +0200
build system: use archives, not linker action to shorten command lines
Intermediate linking may distort linker behavior (in particular related to
weak symbols). The idea is that archives are closer to 'just a list of
object files', and ideally makes the linker more predictable.
Using --whole-archive, the linker doesn't optimize out object files just
because their symbols were already provided by weak versions. However it
shouldn't be used for libgcc, because that one has some unexpected side-effects.
Change-Id: Ie226c198a93bcdca2d82c02431c72108a1c6ea60
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10139
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
See http://review.coreboot.org/10139 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/10262
-gerrit
commit 58f16be579b032439394463d10b13b4abcf69793
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed May 20 07:35:56 2015 +0200
util/board_status: Fetch and rebase after failed push
Currently, when the remote master branch of the board-status
repository changes between cloning and pushing, `git push origin`
fails.
This race condition happens quite often with REACTS testing commits at
the same time on different systems.
If that happens, just download the objects and refs from the
board-status repository and rebase the local changes on it.
Note, `git push origin` might fail due to other reasons.
Unfortunately, git doesn’t seem to return different error codes, so
this is hard to detect. Use a counter or time-out might be helpful in
that case.
Change-Id: I628ebce54895f44be6232b622d56acbcc421b847
Reported-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/board_status/board_status.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 2cb4e5c..2356e65 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -286,7 +286,9 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
echo "Uploading results"
git add "${vendor}"
git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
- git push origin
+ until git push origin; do
+ git pull --rebase
+ done
# Results have been uploaded so it's pointless to keep the
# temporary files around.
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10261
-gerrit
commit fa0566536a5a265c0662323d6a1c2319562247a8
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue May 19 16:25:20 2015 -0500
prog_loading: add region_device representing memory
One can remove the struct buffer_area and use the region_device
embedded in the struct prog to represent the in-memory loaded
program. Do this by introducing a addrspace_32bit mem_region_device
that can have region_device operations performed on it. The
addrspace_32bit name was chosen to make it explicit that 32-bits
of address space is supported at the max.
Change-Id: Ifffa0ef301141de940e54581b5a7b6cd81311ead
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/program_loading.h | 34 ++++++++++++++++++----------------
src/lib/prog_loaders.c | 3 +++
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 05f5e3e..d8e7de3 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -34,11 +34,6 @@ enum {
* set on the last segment loaded. */
void arch_segment_loaded(uintptr_t start, size_t size, int flags);
-struct buffer_area {
- void *data;
- size_t size;
-};
-
enum prog_type {
PROG_VERSTAGE,
PROG_ROMSTAGE,
@@ -51,28 +46,27 @@ enum prog_type {
struct prog {
enum prog_type type;
const char *name;
- /* Source of program content to load. */
+ /* Source of program content to load. After loading program it
+ * represents the memory region of the stages and payload. For
+ * achitectures that use a bounce buffer then it would represent
+ * the bounce buffer. */
struct region_device rdev;
- /* The area can mean different things depending on what type the
- * program is. A stage after being loaded reflects the memory occupied
- * by the program, Since payloads are multi-segment one can't express
- * the memory layout with one range. Instead this field is updated
- * to reflect the bounce buffer used. */
- struct buffer_area area;
/* Entry to program with optional argument. It's up to the architecture
* to decide if argument is passed. */
void (*entry)(void *);
void *arg;
};
+/* Only valid for loaded programs. */
static inline size_t prog_size(const struct prog *prog)
{
- return prog->area.size;
+ return region_device_sz(&prog->rdev);
}
+/* Only valid for loaded programs. */
static inline void *prog_start(const struct prog *prog)
{
- return prog->area.data;
+ return rdev_mmap_full(&prog->rdev);
}
static inline void *prog_entry(const struct prog *prog)
@@ -85,10 +79,18 @@ static inline void *prog_entry_arg(const struct prog *prog)
return prog->arg;
}
+/* region_device representing the 32-bit flat address space. */
+extern const struct mem_region_device addrspace_32bit;
+
+static inline void prog_memory_init(struct prog *prog, uintptr_t ptr,
+ size_t size)
+{
+ rdev_chain(&prog->rdev, &addrspace_32bit.rdev, ptr, size);
+}
+
static inline void prog_set_area(struct prog *prog, void *start, size_t size)
{
- prog->area.data = start;
- prog->area.size = size;
+ prog_memory_init(prog, (uintptr_t)start, size);
}
static inline void prog_set_entry(struct prog *prog, void *e, void *arg)
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 881cd99..7799994 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -35,6 +35,9 @@
#include <symbols.h>
#include <timestamp.h>
+/* Only can represent up to 1 byte less than size_t. */
+const struct mem_region_device addrspace_32bit = MEM_REGION_DEV_INIT(0, ~0UL);
+
#define DEFAULT_CBFS_LOADER_PRESENT \
(!ENV_VERSTAGE || (ENV_VERSTAGE && !CONFIG_RETURN_FROM_VERSTAGE))
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10261
-gerrit
commit 9fca92aa58cefa87c7b6f0a7edba29d720477bdf
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue May 19 16:25:20 2015 -0500
prog_loading: add region_device representing memory
One can remove the struct buffer_area and use the region_device
embedded in the struct prog to represent the in-memory loaded
program. Do this by introducing a addrspace_32bit mem_region_device
that can have region_device operations performed on it. The
addrspace_32bit name was chosen to make it explicit that 32-bits
of address space is supported at the max.
Change-Id: Ifffa0ef301141de940e54581b5a7b6cd81311ead
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/program_loading.h | 34 ++++++++++++++++++----------------
src/lib/prog_loaders.c | 3 +++
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 05f5e3e..d8e7de3 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -34,11 +34,6 @@ enum {
* set on the last segment loaded. */
void arch_segment_loaded(uintptr_t start, size_t size, int flags);
-struct buffer_area {
- void *data;
- size_t size;
-};
-
enum prog_type {
PROG_VERSTAGE,
PROG_ROMSTAGE,
@@ -51,28 +46,27 @@ enum prog_type {
struct prog {
enum prog_type type;
const char *name;
- /* Source of program content to load. */
+ /* Source of program content to load. After loading program it
+ * represents the memory region of the stages and payload. For
+ * achitectures that use a bounce buffer then it would represent
+ * the bounce buffer. */
struct region_device rdev;
- /* The area can mean different things depending on what type the
- * program is. A stage after being loaded reflects the memory occupied
- * by the program, Since payloads are multi-segment one can't express
- * the memory layout with one range. Instead this field is updated
- * to reflect the bounce buffer used. */
- struct buffer_area area;
/* Entry to program with optional argument. It's up to the architecture
* to decide if argument is passed. */
void (*entry)(void *);
void *arg;
};
+/* Only valid for loaded programs. */
static inline size_t prog_size(const struct prog *prog)
{
- return prog->area.size;
+ return region_device_sz(&prog->rdev);
}
+/* Only valid for loaded programs. */
static inline void *prog_start(const struct prog *prog)
{
- return prog->area.data;
+ return rdev_mmap_full(&prog->rdev);
}
static inline void *prog_entry(const struct prog *prog)
@@ -85,10 +79,18 @@ static inline void *prog_entry_arg(const struct prog *prog)
return prog->arg;
}
+/* region_device representing the 32-bit flat address space. */
+extern const struct mem_region_device addrspace_32bit;
+
+static inline void prog_memory_init(struct prog *prog, uintptr_t ptr,
+ size_t size)
+{
+ rdev_chain(&prog->rdev, &addrspace_32bit.rdev, ptr, size);
+}
+
static inline void prog_set_area(struct prog *prog, void *start, size_t size)
{
- prog->area.data = start;
- prog->area.size = size;
+ prog_memory_init(prog, (uintptr_t)start, size);
}
static inline void prog_set_entry(struct prog *prog, void *e, void *arg)
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 44ddeaf..97bcbfe 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -35,6 +35,9 @@
#include <symbols.h>
#include <timestamp.h>
+/* Only can represent up to 1 byte less than size_t. */
+const struct mem_region_device addrspace_32bit = MEM_REGION_DEV_INIT(0, ~0UL);
+
#define DEFAULT_CBFS_LOADER_PRESENT \
(!ENV_VERSTAGE || (ENV_VERSTAGE && !CONFIG_RETURN_FROM_VERSTAGE))