Skip to content

Commit ad0dfc5

Browse files
JiafeiPankartben
authored andcommitted
Revert "arm64: reset: disable cache and MMU for safety"
This reverts commit 573a712. The original patch disable cache and MMU, but in some cases, for example the code is loaded into memory by hardware debugger, we need to flush D-Cache before disable it in order to make sure the data is coherent in the system, otherwise it will report "Synchronous Abort" when D-Cache is disabled. This patch revert the old one and the following patch will flush the cache before disable it. Signed-off-by: Jiafei Pan <[email protected]>
1 parent abcdb18 commit ad0dfc5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/arm64/core/reset.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__reset_prep_c)
5858
b out
5959
#endif /* CONFIG_ARMV8_R */
6060
2:
61-
/* Disable alignment fault checking, disable D-Cache, I-Cache, MMU for safety */
61+
/* Disable alignment fault checking */
6262
mrs x0, sctlr_el2
63-
mov x1, #(SCTLR_A_BIT | SCTLR_C_BIT | SCTLR_M_BIT | SCTLR_I_BIT)
64-
bic x0, x0, x1
63+
bic x0, x0, SCTLR_A_BIT
6564
msr sctlr_el2, x0
6665
isb
6766

0 commit comments

Comments
 (0)