Merge pull request #6650 from mxgsgtc/faster-startup-for-cortex-a

[bsp] faster startup for cortex-a
This commit is contained in:
Bernard Xiong 2022-11-27 22:00:11 +08:00 committed by GitHub
commit 83d3b3ed62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -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