Skip to content
Snippets Groups Projects
Commit 668ec87f authored by Ruchika Gupta's avatar Ruchika Gupta Committed by York Sun
Browse files

powerpc: e6500: Lock/unlock 1 cache instead of L1 as init_ram


For E6500 cores, L2 cache has been used as init_ram. L1 cache is a
write through cache on E6500.If lines are not locked in both L1 and
L2 caches, crashes are observed during secure boot. This patch locks/
unlocks both L1 and L2 cache to prevent the crash.

Signed-off-by: default avatarRuchika Gupta <ruchika.gupta@nxp.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 3d91f46c
No related branches found
No related tags found
No related merge requests found
...@@ -1145,8 +1145,9 @@ switch_as: ...@@ -1145,8 +1145,9 @@ switch_as:
li r0,0 li r0,0
1: 1:
dcbz r0,r3 dcbz r0,r3
#ifdef CONFIG_E6500 /* Lock/unlock L2 cache instead of L1 */ #ifdef CONFIG_E6500 /* Lock/unlock L2 cache long with L1 */
dcbtls 2, r0, r3 dcbtls 2, r0, r3
dcbtls 0, r0, r3
#else #else
dcbtls 0, r0, r3 dcbtls 0, r0, r3
#endif #endif
...@@ -1790,8 +1791,9 @@ unlock_ram_in_cache: ...@@ -1790,8 +1791,9 @@ unlock_ram_in_cache:
slwi r4,r4,(10 - 1 - L1_CACHE_SHIFT) slwi r4,r4,(10 - 1 - L1_CACHE_SHIFT)
mtctr r4 mtctr r4
1: dcbi r0,r3 1: dcbi r0,r3
#ifdef CONFIG_E6500 /* lock/unlock L2 cache instead of L1 */ #ifdef CONFIG_E6500 /* lock/unlock L2 cache long with L1 */
dcblc 2, r0, r3 dcblc 2, r0, r3
dcblc 0, r0, r3
#else #else
dcblc r0,r3 dcblc r0,r3
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment