the following patch was just integrated into master:
commit a765090f0d2f77cb099a60c23da8acaff62cb171
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Wed Dec 28 11:43:10 2016 -0800
soc/intel/quark: Add early debugging code
Add Kconfig values and early debugging code to better segment and debug
the early code in bootblock by using the SD LED as an indicator. Update
the help text for the debug Kconfig values to point to the various
failure locations.
TEST=Build and run on Galileo Gen2
Change-Id: I1cd62eba3e9547cb1dd7f547aaec5d4827e14633
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
Reviewed-on: https://review.coreboot.org/17985
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/17985 for details.
-gerrit
the following patch was just integrated into master:
commit 73f6a282a191c39d8f5e72e6cd2ce172821cdef4
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Wed Dec 28 12:53:37 2016 -0800
soc/intel/quark: Fix serial port configuration
Fix serial port configuration broken by how PCI configuration space was
referenced introduced by change 3d15e10a (MMCONF_SUPPORT: Flip default
to enabled).
TEST=Build and run on Galileo Gen2
Change-Id: I2ab52cf598795e94f1f16977f8d12b7fdd95e146
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
Reviewed-on: https://review.coreboot.org/17984
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/17984 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18008
-gerrit
commit 468e977404f63dc117f2e5f46d2eb77c8d377c38
Author: Hung-Te Lin <hungte(a)chromium.org>
Date: Thu Dec 29 20:59:37 2016 +0800
vboot: Clear battery cutoff flags when vbnv_cmos loads backup VBNV.
When CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH is set, vbnv_cmos will try
to load VBNV from flash if the VBNV in CMOS is invalid. This is usually
correct, except the case of battery cut-off.
CMOS will always be invalid after battery cut-off if there is no RTC
battery (or if that is dead). However, in current implementation the
backup in flash is only updated in coreboot, while the real battery
cutoff (and the clearing of cutoff flags in VBNV) is done in payload
(Depthcharge) stage. This will create an endless reboot loop that:
1. crossystem sets battery cutoff flag in VBNV_CMOS then reboot.
2. coreboot backs-up VBNV_CMOS to VBNV_flash.
3. Depthcharge sees cutoff flag in VBNV_CMOS.
4. Depthcharge clears cutoff flag in VBNV_CMOS.
5. Depthcharge performs battery cutoff (CMOS data is lost).
6. (Plug AC adapter) Reboot.
7. Coreboot sees invalid VBNV_CMOS, load backup from VBNV_flash.
8. Jump to 3.
As a result, we should always clear battery cutoff flags when loading
backups from VBNV_flash.
BRANCH=glados,reef
BUG=chrome-os-partner:61365,chrome-os-partner:59615
TEST=emerge-reef coreboot bootimage;
Change-Id: I3250a3a179a7b0de9c6e401e4a94dcd23920e473
Signed-off-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/423460
Reviewed-by: Duncan Laurie <dlaurie(a)google.com>
---
src/vboot/vbnv.c | 6 ++++++
src/vboot/vbnv.h | 1 +
src/vboot/vbnv_cmos.c | 17 +++++++++++++++++
src/vboot/vbnv_layout.h | 3 +++
4 files changed, 27 insertions(+)
diff --git a/src/vboot/vbnv.c b/src/vboot/vbnv.c
index ce64928..6537bf0 100644
--- a/src/vboot/vbnv.c
+++ b/src/vboot/vbnv.c
@@ -79,6 +79,12 @@ int verify_vbnv(uint8_t *vbnv_copy)
(crc8_vbnv(vbnv_copy, CRC_OFFSET) == vbnv_copy[CRC_OFFSET]);
}
+/* Re-generate VBNV checksum. */
+void regen_vbnv_crc(uint8_t *vbnv_copy)
+{
+ vbnv_copy[CRC_OFFSET] = crc8_vbnv(vbnv_copy, CRC_OFFSET);
+}
+
/*
* Read VBNV data from configured storage backend.
* If VBNV verification fails, reset the vbnv copy.
diff --git a/src/vboot/vbnv.h b/src/vboot/vbnv.h
index 78ca8f6..30da6a5 100644
--- a/src/vboot/vbnv.h
+++ b/src/vboot/vbnv.h
@@ -22,6 +22,7 @@
void read_vbnv(uint8_t *vbnv_copy);
void save_vbnv(const uint8_t *vbnv_copy);
int verify_vbnv(uint8_t *vbnv_copy);
+void regen_vbnv_crc(uint8_t *vbnv_copy);
int get_recovery_mode_from_vbnv(void);
void set_recovery_mode_into_vbnv(int recovery_reason);
int vboot_wants_oprom(void);
diff --git a/src/vboot/vbnv_cmos.c b/src/vboot/vbnv_cmos.c
index 5eda8e6..b7ef3e7 100644
--- a/src/vboot/vbnv_cmos.c
+++ b/src/vboot/vbnv_cmos.c
@@ -20,6 +20,22 @@
#include <vboot/vbnv.h>
#include <vboot/vbnv_layout.h>
+static void clear_vbnv_battery_cutoff_flag(uint8_t *vbnv_copy)
+{
+ /*
+ * Currently battery cutoff is done in payload stage, which does not
+ * update backup VBNV. And doing battery cutoff will invalidate CMOS.
+ * This means for every reboot after cutoff, read_vbnv_cmos will reload
+ * backup VBNV and try to cutoff again, causing endless reboot loop.
+ * So we should always clear battery cutoff flag from loaded backup.
+ */
+ if (vbnv_copy[MISC_FLAGS_OFFSET] & MISC_FLAGS_BATTERY_CUTOFF_MASK) {
+ printk(BIOS_INFO, "VBNV: Remove battery cut-off request.\n");
+ vbnv_copy[MISC_FLAGS_OFFSET] &= ~MISC_FLAGS_BATTERY_CUTOFF_MASK;
+ regen_vbnv_crc(vbnv_copy);
+ }
+}
+
void read_vbnv_cmos(uint8_t *vbnv_copy)
{
int i;
@@ -35,6 +51,7 @@ void read_vbnv_cmos(uint8_t *vbnv_copy)
read_vbnv_flash(vbnv_copy);
if (verify_vbnv(vbnv_copy)) {
+ clear_vbnv_battery_cutoff_flag(vbnv_copy);
save_vbnv_cmos(vbnv_copy);
printk(BIOS_INFO, "VBNV: Flash backup restored\n");
} else {
diff --git a/src/vboot/vbnv_layout.h b/src/vboot/vbnv_layout.h
index 59acd0c..1dc01c9 100644
--- a/src/vboot/vbnv_layout.h
+++ b/src/vboot/vbnv_layout.h
@@ -41,6 +41,9 @@
#define DEV_BOOT_USB_MASK 0x01
#define DEV_BOOT_SIGNED_ONLY_MASK 0x02
+#define MISC_FLAGS_OFFSET 8
+#define MISC_FLAGS_BATTERY_CUTOFF_MASK 0x08
+
#define KERNEL_FIELD_OFFSET 11
#define CRC_OFFSET 15
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17891
-gerrit
commit 68b6114683699cb090239e79a2f5564475bf6cd9
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Dec 14 10:20:53 2016 -0700
util/abuild: List boolean Kconfig options only tested at one setting
To get a better idea of what Kconfig options aren't being tested, this
will generate a list of which boolean symbols are always getting tested
in either the enabled or disabled state.
Save all Kconfig options, then build lists of all boolean options tested
in the enabled and disabled states. Finally, compare the lists and
generates a file containing all options that were tested only in one of
the states.
Change-Id: Id408785516e47d4c32ddedb268b8ad1601fcaa03
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/abuild/abuild | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 93ceac5..c21b54f 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -271,6 +271,7 @@ function update_config
yes "" 2>/dev/null | $MAKE oldconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \
CONFIG_OK=$?
if [ $CONFIG_OK -eq 0 ]; then
+ cat "$build_dir/auto.conf" >> "$ALLCONFIGS"
$MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &>> "${build_dir}/config.log"
return $?
else
@@ -701,6 +702,7 @@ if [ "$customizing" = "" ]; then
customizing="default configuration"
fi
+ALLCONFIGS="$TARGET/all_configs.txt"
FAILED_BOARDS="$TOP/$TARGET/failed_boards"
if [ "$recursive" = "false" ]; then
@@ -827,6 +829,12 @@ fi
junit '</testsuite>'
if [ "$recursive" = "false" ]; then
+ # Generate a file to show what configs have been tested.
+ grep '^CONFIG_.*=y$' "$ALLCONFIGS" | sed 's/=.*//' | sort | uniq > "$TARGET/enabled_opts.txt"
+ grep '^# CONFIG_.* is not set$' "$ALLCONFIGS" | sed 's/# //' | sed 's/ .*//' | sort | uniq > "$TARGET/disabled_opts.txt"
+
+ # Untabbed options are only tested enabled, tabbed options are only tested disabled.
+ comm "$TARGET/enabled_opts.txt" "$TARGET/disabled_opts.txt" -3 > "$TARGET/untested_opts.txt"
# Print the list of failed boards
if [ -f "$FAILED_BOARDS" ]; then
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17890
-gerrit
commit 579b13006c88133f8268dccb6ddc2c5897efffe3
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Dec 14 10:16:26 2016 -0700
util/abuild: Print list of failed boards at the end of the abuild
When running abuild outside of jenkins, because all of the builds are
printed intermixed, it's easy to miss when a board has failed the build
by looking at the output. This saves a list of failed builds and prints
the list at the end of the run.
- Add a command line option to mark when abuild is being called
recursively.
- Add all failed builds to a list.
- Print the list when a non-recursive abuild run exits.
Change-Id: Icb40ed8083a57bbcde49297d2b0814f98dcbb6c8
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/abuild/abuild | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 7c4e29f..93ceac5 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -79,6 +79,9 @@ quiet=false
# clang mode enabled by -sb option.
scanbuild=false
+# Mark whether abuild was called recursively
+recursive=false
+
trap interrupt INT
function interrupt
@@ -359,6 +362,7 @@ function compile_target
printf "failed\n" > compile.status
printf "%s build FAILED after %ss!\nLog excerpt:\n" "$BUILD_NAME" "${duration}"
tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log
+ echo "$BUILD_NAME" >> "$FAILED_BOARDS"
failed=1
fi
cd "$CURR" || return $?
@@ -424,6 +428,7 @@ function build_config
tail -n $CONTEXT "$build_dir/config.log" 2> /dev/null || tail -$CONTEXT "$build_dir/config.log"
junit "</testcase>"
+ echo "$BUILD_NAME" >> "$FAILED_BOARDS"
return
fi
@@ -585,12 +590,12 @@ getoptbrand="$(getopt -V)"
# shellcheck disable=SC2086
if [ "${getoptbrand:0:6}" == "getopt" ]; then
# Detected GNU getopt that supports long options.
- args=$(getopt -l version,verbose,quiet,help,all,target:,payloads:,cpus:,silent,junit,config,loglevel:,remove,prefix:,update,scan-build,ccache,blobs,clang,clean,outdir:,chromeos,xmlfile:,kconfig:,dir:,root: -o Vvqhat:p:c:sJCl:rP:uyBLzo:xX:K:d:R: -- "$@") || exit 1
+ args=$(getopt -l version,verbose,quiet,help,all,target:,payloads:,cpus:,silent,junit,config,loglevel:,remove,prefix:,update,scan-build,ccache,blobs,clang,clean,outdir:,chromeos,xmlfile:,kconfig:,dir:,root:,recursive -o Vvqhat:p:c:sJCl:rP:uyBLzo:xX:K:d:R:I -- "$@") || exit 1
eval set -- $args
retval=$?
else
# Detected non-GNU getopt
- args=$(getopt Vvqhat:p:c:sJCl:rP:uyBLzo:xX:K:d:R: "$@")
+ args=$(getopt Vvqhat:p:c:sJCl:rP:uyBLzo:xX:K:d:R:I "$@")
set -- $args
retval=$?
fi
@@ -671,6 +676,7 @@ while true ; do
configoptions="${configoptions}CONFIG_CHROMEOS=y\n"
;;
-X|--xmlfile) shift; XMLFILE=$1; REAL_XMLFILE=$1; shift;;
+ -I|--recursive) shift; recursive=true;;
-K|--kconfig) shift
testclass="$(basename "$1" | tr '.' '_' )"
customizing="${customizing}, $1 config"
@@ -695,6 +701,12 @@ if [ "$customizing" = "" ]; then
customizing="default configuration"
fi
+FAILED_BOARDS="$TOP/$TARGET/failed_boards"
+
+if [ "$recursive" = "false" ]; then
+ rm -f "$FAILED_BOARDS"
+fi
+
USE_XARGS=0
if [ "$cpus" != "1" ]; then
# Limit to 32 parallel builds for now.
@@ -770,7 +782,7 @@ build_targets()
fi
rm -rf "$TARGET/temp" "$TMPCFG"
# shellcheck disable=SC2086
- echo $targets | xargs -P ${cpus:-0} -n 1 "$0" $cmdline -t
+ echo $targets | xargs -P ${cpus:-0} -n 1 "$0" $cmdline -I -t
}
fi
@@ -814,4 +826,15 @@ else
fi
junit '</testsuite>'
+if [ "$recursive" = "false" ]; then
+
+ # Print the list of failed boards
+ if [ -f "$FAILED_BOARDS" ]; then
+ printf "%s build(s) failed:\n" "$( wc -l < "$FAILED_BOARDS" )"
+ cat "$FAILED_BOARDS"
+ else
+ echo "All tested boards passed."
+ fi
+fi
+
exit $failed
the following patch was just integrated into master:
commit 14b9b9380a4649a1ec4440f625e34cb25c87df6f
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Nov 30 16:38:25 2016 -0700
util/abuild: Don't set XGCCPATH if it's in the environment
Change-Id: I0fa231ca3d33300a671810e994c5be54ac10a18b
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/17723
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/17723 for details.
-gerrit
the following patch was just integrated into master:
commit 87fff20356466887d5e879ded540862087e09580
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Fri Dec 30 18:52:53 2016 +0100
mb/asus/p5gc-mx: Remove extra BSEL strap check
This extra check is based on comparing CPU BSEL pins and reports in
MCH configuration. This gives false positives in the case of 1333MHz
CPUs which automatically get downgraded to 1067MHz by the northbridge
(max supported frequency by 945gc).
TESTED with Intel Xeon 5460 (does not boot but completes raminit)
Change-Id: I34cb37912906c803abdad0adbd9c589ca86a67c7
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17997
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/17997 for details.
-gerrit
the following patch was just integrated into master:
commit de47fc3317ce34abd91cc2be11827c96ae9bc1f8
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Fri Dec 30 17:52:36 2016 +0100
mb/intel/d945gclf: Fix resume from S3 suspend
Checking for dram self refresh in MCHBAR8(SLFRCS) generates false positives.
Change-Id: I25afd565cae0269616e38ecbcdf385281bae5d1f
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17996
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/17996 for details.
-gerrit