Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8009
-gerrit
commit d06de582a1c3710856c2178d4be60a548c523c2d
Author: Deepa Dinamani <deepad(a)codeaurora.org>
Date: Tue May 13 13:49:42 2014 -0700
soc/ipq806x : Add CONFIG_TTB_BUFFER for the soc.
Define a base address for page table entries. Place it 64KB below the
bootblock loading address.
BUG=chrome-os-partner:28467
TEST=verified that the page tables are being populated at this
address. Also observed that the SPI driver takes 900 ns to
process a byte as opposed to 1.5 us in case caching is not
enabled.
Original-Change-Id: I3d8bd3104c55389aa5768033642ebbf1fda0fec7
Original-Signed-off-by: Deepa Dinamani <deepad(a)codeaurora.org>
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/200332
(cherry picked from commit 483dbea46c7d4c8ea8dbaf11bc82990f4cffff8c)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Ifef78b9bd6938533bed415ec99fd75a8031a7068
---
src/soc/qualcomm/ipq806x/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/soc/qualcomm/ipq806x/Kconfig b/src/soc/qualcomm/ipq806x/Kconfig
index d6b00ba..fccb251 100644
--- a/src/soc/qualcomm/ipq806x/Kconfig
+++ b/src/soc/qualcomm/ipq806x/Kconfig
@@ -71,4 +71,8 @@ config CBFS_CACHE_SIZE
hex "size of CBFS cache data"
default 0x00016000
+config TTB_BUFFER
+ hex "memory address for page tables"
+ default 0x405f0000
+
endif
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8004
-gerrit
commit cd28a5861897325b5852de5cd2fc64210595d523
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Fri May 23 14:18:35 2014 -0700
ipq8064: work around for slow timer clock
Libpayload libc requires timer clock frequency to be at least 1MHz.
Ipq8064 code presently provides a single option of 32kHz. Pretend to
be running at 1 MHz without additional accuracy.
This is a hack which will be reverted as soon as the SOC is configured
to supply a faster running clock.
BUG=chrome-os-partner:27784, chrome-os-partner:28880
TEST=with other changes depthcharge boots to the CLI console
Original-Change-Id: I80ec6652bc5693a549668cd6e824e9cf5c26b182
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201342
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
(cherry picked from commit 466a59967b13986099106f8b44924648c1e6e6cd)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I113689191db70710e7a45ccd02d672f482343e35
---
payloads/libpayload/drivers/timer/ipq806x.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/payloads/libpayload/drivers/timer/ipq806x.c b/payloads/libpayload/drivers/timer/ipq806x.c
index 4edbf8e..0d70a86 100644
--- a/payloads/libpayload/drivers/timer/ipq806x.c
+++ b/payloads/libpayload/drivers/timer/ipq806x.c
@@ -29,13 +29,31 @@
#include <libpayload.h>
+/*
+ * TODO(vbendeb): reverted this hack once proper timer code is in place (see
+ * http://crosbug.com/p/28880 for details.
+ */
+#define MIN_TIMER_FREQ 1000000
+
uint64_t timer_hz(void)
{
- return CONFIG_LP_IPQ806X_TIMER_FREQ;
+ return (CONFIG_LP_IPQ806X_TIMER_FREQ >= MIN_TIMER_FREQ) ?
+ CONFIG_LP_IPQ806X_TIMER_FREQ : MIN_TIMER_FREQ;
}
uint64_t timer_raw_value(void)
{
- return readl((void *)CONFIG_LP_IPQ806X_TIMER_REG);
+ uint64_t rawv = readl((void *)CONFIG_LP_IPQ806X_TIMER_REG);
+
+ /*
+ * This is extremely crude, but it kicks in only for the case when the
+ * timer clock frequency is below 1MHz, which should never be the case
+ * on a properly configured system. The compiler will eliminate the
+ * check as long as config value exceeds 1MHz.
+ */
+ if (CONFIG_LP_IPQ806X_TIMER_FREQ < MIN_TIMER_FREQ)
+ rawv *= (MIN_TIMER_FREQ / CONFIG_LP_IPQ806X_TIMER_FREQ);
+
+ return rawv;
}
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8003
-gerrit
commit 1b9b270792a89ca72286da8721feb0e40c7eafce
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Fri May 23 14:37:10 2014 -0700
libpayload: Provide selfboot() external declaration in a common file
The earlier compilation warning fix (7e4aa17) incorrectly assumed that
selfboot() is a function defined in the cbfs driver. This is a
commonly available function, it should not come from cbfs.h.
BUG=none
TEST=the following build command succeeds:
rambi storm nyan_big
Original-Change-Id: I3ef49d849168ad9dc24589cbd9ce7382052345bd
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201386
(cherry picked from commit d5090e8410530f41b9fd33e2caa1d8aa25438105)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I8404fb52112b391982f954a6d06fe4b451dfcb8a
---
payloads/libpayload/include/cbfs.h | 3 ---
payloads/libpayload/include/libpayload.h | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/payloads/libpayload/include/cbfs.h b/payloads/libpayload/include/cbfs.h
index c5c811c..1b5c51a 100644
--- a/payloads/libpayload/include/cbfs.h
+++ b/payloads/libpayload/include/cbfs.h
@@ -81,9 +81,6 @@ void *cbfs_simple_buffer_unmap(struct cbfs_simple_buffer *buffer,
// Utility functions
int run_address(void *f);
-/* Defined in src/lib/selfboot.c */
-void selfboot(void *entry);
-
/* Defined in individual arch / board implementation. */
int init_default_cbfs_media(struct cbfs_media *media);
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 1d4d0da..9781c9e 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -60,9 +60,6 @@
#ifdef CONFIG_LP_LAR
#include <lar.h>
#endif
-#ifdef CONFIG_LP_CBFS
-#include <cbfs.h>
-#endif
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -445,4 +442,7 @@ char *readline(const char *prompt);
int getline(char *buffer, int len);
/** @} */
+/* Defined in arch/${ARCH}/selfboot.c */
+void selfboot(void *entry);
+
#endif
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8002
-gerrit
commit 0d1767c75ba0b8d30742f0f95c93082eaffeae16
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Wed May 21 16:28:57 2014 -0700
libpayload: ipq8064: Add rudimentary timer driver
This is still using the 32kHz timer coreboot uses. A finer granularity
timer implementation for 806x is in the works.
BUG=chrome-os-partner:27784,chrome-os-partner:28880
TEST=none yet.
Original-Change-Id: Iae206749000d45040090df48199c8d86d76bbae5
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/198021
Original-Reviewed-by: Furquan Shaikh <furquan(a)chromium.org>
(cherry picked from commit 8f49f752ab8f84b7c5dc189238732360e8d2aae2)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Ia150c974e5b66939de0b007cf7c1308c187f3289
---
payloads/libpayload/Config.in | 18 +++++++++++++
payloads/libpayload/drivers/Makefile.inc | 1 +
payloads/libpayload/drivers/timer/ipq806x.c | 41 +++++++++++++++++++++++++++++
3 files changed, 60 insertions(+)
diff --git a/payloads/libpayload/Config.in b/payloads/libpayload/Config.in
index bef0e05..3c5c342 100644
--- a/payloads/libpayload/Config.in
+++ b/payloads/libpayload/Config.in
@@ -354,6 +354,9 @@ config TIMER_MCT
config TIMER_TEGRA_1US
bool "Tegra 1us"
+config TIMER_IPQ806X
+ bool "Timer for ipq806x platforms"
+
endchoice
config TIMER_MCT_HZ
@@ -371,6 +374,21 @@ config TIMER_TEGRA_1US_ADDRESS
depends on TIMER_TEGRA_1US
default 0x60005010
+config IPQ806X_TIMER_FREQ
+ int "Hardware timer frequency"
+ default 32000
+ depends on TIMER_IPQ806X
+ help
+ IPQ hardware presently provides a single timer running at 32KHz, a
+ finer granulariry timer is available but is not yet enabled.
+
+config IPQ806X_TIMER_REG
+ hex "Timer register address"
+ default 0x0200A008
+ depends on TIMER_IPQ806X
+ help
+ Address of the register to read a free running timer value.
+
config USB
bool "USB Support"
default n
diff --git a/payloads/libpayload/drivers/Makefile.inc b/payloads/libpayload/drivers/Makefile.inc
index 7212389..d46bb11 100644
--- a/payloads/libpayload/drivers/Makefile.inc
+++ b/payloads/libpayload/drivers/Makefile.inc
@@ -48,6 +48,7 @@ libc-$(CONFIG_LP_NVRAM) += options.c
libc-$(CONFIG_LP_TIMER_MCT) += timer/mct.c
libc-$(CONFIG_LP_TIMER_RDTSC) += timer/rdtsc.c
libc-$(CONFIG_LP_TIMER_TEGRA_1US) += timer/tegra_1us.c
+libc-$(CONFIG_LP_TIMER_IPQ806X) += timer/ipq806x.c
# Video console drivers
libc-$(CONFIG_LP_VIDEO_CONSOLE) += video/video.c
diff --git a/payloads/libpayload/drivers/timer/ipq806x.c b/payloads/libpayload/drivers/timer/ipq806x.c
new file mode 100644
index 0000000..4edbf8e
--- /dev/null
+++ b/payloads/libpayload/drivers/timer/ipq806x.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the depthcharge project.
+ *
+ * Copyright (C) 2014 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <libpayload.h>
+
+uint64_t timer_hz(void)
+{
+ return CONFIG_LP_IPQ806X_TIMER_FREQ;
+}
+
+uint64_t timer_raw_value(void)
+{
+ return readl((void *)CONFIG_LP_IPQ806X_TIMER_REG);
+}
+
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7911
-gerrit
commit 88d947a8e5b28b3af3906d13d81514486ddfff8c
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Thu May 15 14:12:54 2014 -0700
bpayload: Do not tolerate compilation warnings when building
Make sure the build breaks in case of warnings.
BUG=none
TEST= All builds succeed with the restored patch and fail when a
compilation warning is thrown.
Original-Change-Id: I9bdcd8938f59913e4ba86df5e4921b3f821ef920
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/200110
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit 16dde875950d6806cc770cdbee4d3ff456ed6f02)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I86988f8d3f1acaa6ceeabdcbfa3cede1e67c28fe
---
payloads/libpayload/Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index ffe8371..dd83f88 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -57,7 +57,7 @@ CFLAGS = $(EXTRA_CFLAGS) $(INCLUDES) -Os -pipe -nostdinc -ggdb3
CFLAGS += -nostdlib -fno-builtin -ffreestanding -fomit-frame-pointer
CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
-CFLAGS += -Wstrict-aliasing -Wshadow
+CFLAGS += -Wstrict-aliasing -Wshadow -Werror
$(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER)
cmp $@ $< 2>/dev/null || cp $< $@