aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2015-02-17 13:43:35 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-17 10:19:59 +0200
commite5d5942e153a54e192644300e8dd94d53bdc2583 (patch)
tree2dd74653cb5919481810536ebe835297dbc8f95e
parent128de62e8c433b7f9158d53364439d06fa648765 (diff)
cygnus: enable mmu
this is not only for speed but also preventing the cpu from crashing. the cpu is not happy when cache is cleaned without mmu turned on. BUG=chrome-os-partner:36691 BRANCH=broadcom-firmware TEST=boot purin to romstage. Change-Id: I2445dcc2729798c4fc56fa191cbc8471ef708d08 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 9e35c925b75213e1d35bf191f22c39aaf1726eeb Original-Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Change-Id: Icaf8c506df258edb99413949e6e3089a2b1a91af Original-Reviewed-on: https://chrome-internal-review.googlesource.com/199388 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Original-Commit-Queue: Daisuke Nojiri <dnojiri@google.com> Original-Tested-by: Daisuke Nojiri <dnojiri@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/251306 Reviewed-on: http://review.coreboot.org/9768 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
-rw-r--r--src/soc/broadcom/cygnus/bootblock.c13
-rw-r--r--src/soc/broadcom/cygnus/include/soc/memlayout.ld1
2 files changed, 11 insertions, 3 deletions
diff --git a/src/soc/broadcom/cygnus/bootblock.c b/src/soc/broadcom/cygnus/bootblock.c
index 37edf7f771..3c6d242d76 100644
--- a/src/soc/broadcom/cygnus/bootblock.c
+++ b/src/soc/broadcom/cygnus/bootblock.c
@@ -17,13 +17,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <arch/cache.h>
#include <bootblock_common.h>
-#include <console/console.h>
+#include <stddef.h>
+#include <symbols.h>
void bootblock_soc_init(void)
{
/*
- * typically, this is the place where mmu is initialized to enable
- * cache. it helps speed up vboot verification.
+ * not only for speed but for preventing the cpu from crashing.
+ * the cpu is not happy when cache is cleaned without mmu turned on.
*/
+ mmu_init();
+ mmu_config_range(0, 4096, DCACHE_OFF);
+ mmu_config_range_kb((uintptr_t)_sram/KiB, _sram_size/KiB,
+ DCACHE_WRITETHROUGH);
+ dcache_mmu_enable();
}
diff --git a/src/soc/broadcom/cygnus/include/soc/memlayout.ld b/src/soc/broadcom/cygnus/include/soc/memlayout.ld
index c48c1bc221..cfa50a544f 100644
--- a/src/soc/broadcom/cygnus/include/soc/memlayout.ld
+++ b/src/soc/broadcom/cygnus/include/soc/memlayout.ld
@@ -31,6 +31,7 @@ SECTIONS
SRAM_START(0x02000000)
REGION(reserved_for_system_status, 0x02000000, 4K, 4)
TTB(0x02004000, 16K) /* must be aligned to 16K */
+ TTB_SUBTABLES(0x02008000, 1K)
REGION(reserved_for_maskrom, 0x02009400, 4K, 4)
BOOTBLOCK(0x0200A440, 18K)
PRERAM_CBMEM_CONSOLE(0x0200F000, 4K)