Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14187
-gerrit
commit ebc3eae0220514c5cf0831bcf12c008f54e3bd99
Author: Huimin Zhang <thehobn(a)gmail.com>
Date: Wed Mar 30 00:54:16 2016 -0700
Reject duplicate results in board-status.
This is in response to issue #28: board-status should reject duplicate
uploads.
Change-Id: Iff99be154b35e8c0f9f05f9470d1c2dcff8510b8
Signed-off-by: Huimin Zhang <thehobn(a)gmail.com>
---
util/board_status/board_status.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 058a3d9..b315be1 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -333,6 +333,21 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
fi
cd "board-status"
+
+ echo "Checking for duplicate results"
+ # get any updates to board-status
+ git pull
+
+ echo "${tagged_version}" | grep dirty >/dev/null 2>&1
+ clean_version=$?
+ existing_results=$(git ls-files "${mainboard_dir}/${tagged_version}")
+
+ # reject duplicate results of non-dirty versions
+ if [ "${clean_version}" -eq 1 ] && [ -n "${existing_results}" ] ; then
+ echo "Result is a duplicate, aborting"
+ exit $EXIT_FAILURE
+ fi
+
echo "Copying results to $(pwd)/${results}"
# Note: Result directory should be unique due to the timestamp.
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14457
-gerrit
commit ff88bb944c9886a0babe47dd17911f21c0ae5c57
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Thu Apr 21 17:06:37 2016 -0500
board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all
test results equally regardless of age. As a test result ages it
becomes more likely that the board no longer works peroperly under
coreboot due to code churn.
Visually indicate board-test status "at a glance" by smoothly fading
the background color of the test result from green to yellow to red
as the test result ages. This patch sets the full red transition
to 256 days after test for programming convenience, however the
number of days required to fully "stale" a test result could be
modified relatively easily.
Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
util/board_status/to-wiki/towiki.sh | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 9cf8a3c..8a5c221 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-export COREBOOT_DIR="../coreboot"
+export COREBOOT_DIR="../coreboot.littlepatches"
export GIT_DIR="$COREBOOT_DIR/.git"
CODE_GITWEB="http://review.coreboot.org/gitweb?p=coreboot.git;a=commitdiff;h="
STATUS_GITWEB="http://review.coreboot.org/gitweb?p=board-status.git;a=blob;hb=HEAD;f="
@@ -412,7 +412,23 @@ EOF
if [ -z "$lastgood" ]; then
echo "| style=\"background:red\" | Unknown"
else
- echo "| style=\"background:lime\" | [[#$vendor/$board|$lastgood]]"
+ lastgood_ts=$(date -d "$lastgood" "+%s")
+ current_ts=$(date "+%s")
+ lastgood_diff=0
+ if [ $lastgood_ts -lt $current_ts ]; then
+ lastgood_diff=$(( $current_ts - $lastgood_ts ))
+ # Convert seconds to days
+ lastgood_diff=$(( $lastgood_diff / 86400 ))
+ # Set maximum age at 255 days for convenience of code
+ if [ $lastgood_diff -gt 255 ]; then
+ lastgood_diff=255
+ fi
+ fi
+ lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
+ green_component=$(( 255 - $lastgood_diff ))
+ green_component_hex=$(echo "obase=16; $green_component" | bc)
+ cell_bgcolor=$(echo "#${lastgood_diff_hex}${green_component_hex}00")
+ echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
fi
echo "| $northbridge_nice"
Leroy P Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14111
-gerrit
commit 0c3134e3ae7c7b7411f0e679964d046e92e37324
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Wed Mar 16 10:21:59 2016 -0700
coreboot_tables: Extend serial port description
Extend the serial port description to include the input clock frequency
and an identifier for the serial port.
Without the input frequency it is impossible for the payload to compute
the baud-rate divisor without making an assumption about the frequency.
This breaks down when the UART is able to support multiple input clock
frequencies.
Add an ID field that may specify the PCI vendor and device ID values
which are required for CorebootPayloadPkg to initialize PCI based UARTs.
A Kconfig value provides the default for this field to prevent breaking
existing coreboot implementations.
Testing on Galileo:
* Edit the src/mainboard/intel/galileo/Makefile.inc file:
* Add "select ADD_FSP_PDAT_FILE"
* Add "select ADD_FSP_RAW_BIN"
* Add "select ADD_RMU_FILE"
* Place the FSP.bin file in the location specified by CONFIG_FSP_FILE
* Place the pdat.bin files in the location specified by
CONFIG_FSP_PDAT_FILE
* Place the rmu.bin file in the location specified by CONFIG_RMU_FILE
* Build EDK2 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc to generate
UEFIPAYLOAD.fd
* Load the SPI driver stack
* Testing is successful when CorebootPayloadPkg is able to properly
initialize the serial port without using built-in values.
Change-Id: I05a7e864afcd930916658e3efed53ff2efd403ec
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
payloads/libpayload/include/coreboot_tables.h | 2 ++
src/commonlib/include/commonlib/coreboot_tables.h | 2 ++
src/drivers/uart/Kconfig | 7 +++++++
src/drivers/uart/oxpcie_early.c | 2 ++
src/drivers/uart/pl011.c | 8 ++++++++
src/drivers/uart/uart8250io.c | 6 ++++--
src/drivers/uart/uart8250mem.c | 5 ++++-
src/lib/coreboot_table.c | 2 ++
src/soc/intel/quark/Kconfig | 5 +++++
9 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 276f25f..06d1768 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -121,6 +121,8 @@ struct cb_serial {
u32 baseaddr;
u32 baud;
u32 regwidth;
+ u32 input_hertz;
+ u32 id;
};
#define CB_TAG_CONSOLE 0x00010
diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h
index 5c28791..3839028 100644
--- a/src/commonlib/include/commonlib/coreboot_tables.h
+++ b/src/commonlib/include/commonlib/coreboot_tables.h
@@ -173,6 +173,8 @@ struct lb_serial {
uint32_t baseaddr;
uint32_t baud;
uint32_t regwidth;
+ uint32_t input_hertz;
+ uint32_t id;
};
#define LB_TAG_CONSOLE 0x0010
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig
index f4ad011..25dc980 100644
--- a/src/drivers/uart/Kconfig
+++ b/src/drivers/uart/Kconfig
@@ -41,3 +41,10 @@ config DRIVERS_UART_PL011
bool
default n
select HAVE_UART_SPECIAL
+
+config UART_DEVICE_ID
+ hex
+ default 0
+ help
+ ID to help the payload identify the proper UART
+
diff --git a/src/drivers/uart/oxpcie_early.c b/src/drivers/uart/oxpcie_early.c
index eb91d31..479408b 100644
--- a/src/drivers/uart/oxpcie_early.c
+++ b/src/drivers/uart/oxpcie_early.c
@@ -92,6 +92,8 @@ void uart_fill_lb(void *data)
serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
serial.baud = default_baudrate();
serial.regwidth = 1;
+ serial.input_hertz = uart_platform_refclk();
+ serial.id = CONFIG_UART_DEVICE_ID;
lb_add_serial(&serial, data);
lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c
index aa55c68..cfd6f32 100644
--- a/src/drivers/uart/pl011.c
+++ b/src/drivers/uart/pl011.c
@@ -48,8 +48,16 @@ void uart_fill_lb(void *data)
serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
serial.baud = default_baudrate();
serial.regwidth = 1;
+ serial.input_hertz = uart_platform_refclk();
+ serial.id = CONFIG_UART_DEVICE_ID;
lb_add_serial(&serial, data);
lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
}
+
+__attribute__((weak)) unsigned int uart_platform_refclk(void)
+{
+ return 0; /* Unknown input frequency */
+}
+
#endif
diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c
index 63bc42f..683b7dd 100644
--- a/src/drivers/uart/uart8250io.c
+++ b/src/drivers/uart/uart8250io.c
@@ -30,8 +30,8 @@
/* Nominal values only, good for the range of choices Kconfig offers for
* set of standard baudrates.
*/
-#define BAUDRATE_REFCLK (115200)
-#define BAUDRATE_OVERSAMPLE (1)
+#define BAUDRATE_REFCLK (115200 * 16)
+#define BAUDRATE_OVERSAMPLE (16)
/* Expected character delay at 1200bps is 9ms for a working UART
* and no flow-control. Assume UART as stuck if shift register
@@ -139,6 +139,8 @@ void uart_fill_lb(void *data)
serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
serial.baud = default_baudrate();
serial.regwidth = 1;
+ serial.input_hertz = BAUDRATE_REFCLK;
+ serial.id = CONFIG_UART_DEVICE_ID;
lb_add_serial(&serial, data);
lb_add_console(LB_TAG_CONSOLE_SERIAL8250, data);
diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c
index 278ddb8..9c1f622 100644
--- a/src/drivers/uart/uart8250mem.c
+++ b/src/drivers/uart/uart8250mem.c
@@ -117,7 +117,8 @@ void uart_init(int idx)
return;
unsigned int div;
- div = uart_baudrate_divisor(default_baudrate(), uart_platform_refclk(), 16);
+ div = uart_baudrate_divisor(default_baudrate(),
+ uart_platform_refclk(), 16);
uart8250_mem_init(base, div);
}
@@ -156,6 +157,8 @@ void uart_fill_lb(void *data)
serial.regwidth = sizeof(uint32_t);
else
serial.regwidth = sizeof(uint8_t);
+ serial.input_hertz = uart_platform_refclk();
+ serial.id = CONFIG_UART_DEVICE_ID;
lb_add_serial(&serial, data);
lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index eeed65e..e4788a5 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -117,6 +117,8 @@ void lb_add_serial(struct lb_serial *new_serial, void *data)
serial->baseaddr = new_serial->baseaddr;
serial->baud = new_serial->baud;
serial->regwidth = new_serial->regwidth;
+ serial->input_hertz = new_serial->input_hertz;
+ serial->id = new_serial->id;
}
void lb_add_console(uint16_t consoletype, void *data)
diff --git a/src/soc/intel/quark/Kconfig b/src/soc/intel/quark/Kconfig
index aab509a..d71af30 100644
--- a/src/soc/intel/quark/Kconfig
+++ b/src/soc/intel/quark/Kconfig
@@ -59,6 +59,11 @@ config TTYS0_LCS
depends on ENABLE_BUILTIN_HSUART1
default 3
+config UART_DEVICE_ID
+ hex
+ depends on ENABLE_BUILTIN_HSUART1
+ default 0x09368086
+
#####
# Debug support
# The following options provide debug support for the Quark coreboot
the following patch was just integrated into master:
commit f790672f2daf36dd361e184ef01ebdd5950a609c
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Apr 6 16:32:37 2016 -0600
util/lint: Find unsigned variables with no length specified
The coding guidelines say that all objects should have fully
qualified types (unsigned int instead of unsigned).
This script finds violations of that rule.
Steps for the filter:
1) Find all lines in the coreboot tree that have the word 'unsigned'
followed by a space.
2) Exclude directories that aren't in the include list or
are specifically excluded.
3) Exclude files that aren't specifically included.
4) Filter out legimitate uses 'unsigned int' or 'unsigned long' for
example.
5) Filter out lines that begin with '/*' or '*'
Change-Id: I46213c6a168e6aafa29a50af814bf7e0fcd32eb6
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/14269
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/14269 for details.
-gerrit
the following patch was just integrated into master:
commit c0124282910cfebe24e4efdbac184e5fee522589
Author: Stef van Os <stef.van.os(a)prodrive-technologies.com>
Date: Wed Apr 20 15:22:00 2016 +0200
libpayload: time: split time.h from libpayload.h
Move time functions and prototypes from libpayload.h to time.h.
In a similar manner to other c libary headers, this change makes
porting existing applications to libpayload easier.
Change-Id: I71e27c6dddde6e77e0e9b4d7be7cd5298e03a648
Signed-off-by: Stef van Os <stef.van.os(a)prodrive-technologies.com>
Reviewed-on: https://review.coreboot.org/14437
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/14437 for details.
-gerrit
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14443
-gerrit
commit 26741639fcd50947676368a0e1311efa53c7c5b5
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Wed Apr 20 22:11:25 2016 -0700
fmaptool: Make sure strings are not destroyed on hdestroy()
On Mac OS X hdestroy seems to overwrite node->name. Hence
duplicate the string before stuffing it into the hash search
table.
Change-Id: Ieac2025f5c960cdb8d509dde7e92ba0dd32644b0
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
util/cbfstool/fmd.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/fmd.c b/util/cbfstool/fmd.c
index a11b7f0..afd8701 100644
--- a/util/cbfstool/fmd.c
+++ b/util/cbfstool/fmd.c
@@ -48,10 +48,23 @@
* @return Whether the node is valid
*/
static bool validate_descriptor_node(const struct flashmap_descriptor *node,
- struct unsigned_option start, struct unsigned_option end) {
+ struct unsigned_option start, struct unsigned_option end)
+{
assert(node);
+#if __GLIBC__
+ /* GLIBC is different than the BSD libc implementations:
+ * The hdestroy() [function does] not free the buffers pointed
+ * to by the key and data elements of the hash table entries.
+ * vs:
+ * The hdestroy() function calls free(3) for each comparison key in
+ * the search table but not the data item associated with the key.
+ */
ENTRY search_key = {node->name, NULL};
+#else
+ ENTRY search_key = {strdup(node->name), NULL};
+#endif
+
if (hsearch(search_key, FIND)) {
ERROR("Multiple sections with name '%s'\n", node->name);
return false;
the following patch was just integrated into master:
commit 3a6374c4541a92ec0c31e2290a26073e195102a8
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Apr 19 16:02:52 2016 -0600
lint: Add check for amd & apple mainboard license headers
Change-Id: Idda4b7179e3e7b3f5b70be810b428b0651c1cd67
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/14427
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/14427 for details.
-gerrit
the following patch was just integrated into master:
commit 12b641d3dfde1e24536d61060d6e4fe99cc8ae62
Author: Iru Cai <mytbk920423(a)gmail.com>
Date: Sat Apr 16 00:54:23 2016 +0800
coreinfo: Build libpayload in coreinfo directory
When building libpayload, make the build directory and .config outside
libpayload source directory so it'll not pollute the libpayload source
and cause conflicts with other builds.
Change-Id: Idcfbc7dbe4d52a3559229d8450c3efaafd33b93b
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
Reviewed-on: https://review.coreboot.org/14389
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14389 for details.
-gerrit