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/8640
-gerrit
commit 0f0ba7eb9f8abc3f0d782ccc2c05753a5032f649
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Jul 15 13:19:19 2014 -0700
storm: allow to override CBFS_SIZE configuration setting
The default CBFS size configuration setting is incorrect in case of
Qualcomm SOC targets, as the coreboot blob is much smaller than the
actual bootprom. Note that this size also must match the board fmap
defined in the appropriate depthcharge board directory.
BUG=chromium:394068
TEST=manual
. previously failing to boot coreboot image does not fail to load
depthcharge anymore.
Original-Change-Id: I1b178970b1deee05705490542e4a0c57500379dd
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/208146
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
(cherry picked from commit 01f3561fdee7b5547534e20d423fbbb1b490532c)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: If573bbc6254cf6786e75970eae3ad2b327a7ecfe
---
src/soc/qualcomm/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/soc/qualcomm/Kconfig b/src/soc/qualcomm/Kconfig
index b7a12d4..918093b 100644
--- a/src/soc/qualcomm/Kconfig
+++ b/src/soc/qualcomm/Kconfig
@@ -1 +1,9 @@
source src/soc/qualcomm/ipq806x/Kconfig
+
+config CBFS_SIZE
+ hex "Size of CBFS filesystem in ROM"
+ default ROM_SIZE
+ help
+ CBFS size needs to match the size of memory allocated to the
+ coreboot blob elsewhere in the system. Make sure this config option
+ is fine tuned in the board config file.
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/8639
-gerrit
commit 4843814a9cb745e102c1123559e697236871417d
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jul 15 10:53:29 2014 -0500
t132: handle optional Trust Zone region correctly
Provide a default Trust Zone region size of 1MiB, and
correctly account for it in the AVP and the arm64 cores.
The different paths between the arm64 cores and the AVP
is because the AVP cannot access the Trust Zone region
registers. Therefore the AVP needs to account for the
Trust Zone region.
BUG=chrome-os-partner:30572
BRANCH=None
TEST=Built and ran. Noted Trust Zone region being accounted for.
Original-Change-Id: Ie0f117ec7a5ff8519c39778d3cdf88c3eee57ea5
Original-Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/208062
Original-Reviewed-by: Tom Warren <twarren(a)nvidia.com>
Original-Reviewed-by: Furquan Shaikh <furquan(a)chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan(a)chromium.org>
(cherry picked from commit 22f2fa05c009c58f53b99b9ebe1b6d01fdac5ba7)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I28506b4401145d366b56126b2eddc4c3d3db7b44
---
src/soc/nvidia/tegra132/Kconfig | 6 +++++
src/soc/nvidia/tegra132/Makefile.inc | 1 +
src/soc/nvidia/tegra132/addressmap.c | 8 ++++++
src/soc/nvidia/tegra132/ramstage.c | 47 ++++++++++++++++++++++++++++++++++++
4 files changed, 62 insertions(+)
diff --git a/src/soc/nvidia/tegra132/Kconfig b/src/soc/nvidia/tegra132/Kconfig
index 3396cc8..8a5d087 100644
--- a/src/soc/nvidia/tegra132/Kconfig
+++ b/src/soc/nvidia/tegra132/Kconfig
@@ -93,4 +93,10 @@ config MTS_DIRECTORY
help
Path to directory where MTS microcode files are located.
+config TRUSTZONE_CARVEOUT_SIZE_MB
+ hex "Size of Trust Zone region"
+ default 0x1
+ help
+ Size of Trust Zone area in MiB to reserve in memory map.
+
endif
diff --git a/src/soc/nvidia/tegra132/Makefile.inc b/src/soc/nvidia/tegra132/Makefile.inc
index 88ba51c..0ab95d4 100644
--- a/src/soc/nvidia/tegra132/Makefile.inc
+++ b/src/soc/nvidia/tegra132/Makefile.inc
@@ -48,6 +48,7 @@ ramstage-y += monotonic_timer.c
ramstage-y += ../tegra/gpio.c
ramstage-y += ../tegra/i2c.c
ramstage-y += ../tegra/pinmux.c
+ramstage-y += ramstage.c
ramstage-$(CONFIG_DRIVERS_UART) += uart.c
CPPFLAGS_common += -Isrc/soc/nvidia/tegra132/include/
diff --git a/src/soc/nvidia/tegra132/addressmap.c b/src/soc/nvidia/tegra132/addressmap.c
index bb35a87..7f6d7c3 100644
--- a/src/soc/nvidia/tegra132/addressmap.c
+++ b/src/soc/nvidia/tegra132/addressmap.c
@@ -147,6 +147,14 @@ uintptr_t framebuffer_attributes(size_t *size_mib)
/* Place the framebuffer just below the 32-bit addressable limit. */
memory_range_by_bits(ADDRESS_SPACE_32_BIT, &begin, &end);
+ /*
+ * Need to take into account that the Trust Zone region is not able to
+ * be read by the AVP. The Trust Zone region will live just below the
+ * rest of the carveout regions.
+ */
+ if (context_avp())
+ end -= CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB;
+
*size_mib = FB_SIZE_MB;
end -= *size_mib;
diff --git a/src/soc/nvidia/tegra132/ramstage.c b/src/soc/nvidia/tegra132/ramstage.c
new file mode 100644
index 0000000..7b2f4e8
--- /dev/null
+++ b/src/soc/nvidia/tegra132/ramstage.c
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 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/io.h>
+#include <arch/stages.h>
+#include <soc/addressmap.h>
+#include "mc.h"
+
+void arm64_soc_init(void)
+{
+ struct tegra_mc_regs * const mc = (void *)(uintptr_t)TEGRA_MC_BASE;
+ const size_t tz_size_mib = CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB;
+ uintptr_t base;
+ uintptr_t end;
+
+ if (!tz_size_mib)
+ return;
+
+ /*
+ * Ramstage is when the arm64 first gets running. It also is the
+ * only entity that the capabilities to program the Trust Zone region.
+ * Therefore configure the region early. Also, the TZ region can only
+ * live in 32-bit space.
+ */
+ memory_range_by_bits(ADDRESS_SPACE_32_BIT, &base, &end);
+
+ /* Place the TZ area just below current carveout regions. */
+ end -= tz_size_mib;
+ write32(end << 20, &mc->security_cfg0);
+ write32(tz_size_mib, &mc->security_cfg1);
+}
the following patch was just integrated into master:
commit a49c0cca9fb29541b30c7cec7f1b49c376a7c12d
Author: Alexander Couzens <lynxis(a)fe80.eu>
Date: Tue Mar 10 20:24:34 2015 +0100
crossgcc: fix copy-paste mistake on riscv make target
Change-Id: Id618595a321529770964b125f7490dcb08376643
Signed-off-by: Alexander Couzens <lynxis(a)fe80.eu>
Reviewed-on: http://review.coreboot.org/8637
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/8637 for details.
-gerrit
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/8638
-gerrit
commit 2932963390a03194a52c8d5991422abfb24b7b58
Author: Julius Werner <jwerner(a)chromium.org>
Date: Fri Jul 11 17:09:41 2014 -0700
nyan: Remove broken setup_display() from romstage
This patch removes a chunk of romstage code from Tegra and all Nyan
boards that was supposed to enable some LCD power rails early, but never
really worked. The dev_find_slot() function can only find PCI devices,
which the CPU cluster is not. Since we're done with Nyan-RO and the
ramstage display code is fine as it is, there is no point in trying to
fix this... but we should remove it from ToT lest someone uses it as a
blueprint to add more dead code to future boards.
BRANCH=None
BUG=None
TEST=None
Original-Change-Id: I6eee256873299429d4e3934fe7d454120390f34d
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/207720
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
(cherry picked from commit a3df62a3bcefcc20ae59648f5d1f0a01db3c02c6)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I8deedea5e9787848aae3064509c611bc349313cc
---
src/mainboard/google/nyan/romstage.c | 20 ----------
src/mainboard/google/nyan_big/romstage.c | 20 ----------
src/mainboard/google/nyan_blaze/romstage.c | 20 ----------
src/soc/nvidia/tegra124/Makefile.inc | 1 -
src/soc/nvidia/tegra124/early_display.c | 61 ------------------------------
5 files changed, 122 deletions(-)
diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c
index 749b87d..5ab77b3 100644
--- a/src/mainboard/google/nyan/romstage.c
+++ b/src/mainboard/google/nyan/romstage.c
@@ -22,7 +22,6 @@
#include <arch/exception.h>
#include <arch/io.h>
#include <arch/stages.h>
-#include <device/device.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
cpu_reset();
}
- /* For quality of the user experience, it's important to get
- * the video going ASAP. Because there are long delays in some
- * of the powerup steps, we do some very early setup here in
- * romstage. The only thing setup_display does is manage
- * 4 GPIOs, under control of the config struct members.
- * In general, it is safe to enable panel power, and disable
- * anything related to the backlight. If we get something wrong,
- * we can easily fix it in ramstage by further GPIO manipulation,
- * so we feel it is ok to do some setting at this point.
- */
-
- const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
- printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
- if (soc && soc->chip_info) {
- const struct soc_nvidia_tegra124_config *config =
- soc->chip_info;
- setup_display((struct soc_nvidia_tegra124_config *)config);
- }
-
cbmem_initialize_empty();
timestamp_init(0);
diff --git a/src/mainboard/google/nyan_big/romstage.c b/src/mainboard/google/nyan_big/romstage.c
index 749b87d..5ab77b3 100644
--- a/src/mainboard/google/nyan_big/romstage.c
+++ b/src/mainboard/google/nyan_big/romstage.c
@@ -22,7 +22,6 @@
#include <arch/exception.h>
#include <arch/io.h>
#include <arch/stages.h>
-#include <device/device.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
cpu_reset();
}
- /* For quality of the user experience, it's important to get
- * the video going ASAP. Because there are long delays in some
- * of the powerup steps, we do some very early setup here in
- * romstage. The only thing setup_display does is manage
- * 4 GPIOs, under control of the config struct members.
- * In general, it is safe to enable panel power, and disable
- * anything related to the backlight. If we get something wrong,
- * we can easily fix it in ramstage by further GPIO manipulation,
- * so we feel it is ok to do some setting at this point.
- */
-
- const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
- printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
- if (soc && soc->chip_info) {
- const struct soc_nvidia_tegra124_config *config =
- soc->chip_info;
- setup_display((struct soc_nvidia_tegra124_config *)config);
- }
-
cbmem_initialize_empty();
timestamp_init(0);
diff --git a/src/mainboard/google/nyan_blaze/romstage.c b/src/mainboard/google/nyan_blaze/romstage.c
index a23937e..a5f6194 100644
--- a/src/mainboard/google/nyan_blaze/romstage.c
+++ b/src/mainboard/google/nyan_blaze/romstage.c
@@ -22,7 +22,6 @@
#include <arch/exception.h>
#include <arch/io.h>
#include <arch/stages.h>
-#include <device/device.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
cpu_reset();
}
- /* For quality of the user experience, it's important to get
- * the video going ASAP. Because there are long delays in some
- * of the powerup steps, we do some very early setup here in
- * romstage. The only thing setup_display does is manage
- * 4 GPIOs, under control of the config struct members.
- * In general, it is safe to enable panel power, and disable
- * anything related to the backlight. If we get something wrong,
- * we can easily fix it in ramstage by further GPIO manipulation,
- * so we feel it is ok to do some setting at this point.
- */
-
- const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
- printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
- if (soc && soc->chip_info) {
- const struct soc_nvidia_tegra124_config *config =
- soc->chip_info;
- setup_display((struct soc_nvidia_tegra124_config *)config);
- }
-
cbmem_initialize_empty();
timestamp_init(0);
diff --git a/src/soc/nvidia/tegra124/Makefile.inc b/src/soc/nvidia/tegra124/Makefile.inc
index 8054ca2..6631364 100644
--- a/src/soc/nvidia/tegra124/Makefile.inc
+++ b/src/soc/nvidia/tegra124/Makefile.inc
@@ -33,7 +33,6 @@ verstage-y += ../tegra/pinmux.c
romstage-y += cbfs.c
romstage-y += cbmem.c
romstage-y += clock.c
-romstage-y += early_display.c
romstage-y += dma.c
romstage-y += i2c.c
romstage-y += monotonic_timer.c
diff --git a/src/soc/nvidia/tegra124/early_display.c b/src/soc/nvidia/tegra124/early_display.c
deleted file mode 100644
index 4356a62..0000000
--- a/src/soc/nvidia/tegra124/early_display.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2013 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 <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <arch/cache.h>
-#include "chip.h"
-#include <soc/display.h>
-#include "gpio.h"
-
-/* the primary purpose of this function is to kick off things in
- * romstage that are time consuming. No more should be done at this
- * point than the bare minimum that will allow us to pick up the work
- * in the ramstage and not require lots of udelays. ramstage will do
- * the rest. As it happens, that merely means 'turn off everything you can,
- * save the minimum long-delay bit that you need to get graphics going'. It's
- * important not to have the backlight on as people don't like display trash
- * on startup, even if I do.
- */
-void setup_display(struct soc_nvidia_tegra124_config *config)
-{
- if (config->panel_vdd_gpio){
- gpio_output(config->panel_vdd_gpio, 1);
- printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
- __func__, config->panel_vdd_gpio, 1);
- }
- if (config->lvds_shutdown_gpio){
- gpio_output(config->lvds_shutdown_gpio, 0);
- printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
- __func__, config->lvds_shutdown_gpio, 0);
- }
- if (config->backlight_en_gpio){
- gpio_output(config->backlight_en_gpio, 0);
- printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
- __func__, config->backlight_en_gpio, 0);
- }
- if (config->backlight_vdd_gpio){
- gpio_output(config->backlight_vdd_gpio, 0);
- printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
- __func__, config->backlight_vdd_gpio, 0);
- }
-
-}
-
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7748
-gerrit
commit 69ae99aea7d1258222bb20e71e4de9a3950dea9d
Author: Gabe Black <gabeblack(a)google.com>
Date: Thu Apr 3 14:04:42 2014 -0700
cbmem console: Allow the cbmem console on non-x86 systems again.
If it's not supported on a particular board, either the build will fail or
checks within the cbmem console itself should detect the problem. There
shouldn't be random memory corruption any more.
BUG=None
TEST=Built with CONSOLE_CBMEM enabled on nyan and saw that it was actually
enabled.
BRANCH=None
Original-Change-Id: Id6c8c7675daafe07aa4878cfcf13faefe576e520
Original-Signed-off-by: Gabe Black <gabeblack(a)google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/193167
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Original-Tested-by: Gabe Black <gabeblack(a)chromium.org>
(cherry picked from commit 20b486443bfc2d93d72bbc9e496023a00ab9ab30)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I39fbcdff61f6d8f520f2e9d7612dee78e97898b1
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/console/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 5974695..2969c0f 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -168,7 +168,6 @@ config CONSOLE_NE2K_IO_PORT
boundary, qemu needs broader align)
config CONSOLE_CBMEM
- depends on ARCH_X86
bool "Send console output to a CBMEM buffer"
default n
help