summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2022-11-27 22:00:11 +0800
committerGitHub <[email protected]>2022-11-27 22:00:11 +0800
commit83d3b3ed624c44eca8c493b4e3759809f15309ed (patch)
tree0fed3578983b737109ebfc3e6e0bd9573e523aef /libcpu
parent1805ca5e2ee273fbf198a596ceba27414d5dad86 (diff)
parent16f6157b1e850ac9cba384e8b23fae07014c65db (diff)
Merge pull request #6650 from mxgsgtc/faster-startup-for-cortex-a
[bsp] faster startup for cortex-a
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/cortex-a/start_gcc.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcpu/arm/cortex-a/start_gcc.S b/libcpu/arm/cortex-a/start_gcc.S
index f73b678f7e..5916ddf957 100644
--- a/libcpu/arm/cortex-a/start_gcc.S
+++ b/libcpu/arm/cortex-a/start_gcc.S
@@ -122,6 +122,13 @@ secondary_loop:
b secondary_loop
normal_setup:
+
+ /* enable I cache + branch prediction */
+ mrc p15, 0, r0, c1, c0, 0
+ orr r0, r0, #(1<<12)
+ orr r0, r0, #(1<<11)
+ mcr p15, 0, r0, c1, c0, 0
+
/* setup stack */
bl stack_setup
@@ -142,10 +149,6 @@ bss_loop:
mcr p15, 0, r1, c1, c0, 1 //enable smp
#endif
- /* enable branch prediction */
- mrc p15, 0, r0, c1, c0, 0
- orr r0, r0, #(1<<11)
- mcr p15, 0, r0, c1, c0, 0
/* initialize the mmu table and enable mmu */
ldr r0, =platform_mem_desc