Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10173
-gerrit
commit 14dab9ae7464b6022533e678c227f11b78967df4
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed Mar 18 11:27:25 2015 -0700
cache: Add arch_program_segment_loaded call to arm and arm64
arch_program_segment_loaded ensures that the program segment loaded is
synced back from the cache to PoC. dcache_flush_all on arm64 does not
guarantee PoC in case of MP systems. Thus, it is important to track
and sync back all the required segments using
arch_program_segment_loaded. Use this function in rmodules as well
instead of cache_sync_instructions which guarantees sync upto PoC.
BUG=chrome-os-partner:37546
BRANCH=None
TEST=Boots into depthcharge on foster
Change-Id: I64c2dd5e40ea59fa31f300174ca0d0aebcf8041d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 35ba0b882b86ff2c29ac766e1d65f403c8346247
Original-Change-Id: I964aa09f0cafdaab170606cd4b8f2e027698aee7
Original-Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/260908
Original-Reviewed-by: Furquan Shaikh <furquan(a)chromium.org>
Original-Tested-by: Furquan Shaikh <furquan(a)chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan(a)chromium.org>
Original-Trybot-Ready: Furquan Shaikh <furquan(a)chromium.org>
---
src/arch/arm/armv7/cache.c | 10 ++++++++++
src/arch/arm64/armv8/cache.c | 12 ++++++++++++
2 files changed, 22 insertions(+)
diff --git a/src/arch/arm/armv7/cache.c b/src/arch/arm/armv7/cache.c
index 1f762b8..eea514b 100644
--- a/src/arch/arm/armv7/cache.c
+++ b/src/arch/arm/armv7/cache.c
@@ -34,6 +34,7 @@
#include <stdint.h>
#include <arch/cache.h>
+#include <program_loading.h>
void tlb_invalidate_all(void)
{
@@ -155,3 +156,12 @@ void cache_sync_instructions(void)
dsb();
isb();
}
+
+/*
+ * For each segment of a program loaded this function is called
+ * to invalidate caches for the addresses of the loaded segment
+ */
+void arch_segment_loaded(uintptr_t start, size_t size, int flags)
+{
+ cache_sync_instructions();
+}
diff --git a/src/arch/arm64/armv8/cache.c b/src/arch/arm64/armv8/cache.c
index db9b388..95f2890 100644
--- a/src/arch/arm64/armv8/cache.c
+++ b/src/arch/arm64/armv8/cache.c
@@ -36,6 +36,7 @@
#include <arch/cache.h>
#include <arch/cache_helpers.h>
#include <arch/lib_helpers.h>
+#include <program_loading.h>
void tlb_invalidate_all(void)
{
@@ -147,3 +148,14 @@ void cache_sync_instructions(void)
flush_dcache_all(DCCISW); /* includes trailing DSB (in assembly) */
icache_invalidate_all(); /* includdes leading DSB and trailing ISB. */
}
+
+
+/*
+ * For each segment of a program loaded this function is called
+ * to invalidate caches for the addresses of the loaded segment
+ */
+void arch_segment_loaded(uintptr_t start, size_t size, int flags)
+{
+ dcache_clean_invalidate_by_mva((void *)start, size);
+ icache_invalidate_all();
+}
the following patch was just integrated into master:
commit 9bb90cd1a2d79146c0f4928ec88fd3b7fa3c7f60
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu May 7 12:30:06 2015 +0200
secmon: Add some missing files
secmon is referring to uart's default_baudrate() and
various coreboot version strings.
Change-Id: I40a8d1979146058409a814d94ea24de83ee4d634
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10129
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/10129 for details.
-gerrit
the following patch was just integrated into master:
commit c96ff45b7fcc16ff65836f0ed1d2780e9fd3b5ef
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu May 7 12:29:13 2015 +0200
nvidia/tegra132: we write tables in ramstage
So that's more precise than "anything non-pre-ram".
Change-Id: I21db536a5ea704c4b087f57d0b761dd3fdf43e3e
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10128
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/10128 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10172
-gerrit
commit 27bd9f450709bf256e6fdbb84ab8ec1e359b9c52
Author: Joseph Lo <josephl(a)nvidia.com>
Date: Wed Apr 29 17:14:03 2015 +0800
drivers/gic: reprogram the GIC CPU interface to bypass IRQ
GICv2 provides a wake IRQ/FIQ (for wake-event purpose), which are not
disabled by GIC CPU interface. This is done by adding a bypass override
capability when the interrupts are disabled at the CPU interface. To
support this, there are four bits about IRQ/FIQ BypassDisable in CPU
interface Control Register. So the CPU can exit from WFI when an
asserted IRQ is coming. This is critical for power gating a CPU.
BRANCH=none
BUG=chrome-os-partner:39620
TEST=testing with CPU idle with power down state support and CPU can
wake up normally
Change-Id: I71ac642e28024a562db898665b74a5791fce325a
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 3a3f098cbf3fbfdab8150ebd4fd688fdb472b529
Original-Change-Id: I20569a18f34a4b11b8c8c67ea255b3d0f021839f
Original-Signed-off-by: Joseph Lo <josephl(a)nvidia.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/269116
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/drivers/gic/gic.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/drivers/gic/gic.c b/src/drivers/gic/gic.c
index 71073a5..b7bce2a 100644
--- a/src/drivers/gic/gic.c
+++ b/src/drivers/gic/gic.c
@@ -26,6 +26,10 @@
enum {
ENABLE_GRP0 = 0x1 << 0,
ENABLE_GRP1 = 0x1 << 1,
+ FIQ_BYP_DIS_GRP0 = 0x1 << 5,
+ IRQ_BYP_DIS_GRP0 = 0x1 << 6,
+ FIQ_BYP_DIS_GRP1 = 0x1 << 7,
+ IRQ_BYP_DIS_GRP1 = 0x1 << 8,
};
struct gic {
@@ -135,6 +139,13 @@ void gic_disable(void)
/* Disable secure, non-secure interrupts. */
uint32_t val = gic_read(&gicc->ctlr);
val &= ~(ENABLE_GRP0 | ENABLE_GRP1);
+ /*
+ * Enable the IRQ/FIQ BypassDisable bits to bypass the IRQs.
+ * So the CPU can wake up from power gating state when the GIC
+ * was disabled.
+ */
+ val |= FIQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP0 |
+ FIQ_BYP_DIS_GRP1 | IRQ_BYP_DIS_GRP1;
gic_write(&gicc->ctlr, val);
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10170
-gerrit
commit 7d129fee3ec0072ecbab7dba9ce60c142f5c0399
Author: Yidi Lin <yidi.lin(a)mediatek.com>
Date: Mon Feb 9 16:34:44 2015 +0800
libpayload: add mediatek timer driver
Change-Id: Ifb19cf97d4db6c7394521e549968a0cfb6ed1c75
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 0137652ca07e290bb3cb1cc82a00b44ac7bcc7bf
Original-Change-Id: Ica649927d3533c847b24e520e8fe73d75fb9e786
Original-Signed-off-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/257375
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
---
payloads/libpayload/Config.in | 17 ++++++++++++++
payloads/libpayload/drivers/Makefile.inc | 1 +
payloads/libpayload/drivers/timer/mtk_timer.c | 34 +++++++++++++++++++++++++++
3 files changed, 52 insertions(+)
diff --git a/payloads/libpayload/Config.in b/payloads/libpayload/Config.in
index 40c57dc..4d48761 100644
--- a/payloads/libpayload/Config.in
+++ b/payloads/libpayload/Config.in
@@ -405,6 +405,9 @@ config TIMER_CYGNUS
config TIMER_IMG_PISTACHIO
bool "Timer for IMG Pistachio"
+config TIMER_MTK
+ bool "Timer for MediaTek MT8173"
+
endchoice
config TIMER_MCT_HZ
@@ -447,6 +450,20 @@ config IPROC_PERIPH_GLB_TIM_REG_BASE
depends on TIMER_CYGNUS
default 0x19020200
+config TIMER_MTK_HZ
+ int "MediaTek GPT frequency"
+ depends on TIMER_MTK
+ default 13000000
+ help
+ Clock frequency of MediaTek General Purpose Timer.
+
+config TIMER_MTK_ADDRESS
+ hex "MTK GPT register address"
+ depends on TIMER_MTK
+ default 0x10008048
+ help
+ Address of GPT4's counter register to read the FREERUN-mode timer value.
+
config USB
bool "USB Support"
default n
diff --git a/payloads/libpayload/drivers/Makefile.inc b/payloads/libpayload/drivers/Makefile.inc
index 61b0034..57a82ac 100644
--- a/payloads/libpayload/drivers/Makefile.inc
+++ b/payloads/libpayload/drivers/Makefile.inc
@@ -46,6 +46,7 @@ libc-$(CONFIG_LP_NVRAM) += nvram.c
libc-$(CONFIG_LP_NVRAM) += options.c
# Timer drivers
+libc-$(CONFIG_LP_TIMER_MTK) += timer/mtk_timer.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
diff --git a/payloads/libpayload/drivers/timer/mtk_timer.c b/payloads/libpayload/drivers/timer/mtk_timer.c
new file mode 100644
index 0000000..92b28bd
--- /dev/null
+++ b/payloads/libpayload/drivers/timer/mtk_timer.c
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 MediaTek 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <arch/io.h>
+#include <libpayload.h>
+#include <libpayload-config.h>
+#include <stdint.h>
+
+static uint32_t *const mtk_tmrus = (void*)CONFIG_LP_TIMER_MTK_ADDRESS;
+
+uint64_t timer_hz(void)
+{
+ return CONFIG_LP_TIMER_MTK_HZ;
+}
+
+uint64_t timer_raw_value(void)
+{
+ return (uint64_t)readl(mtk_tmrus);
+}
the following patch was just integrated into master:
commit ccbcfd79eca4d55692011d71911eb7efa7672e8d
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Sun May 10 18:00:05 2015 +0200
kconfig: handle globbed files backwards
They're essentially collected on a stack before they're
parsed. So we push them backwards, then parse them in
the correct order.
Change-Id: Ibf29559389cd19f260d67bae8e0b5ef9f4f58d91
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10169
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
See http://review.coreboot.org/10169 for details.
-gerrit
the following patch was just integrated into master:
commit 6be1a8bf084be82b19a561d475c5ad52d5fc987c
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Fri May 8 11:27:19 2015 +0300
AGESA: Drop unused AGESA_MEM_TABLE
These tables are not referenced anywhere, thus all
comments about adjustments are void.
Also drop stub AgesaReadSpd that is all commented out.
Change-Id: I12233ea0dc4baaf36a75f359c52cc59c9b6dad79
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/10143
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan(a)koparo.com>
Reviewed-by: Dave Frodin <dave.frodin(a)se-eng.com>
See http://review.coreboot.org/10143 for details.
-gerrit