Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11382
-gerrit
commit 3fc82e61d99d8cbaeb9822b9fdd37a5728ad3838
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed Aug 5 17:05:26 2015 -0700
t210: Pass in required BL31 parameters
BUG=chrome-os-partner:42989
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt.
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Original-Commit-Id: ff42f0b4e7f81ea97e571ec03adac16b412e4a37
Original-Change-Id: If78857abfb9a348433b8707e58bea1f58416d243
Original-Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/291021
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan(a)chromium.org>
Original-Trybot-Ready: Furquan Shaikh <furquan(a)chromium.org>
Original-Tested-by: Furquan Shaikh <furquan(a)chromium.org>
Original-(cherry picked from commit 68eeb4bb4b817184eb42f4ee3a840317ede07dae)
Original-Reviewed-on: https://chromium-review.googlesource.com/290988
Original-Reviewed-by: Furquan Shaikh <furquan(a)chromium.org>
Change-Id: Id555198bc8e5d77f8ceee710d1a432516bd1ae4c
---
src/soc/nvidia/tegra210/Makefile.inc | 1 +
src/soc/nvidia/tegra210/arm_tf.c | 47 ++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/src/soc/nvidia/tegra210/Makefile.inc b/src/soc/nvidia/tegra210/Makefile.inc
index 2d5bf58..0593f06 100644
--- a/src/soc/nvidia/tegra210/Makefile.inc
+++ b/src/soc/nvidia/tegra210/Makefile.inc
@@ -75,6 +75,7 @@ ramstage-$(CONFIG_MAINBOARD_DO_DSI_INIT) += mipi-phy.c
ramstage-$(CONFIG_MAINBOARD_DO_DSI_INIT) += ./jdi_25x18_display/panel-jdi-lpm102a188a.c
ramstage-$(CONFIG_MAINBOARD_DO_SOR_INIT) += dp.c
ramstage-$(CONFIG_MAINBOARD_DO_SOR_INIT) += sor.c
+ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += arm_tf.c
ramstage-y += sdram_lp0.c
ramstage-y += soc.c
diff --git a/src/soc/nvidia/tegra210/arm_tf.c b/src/soc/nvidia/tegra210/arm_tf.c
new file mode 100644
index 0000000..56aa4ac
--- /dev/null
+++ b/src/soc/nvidia/tegra210/arm_tf.c
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ *
+ * 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/cache.h>
+#include <arm_tf.h>
+#include <assert.h>
+#include <soc/addressmap.h>
+#include <stdlib.h>
+#include <string.h>
+#include <symbols.h>
+
+typedef struct bl31_plat_params {
+ uint32_t tzdram_size;
+} bl31_plat_params_t;
+
+static bl31_plat_params_t t210_plat_params;
+
+void *soc_get_bl31_plat_params(bl31_params_t *params)
+{
+ uintptr_t tz_base_mib;
+ size_t tz_size_mib;
+
+ carveout_range(CARVEOUT_TZ, &tz_base_mib, &tz_size_mib);
+
+ assert(tz_size_mib < 4096);
+ t210_plat_params.tzdram_size = tz_size_mib * MiB;
+
+ dcache_clean_by_mva(&t210_plat_params, sizeof(t210_plat_params));
+
+ return &t210_plat_params;
+}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11383
-gerrit
commit f300ea8b7f3cebc51891a1268fb5039da0499b50
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed Aug 5 17:03:34 2015 -0700
t210: Move page tables to end of TZDRAM
BL31 makes an assumption that TZDRAM always starts at its base. This
was not true in our case since coreboot page tables were located
towards the start of TZDRAM. Instead move page tables to the end, thus
satisfying the assumption that BL31 base is the base of TZDRAM as
well.
BUG=chrome-os-partner:42989
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Original-Commit-Id: aabed336da6e9aea426650c5ca5977ccfc83a21b
Original-Change-Id: Ic4d155525dbb4baab95c971f77848e47d5d54dba
Original-Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/291020
Original-Reviewed-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>
Original-Tested-by: Furquan Shaikh <furquan(a)chromium.org>
Original-(cherry picked from commit a57127f1655ef311b82c41ce33ffc71db5f9db35)
Original-Reviewed-on: https://chromium-review.googlesource.com/290987
Change-Id: Ie7166fd0301b46eb32f44107f7f782c6d79a278c
---
src/soc/nvidia/tegra210/Makefile.inc | 9 +++-----
src/soc/nvidia/tegra210/mmu_operations.c | 35 +++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/soc/nvidia/tegra210/Makefile.inc b/src/soc/nvidia/tegra210/Makefile.inc
index 0593f06..fb38d38 100644
--- a/src/soc/nvidia/tegra210/Makefile.inc
+++ b/src/soc/nvidia/tegra210/Makefile.inc
@@ -161,14 +161,11 @@ endif
# BL31 component is placed towards the end of 32-bit address space. This assumes
# that TrustZone memory is placed at the end of 32-bit address space. Within the
-# TZ memory, we place TTB at the beginning and then remaining space can be used
-# up by BL31 and secure OS. Calculate TZDRAM_BASE i.e. base of BL31 component
-# by:
+# TZ memory, we place BL31 and BL32(if available) towards the beginning and TTB
+# towards the end. Calculate TZDRAM_BASE i.e. base of BL31 component by:
# 0x1000 = end of 32-bit address space in MiB
# 0x1000 - $(CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB) = start of TZ memory in MiB
-# 0x1000 - $(CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB) + $(CONFIG_TTB_SIZE_MB)
-# = skip TTB buffer and get base address of BL31
-BL31_MAKEARGS += TZDRAM_BASE=$$(((0x1000 - $(CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB) + $(CONFIG_TTB_SIZE_MB)) << 20))
+BL31_MAKEARGS += TZDRAM_BASE=$$(((0x1000 - $(CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB)) << 20))
BL31_MAKEARGS += PLAT=tegra TARGET_SOC=t210
# MTC fw
diff --git a/src/soc/nvidia/tegra210/mmu_operations.c b/src/soc/nvidia/tegra210/mmu_operations.c
index dd7437c..5578933 100644
--- a/src/soc/nvidia/tegra210/mmu_operations.c
+++ b/src/soc/nvidia/tegra210/mmu_operations.c
@@ -18,6 +18,7 @@
*/
#include <arch/mmu.h>
+#include <assert.h>
#include <memrange.h>
#include <soc/addressmap.h>
#include <soc/mmu_operations.h>
@@ -69,15 +70,43 @@ void tegra210_mmu_init(void)
{
uintptr_t tz_base_mib;
size_t tz_size_mib;
+ uintptr_t ttb_base_mib;
size_t ttb_size_mib;
struct memranges *map = &t210_mmap_ranges;
tegra210_memrange_init(map);
mainboard_add_memory_ranges(map);
- /* Place page tables at the base of the trust zone region. */
+ /*
+ * Place page tables at the end of the trust zone region.
+ * TZDRAM layout is as follows:
+ *
+ * +--------------------------+ <----+DRAM_END
+ * | |
+ * | |
+ * | |
+ * +--------------------------+ <----+0x100000000
+ * | |
+ * | coreboot page tables |
+ * +--------------------------+
+ * | |
+ * | BL32 |
+ * +--------------------------+
+ * | |
+ * | BL31 |
+ * +--------------------------+ <----+TZDRAM_BASE
+ * | |
+ * | |
+ * | |
+ * | |
+ * +--------------------------+ <----+DRAM_BASE
+ *
+ */
carveout_range(CARVEOUT_TZ, &tz_base_mib, &tz_size_mib);
- tz_base_mib *= MiB;
+
+ assert(tz_size_mib > CONFIG_TTB_SIZE_MB);
+ ttb_base_mib = (tz_base_mib + tz_size_mib - CONFIG_TTB_SIZE_MB) * MiB;
+
ttb_size_mib = CONFIG_TTB_SIZE_MB * MiB;
- mmu_init(map, (void *)tz_base_mib, ttb_size_mib);
+ mmu_init(map, (void *)ttb_base_mib, ttb_size_mib);
mmu_enable();
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11386
-gerrit
commit db95416b8dd6768b1dc739a30729c1bdb79533ed
Author: Douglas Anderson <dianders(a)chromium.org>
Date: Thu Aug 6 09:28:03 2015 -0700
veyron: mickey sdram-lpddr3-samsung-2GB.inc now 40 Ohm
The value of 0x4 (60 Ohm) apperas to be causing lots of problems.
Since 0x1 (34.3 Ohm) was _almost_ right, let's try 0x2 (40 Ohm) and
hope it's the sweet spot.
BRANCH=None
BUG=chrome-os-partner:43626
TEST=My mickey now boots up
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Original-Commit-Id: 06db96e00d39972edbaf8429cbe88bbc66804e15
Original-Change-Id: If8b7d51d058ae000c0af189a648c62fa38a872ac
Original-Signed-off-by: Douglas Anderson <dianders(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/291121
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Original-(cherry picked from commit 0dabadca1ab3bb310f85646d020bdcf672014071)
Original-Reviewed-on: https://chromium-review.googlesource.com/291291
Change-Id: Id32790c894c09616e32503aa790fa294093eca8a
---
.../google/veyron_mickey/sdram_inf/sdram-lpddr3-samsung-2GB.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/google/veyron_mickey/sdram_inf/sdram-lpddr3-samsung-2GB.inc b/src/mainboard/google/veyron_mickey/sdram_inf/sdram-lpddr3-samsung-2GB.inc
index cc39f62..666b12f 100644
--- a/src/mainboard/google/veyron_mickey/sdram_inf/sdram-lpddr3-samsung-2GB.inc
+++ b/src/mainboard/google/veyron_mickey/sdram_inf/sdram-lpddr3-samsung-2GB.inc
@@ -65,8 +65,8 @@
.mr[0] = 0x0,
.mr[1] = 0xC3,
.mr[2] = 0x6,
- /* 60Ohms instead of 34.3 due to bad PCB routing on Mickey. */
- .mr[3] = 0x4
+ /* 40 Ohms instead of 34.3 due to bad PCB routing on Mickey. */
+ .mr[3] = 0x2
},
.noc_timing = 0x20D266A4,
.noc_activate = 0x5B6,
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11385
-gerrit
commit ee2f8bcd2d301dd074427407686aadb273129d27
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Wed Aug 5 14:13:34 2015 -0700
veyron_rialto: Force 3G modem off
This basically does the same thing for firmware what CL:290631
did in the kernel. We want to keep the modem off until it needs
to be used to avoid enumeration/detection issues.
BUG=chrome-os-partner:43271
BRANCH=none
TEST=needs testing
Change-Id: I3b63a77c732dc4895b728b30f1dd71210a9c0e90
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Original-Commit-Id: a90ccd7fbffe44abe05e96341cc77067442c85e4
Original-Change-Id: I3516de1ea9160f7186ad7f5fb3b5d29ac73143b5
Original-Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/290890
Original-Reviewed-by: Alexandru Stan <amstan(a)chromium.org>
---
src/mainboard/google/veyron_rialto/mainboard.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mainboard/google/veyron_rialto/mainboard.c b/src/mainboard/google/veyron_rialto/mainboard.c
index 52a27bb..4dba666 100644
--- a/src/mainboard/google/veyron_rialto/mainboard.c
+++ b/src/mainboard/google/veyron_rialto/mainboard.c
@@ -72,6 +72,14 @@ static void configure_codec(void)
rkclk_configure_i2s(12288000);
}
+static void configure_3g(void)
+{
+ /* Force 3G modem off to avoid confusing the EHCI host and
+ * causing problems during enumeration/init */
+ gpio_output(GPIO(5, C, 1), 1); /* 3G_SHUTDOWN */
+ gpio_output(GPIO(4, D, 2), 0); /* 3G_ON_OFF */
+}
+
static void mainboard_init(device_t dev)
{
gpio_output(GPIO_RESET, 0);
@@ -79,6 +87,7 @@ static void mainboard_init(device_t dev)
configure_usb();
configure_emmc();
configure_codec();
+ configure_3g();
/* No video. */
elog_init();
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11391
-gerrit
commit 0419d6383bd1536dd227b4abe160a08a9130422a
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Thu Aug 13 15:43:55 2015 -0700
rk3288: Ignore EDID errors for HDMI
Assume that HDMI implies usage of an external display, and that we
want to try bringing up display if we can read an EDID.
BUG=chrome-os-partner:42946
BRANCH=firmware-veyron
TEST=none; need a display with corrupt EDID to test with
Change-Id: I11cc61140d905d70798a7b46db7847f3a1b3c886
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Original-Commit-Id: ace7773623eac57f068ecd50baa9108ce028cf1b
Original-Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Original-Change-Id: I9e22984a98b1a5f8cd9645b92dc9b87e8d968f01
Original-Reviewed-on: https://chromium-review.googlesource.com/293548
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
---
src/soc/rockchip/rk3288/hdmi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/soc/rockchip/rk3288/hdmi.c b/src/soc/rockchip/rk3288/hdmi.c
index a7a9c40..e5bebe3 100644
--- a/src/soc/rockchip/rk3288/hdmi.c
+++ b/src/soc/rockchip/rk3288/hdmi.c
@@ -788,11 +788,10 @@ int rk_hdmi_get_edid(struct edid *edid)
edid_size += HDMI_EDID_BLOCK_SIZE;
}
- ret = decode_edid(edid_buf, edid_size, edid);
- if (ret) {
+ /* Assume usage of HDMI implies an external display in which case
+ * we should be lenient about errors that the EDID decoder finds. */
+ if (decode_edid(edid_buf, edid_size, edid))
hdmi_debug("failed to decode edid.\n");
- return -1;
- }
return 0;
}