aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2014-05-15 17:34:35 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2014-06-05 17:39:40 +0100
commitd3f262465b732930d482153a7ed059cf6e613d4b (patch)
tree1efdd687dde66723103eb922a45534496deebebf
parentdbc6eb236bb56a8cbc0b7876914aeea880a85a53 (diff)
downloadarm-trusted-firmware-d3f262465b732930d482153a7ed059cf6e613d4b.tar.gz
juno: Remove unused disable_mmu() function
disable_mmu() cannot work as a C function as there is no control over data accesses generated by the compiler between disabling and cleaning the data cache. This results in reading stale data from main memory. This patch removes the C version of this function in juno code. An assembly version has been introduced in commit 2f5dcfef1db4. Change-Id: I0de10dbe2db8d22855bf1f60f1e48540a4861cb6
-rw-r--r--plat/juno/aarch64/plat_common.c21
-rw-r--r--plat/juno/platform.h1
2 files changed, 0 insertions, 22 deletions
diff --git a/plat/juno/aarch64/plat_common.c b/plat/juno/aarch64/plat_common.c
index 3cd9d89..f8532f6 100644
--- a/plat/juno/aarch64/plat_common.c
+++ b/plat/juno/aarch64/plat_common.c
@@ -85,27 +85,6 @@ void enable_mmu()
return;
}
-void disable_mmu(void)
-{
- unsigned long sctlr;
- unsigned long current_el = read_current_el();
-
- if (GET_EL(current_el) == MODE_EL3) {
- sctlr = read_sctlr_el3();
- sctlr = sctlr & ~(SCTLR_M_BIT | SCTLR_C_BIT);
- write_sctlr_el3(sctlr);
- } else {
- sctlr = read_sctlr_el1();
- sctlr = sctlr & ~(SCTLR_M_BIT | SCTLR_C_BIT);
- write_sctlr_el1(sctlr);
- }
-
- /* Flush the caches */
- dcsw_op_all(DCCISW);
-
- return;
-}
-
static const mmap_region_t juno_mmap[] = {
{ TZROM_BASE, TZROM_SIZE, MT_MEMORY | MT_RO | MT_SECURE },
{ MHU_SECURE_BASE, MHU_SECURE_SIZE, (MHU_PAYLOAD_CACHED ? MT_MEMORY : MT_DEVICE)
diff --git a/plat/juno/platform.h b/plat/juno/platform.h
index 3738a28..fd2f94f 100644
--- a/plat/juno/platform.h
+++ b/plat/juno/platform.h
@@ -340,7 +340,6 @@ extern void bl2_plat_arch_setup(void);
extern void bl31_plat_arch_setup(void);
extern int platform_setup_pm(const struct plat_pm_ops **);
extern unsigned int platform_get_core_pos(unsigned long mpidr);
-extern void disable_mmu(void);
extern void enable_mmu(void);
extern void configure_mmu(struct meminfo *,
unsigned long,