Skip to content

Commit 3309ef6

Browse files
wosayttnttnwosay
andauthored
[libcpu/arm/cortex-a] Revert safety MMU initialization. (#6796)
* Revert safety MMU initialization. Co-authored-by: Wayne Lin <wclin@nuvoton.com>
1 parent 3c2169e commit 3309ef6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

libcpu/arm/cortex-a/start_gcc.S

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,14 @@ after_enable_mmu:
147147

148148
/* disable the data alignment check */
149149
mrc p15, 0, r1, c1, c0, 0
150-
bic r1, #(1<<1)
150+
bic r1, #(1<<1) /* Disable Alignment fault checking */
151+
#ifndef RT_USING_SMART
152+
bic r1, #(1<<0) /* Disable MMU */
153+
bic r1, #(1<<2) /* Disable data cache */
154+
bic r1, #(1<<11) /* Disable program flow prediction */
155+
bic r1, #(1<<12) /* Disable instruction cache */
156+
bic r1, #(3<<19) /* bit[20:19] must be zero */
157+
#endif /* RT_USING_SMART */
151158
mcr p15, 0, r1, c1, c0, 0
152159

153160
/* enable I cache + branch prediction */

0 commit comments

Comments
 (0)