Enable caching early in assembly.
By doing this early, more code is able to make assumptions about using
the cache so there are fewer areas where manual cache management is
required.
Moving to assembly means less assumptions are made about the state of
the cache before it is enabled. Doing this in C means there are concerns
about the state of the stack if the cache is ever not clean and invalid.
Bug: 141103913
Bug: 139269163
Change-Id: I8ff01c2c2a0c035f147d2d1a8372dbd8bec7ce73
diff --git a/src/mm.c b/src/mm.c
index 886779f..b3d06e2 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -950,10 +950,5 @@
mm_identity_map(stage1_locked, layout_data_begin(), layout_data_end(),
MM_MODE_R | MM_MODE_W, ppool);
- return arch_mm_init();
-}
-
-void mm_cpu_init(void)
-{
- arch_mm_enable(ptable.root);
+ return arch_mm_init(ptable.root);
}