Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13413
-gerrit
commit 35846951a2cecb403fcdd9458a838c8da0e327c6
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 24 19:38:33 2016 -0700
build_system: Extend site-local
- Add a target at the end of the build that can be used to run additional
scripts or additional targets after coreboot.rom is built.
- Source a site-local Kconfig file to allow site-specific configuration.
This eliminates the need to add a hook for a script at the end of the
build because you can add one yourself in site-local.
Example site-local/Makefile.inc:
build_complete::
ifeq ($(CONFIG_SITE_LOCAL),y)
echo "Running additional steps in site-local"
# run some script here to make my build unreproducible.
endif
.phony: build_complete
Example site-local/Kconfig:
menu "site-local"
config SITE_LOCAL
bool "site-local enabled"
help
Enable my site-local configuration to do stuff.
endmenu
Change-Id: Id4d1e727c69b5cdb05e7d52731bbb1d1e201864a
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
Makefile.inc | 11 +++++++++--
src/Kconfig | 3 +++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 122b83a..a35e9db 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -46,12 +46,19 @@ export objgenerated := $(obj)/generated
#######################################################################
# root rule to resolve if in build mode (ie. configuration exists)
-real-target: $(obj)/config.h coreboot
+real-target: $(obj)/config.h coreboot build_complete
coreboot: build-dirs $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool
+build_complete:: coreboot
+ printf "\nBuilt %s (%s)\n" $(CONFIG_MAINBOARD_DIR) \
+ $(CONFIG_MAINBOARD_PART_NUMBER)
+ # This target can be used in site local to run scripts or additional
+ # targets after the build completes by creating a Makefile.inc in the
+ # site-local directory with a target named 'build_complete::'
+
#######################################################################
# our phony targets
-PHONY+= clean-abuild coreboot lint lint-stable build-dirs
+PHONY+= clean-abuild coreboot lint lint-stable build-dirs build_complete
#######################################################################
# root source directories of coreboot
diff --git a/src/Kconfig b/src/Kconfig
index 4df037b..3f02843 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -407,6 +407,9 @@ config FMDFILE
endmenu
+# load site-local kconfig to allow user specific defaults and overrides
+source "site-local/Kconfig"
+
config SYSTEM_TYPE_LAPTOP
default n
bool
the following patch was just integrated into master:
commit b00ddecd993c4d327628a7327015cb90d80d1dbb
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 10:39:47 2016 -0700
Kconfig: indent with tabs, not spaces.
Change-Id: I8996f8ab739a07014a4189738b5624485d752d9d
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/13540
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/13540 for details.
-gerrit
the following patch was just integrated into master:
commit 1010868f87db1e449a13833be4991cef9cf8b0fc
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 10:37:22 2016 -0700
src/: Fix Kcofig symbols missing CONFIG_ prefix
- Add CONFIG_ prefix to two symbols.
- Remove the use of the third symbol as it will never be matched.
Change-Id: Ifa7f6884001cb05fb8397f193c4b08a0161f498c
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/13539
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/13539 for details.
-gerrit
the following patch was just integrated into master:
commit 9ab9c33d7d97ebe1d8e5d25eb4b646f310b5f188
Author: Jean Lucas <jean(a)4ray.co>
Date: Sat Jan 30 01:20:54 2016 -0500
lib/gcov-glue.c: Remove trailing number from COVERAGE_MAGIC macro
The COVERAGE_MAGIC macro has a trailing `4' on it, which makes it a
64-bit large integer, as opposed to a 32-bit unsigned integer, as
originally designated in `util/cbmem/cbmem.c'. Remove this number so
building with CODE_COVERAGE will succeed.
Change-Id: Ib5d7f2704a4c092c3eca6f62e219edb30950d793
Signed-off-by: Jean Lucas <jean(a)4ray.co>
Reviewed-on: https://review.coreboot.org/13520
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/13520 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/13554
-gerrit
commit a444dea14fa0a5900aee3b876c9ee49a71a48e89
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Mon Feb 1 16:36:07 2016 -0800
soc/intel/broadwell: Fix UART compilation
Change-Id: I7fe356041c6ac69a30e0e87d9a8649abef6996b7
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/soc/intel/broadwell/Makefile.inc | 3 +++
src/soc/intel/broadwell/romstage/uart.c | 11 ++++++----
src/soc/intel/broadwell/serialio.c | 16 +-------------
src/soc/intel/broadwell/uart_debug.c | 37 +++++++++++++++++++++++++++++++++
4 files changed, 48 insertions(+), 19 deletions(-)
diff --git a/src/soc/intel/broadwell/Makefile.inc b/src/soc/intel/broadwell/Makefile.inc
index 4da8c20..4159b96 100644
--- a/src/soc/intel/broadwell/Makefile.inc
+++ b/src/soc/intel/broadwell/Makefile.inc
@@ -65,6 +65,9 @@ ramstage-$(CONFIG_USBDEBUG) += usb_debug.c
ramstage-y += ehci.c
ramstage-y += xhci.c
smm-y += xhci.c
+romstage-y += uart_debug.c
+ramstage-y += uart_debug.c
+smm-y += uart_debug.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
diff --git a/src/soc/intel/broadwell/romstage/uart.c b/src/soc/intel/broadwell/romstage/uart.c
index 1ea7cc2..732f7d7 100644
--- a/src/soc/intel/broadwell/romstage/uart.c
+++ b/src/soc/intel/broadwell/romstage/uart.c
@@ -19,11 +19,14 @@
#include <device/pci_def.h>
#include <reg_script.h>
#include <stdint.h>
-#include <uart8250.h>
+#include <drivers/uart/uart8250reg.h>
+#include <drivers/uart/uart8250mem.h>
#include <soc/iobp.h>
#include <soc/serialio.h>
+#include <soc/pci_devs.h>
+#include <soc/romstage.h>
-const struct reg_script uart_init[] = {
+const struct reg_script uart_init_script[] = {
/* Set MMIO BAR */
REG_PCI_WRITE32(PCI_BASE_ADDRESS_0, CONFIG_TTYS0_BASE),
/* Enable Memory access and Bus Master */
@@ -71,11 +74,11 @@ void pch_uart_init(void)
pch_iobp_update(0xcb000180, ~0x0000003f, 0x0000003f);
/* Initialize chipset uart interface */
- reg_script_run_on_dev(dev, uart_init);
+ reg_script_run_on_dev(dev, uart_init_script);
/*
* Perform standard UART initialization
* Divisor 1 is 115200 BAUD
*/
- uart8250_mem_init(CONFIG_TTYS0_BASE, 1);
+ uart8250_mem_init((void *)CONFIG_TTYS0_BASE, 1);
}
diff --git a/src/soc/intel/broadwell/serialio.c b/src/soc/intel/broadwell/serialio.c
index a73312c..83f6784 100644
--- a/src/soc/intel/broadwell/serialio.c
+++ b/src/soc/intel/broadwell/serialio.c
@@ -273,23 +273,9 @@ static void serialio_init(struct device *dev)
}
}
-static void serialio_set_resources(struct device *dev)
-{
- pci_dev_set_resources(dev);
-
-#if CONFIG_INTEL_PCH_UART_CONSOLE
- /* Update UART base address if used for debug */
- if (serialio_uart_is_debug(dev)) {
- struct resource *res = find_resource(dev, PCI_BASE_ADDRESS_0);
- if (res)
- uartmem_setbaseaddr(res->base);
- }
-#endif
-}
-
static struct device_operations device_ops = {
.read_resources = &pci_dev_read_resources,
- .set_resources = &serialio_set_resources,
+ .set_resources = &pci_dev_set_resources,
.enable_resources = &pci_dev_enable_resources,
.init = &serialio_init,
.ops_pci = &broadwell_pci_ops,
diff --git a/src/soc/intel/broadwell/uart_debug.c b/src/soc/intel/broadwell/uart_debug.c
new file mode 100644
index 0000000..50afc75
--- /dev/null
+++ b/src/soc/intel/broadwell/uart_debug.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 Google Inc.
+ *
+ * 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
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <stddef.h>
+#include <console/uart.h>
+#include <soc/iomap.h>
+#include <soc/serialio.h>
+
+unsigned int uart_platform_refclk(void)
+{
+ /*
+ * Set M and N divisor inputs and enable clock.
+ * Main reference frequency to UART is:
+ * 120MHz * M / N = 120MHz * 48 / 3125 = 1843200Hz
+ * The different order below is to handle integer math overflow.
+ */
+ return 120 * MHz / SIO_REG_PPR_CLOCK_N_DIV * SIO_REG_PPR_CLOCK_M_DIV;
+}
+
+uintptr_t uart_platform_base(int idx)
+{
+ /* Same base address for all debug port usage. In reality UART2
+ * is currently only supported. */
+ return CONFIG_TTYS0_BASE;
+}
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13553
-gerrit
commit ccc2dbc8c8b1013e3a4b7e7b7e2b99f75a2c46c0
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Mon Feb 1 16:30:56 2016 -0800
drivers/uart: Export uart8250_mem_init from uart8250mem.c
uart8250_mem_init() is used by the broadwell uart driver but
is not exported.
Change-Id: Ibc5b5c43475bf59d0d54cba2afd9362e75fa360c
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/drivers/uart/uart8250mem.c | 3 ++-
src/drivers/uart/uart8250mem.h | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c
index 278ddb8..036864b 100644
--- a/src/drivers/uart/uart8250mem.c
+++ b/src/drivers/uart/uart8250mem.c
@@ -22,6 +22,7 @@
#include <rules.h>
#include <stdint.h>
#include "uart8250reg.h"
+#include "uart8250mem.h"
/* Should support 8250, 16450, 16550, 16550A type UARTs */
@@ -90,7 +91,7 @@ static unsigned char uart8250_mem_rx_byte(void *base)
return 0x0;
}
-static void uart8250_mem_init(void *base, unsigned divisor)
+void uart8250_mem_init(void *base, unsigned divisor)
{
/* Disable interrupts */
uart8250_write(base, UART8250_IER, 0x0);
diff --git a/src/drivers/uart/uart8250mem.h b/src/drivers/uart/uart8250mem.h
new file mode 100644
index 0000000..98629e4
--- /dev/null
+++ b/src/drivers/uart/uart8250mem.h
@@ -0,0 +1,16 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google Inc.
+ *
+ * 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
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+void uart8250_mem_init(void *base, unsigned divisor);
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13552
-gerrit
commit e369c74cff35bdc583a4c6b4efe32136c4d3bbf6
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Feb 1 17:33:37 2016 -0700
xcompile: Add a way to specify -march=i586
Instead of instructing users to edit xcompile when they want to build
a quark platform, give the build a way to set -march=586 so that
the quark code will build correctly. The Quark processor does not
support the instructions introduced with the Pentium 6 architecture.
Change-Id: I0ed69aadc515f86f76800180e0e33bcd75feac5a
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/arch/x86/Kconfig | 6 ++++++
util/xcompile/xcompile | 27 ++++++++++++++++++++++-----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 738e7d1..49f940a 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -58,6 +58,12 @@ config ARCH_RAMSTAGE_X86_64
bool
default n
+config USE_MARCH_586
+ def_bool n
+ help
+ Allow a platform or processor to select to be compiled using
+ the '-march=i586' option instead of the typical '-march=i686'
+
# This is an SMP option. It relates to starting up APs.
# It is usually set in mainboard/*/Kconfig.
# TODO: Improve description.
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 1765183..79c8a4c 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -182,11 +182,6 @@ detect_special_flags() {
case "$architecture" in
x86)
- # Always build for i686 -- no sse/mmx instructions since SMM
- # modules are compiled using these flags. Note that this
- # doesn't prevent a project using xcompile to explicitly
- # specify -mmsse, etc flags.
- CFLAGS_GCC="$CFLAGS_GCC -march=i686"
;;
x64)
;;
@@ -224,6 +219,27 @@ GCC_CC_${TARCH}:=${GCC}
GCC_CFLAGS_${TARCH}:=${CFLAGS_GCC}
GCC_COMPILER_RT_${TARCH}:=${CC_RT_GCC}
GCC_COMPILER_RT_FLAGS_${TARCH}:=${CC_RT_EXTRA_GCC}
+EOF
+
+# Generally the x86 should build for i686 -- no sse/mmx
+# instructions since SMM modules are compiled using these
+# flags. Note that this doesn't prevent a project using
+# xcompile to explicitly specify -mmsse, etc flags.
+# The Quark processor doesn't support the instructions
+# introduced with the Pentium 6 architecture, so allow it
+# to use i586 instead.
+if [ "${TARCH}" = "x86_64" ] || [ "${TARCH}" = "x86_32" ]; then
+cat <<EOF
+
+ifeq (\$(CONFIG_USE_MARCH_586),y)
+ GCC_CFLAGS_${TARCH} += -march=i586
+else
+ GCC_CFLAGS_${TARCH} += -march=i686
+endif
+EOF
+fi
+
+cat <<EOF
# Clang
CLANG_CC_${TARCH}:=${CLANG}
@@ -245,6 +261,7 @@ else
COMPILER_RT_${TARCH}:=\$(CLANG_COMPILER_RT_${TARCH})
COMPILER_RT_FLAGS_${TARCH}:=\$(CLANG_COMPILER_RT_FLAGS_${TARCH})
endif
+
CPP_${TARCH}:=${GCCPREFIX}cpp
AS_${TARCH}:=${GCCPREFIX}as ${ASFLAGS}
LD_${TARCH}:=${GCCPREFIX}ld${LINKER_SUFFIX} ${LDFLAGS}
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13551
-gerrit
commit 63c562b475521e1a0a5e5476bc04b5246a1e29e7
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Mon Feb 1 16:26:04 2016 -0800
lib/gcov-glue.c: Fix COVERAGE_MAGIC definition
In I52e9fa414fbbe2012bc6d00312db528efba3e564 coverage
support was broken by changing the magic value used for
coverage entries. Change the magic value back to the
expected 32bit value (will also fix compilation with
code coverage enabled)
Change-Id: I43543e42f387a2d21dcf0220c9cca6312dbc643f
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/lib/gcov-glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c
index 4e5a9e1..0e45247 100644
--- a/src/lib/gcov-glue.c
+++ b/src/lib/gcov-glue.c
@@ -34,7 +34,7 @@ typedef struct file {
#define COVERAGE_SIZE (32*1024)
-#define COVERAGE_MAGIC 0x584d41534
+#define COVERAGE_MAGIC 0x584d4153
static FILE *current_file = NULL;
static FILE *previous_file = NULL;
the following patch was just integrated into master:
commit 21724934d5b498f76bbe309584f4321e6f719fac
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Tue Nov 24 14:12:04 2015 -0600
cpu/amd/fam10h-15h: Add workaround for AMD Erratum 600
Change-Id: Ie175b5b490f77cc380536ebd737da8618d4b448b
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/13170
Tested-by: build bot (Jenkins)
Reviewed-by: Felix Held <felix-coreboot(a)felixheld.de>
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
See https://review.coreboot.org/13170 for details.
-gerrit