diff --git a/arch/arm/arm/src/startup/reset_vector_mp.S b/arch/arm/arm/src/startup/reset_vector_mp.S index cec87786964d26a9641127c128fc4568df01c83f..209c2a56a0983004f66ddd6cdbfb666f4908ba12 100755 --- a/arch/arm/arm/src/startup/reset_vector_mp.S +++ b/arch/arm/arm/src/startup/reset_vector_mp.S @@ -65,7 +65,9 @@ .equ MPIDR_CPUID_MASK, 0xffU - .fpu vfpv4 + .fpu neon-vfpv4 + .syntax unified + .arch armv7-a .arm /* param0 is stack bottom, param1 is stack size, r12 hold cpu id */ @@ -187,7 +189,7 @@ reloc_img_to_bottom_done: mov r0, r4 mov r1, #0 mov r2, #MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS - bl memset + bl memset_optimized /* optimized memset since r0 is 64-byte aligned */ PAGE_TABLE_SET SYS_MEM_BASE, KERNEL_VMM_BASE, KERNEL_VMM_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS PAGE_TABLE_SET SYS_MEM_BASE, UNCACHED_VMM_BASE, UNCACHED_VMM_SIZE, MMU_INITIAL_MAP_NORMAL_NOCACHE @@ -463,6 +465,18 @@ _bootaddr_setup: bx lr +memset_optimized: + mov r3, r0 + vdup.8 q0, r1 + vmov q1, q0 + vmov q2, q0 + vmov q3, q0 +memset_optimized_loop: + subs r2, #64 + vstmia r3!, {d0 - d7} + bge memset_optimized_loop + bx lr + init_done: .long 0xDEADB00B diff --git a/arch/arm/arm/src/startup/reset_vector_up.S b/arch/arm/arm/src/startup/reset_vector_up.S index 63ac57641ba8c2205b91bdab6a535c966ecc9b86..729d0d4323467b4e4bfda862e72ea1594fa9f728 100755 --- a/arch/arm/arm/src/startup/reset_vector_up.S +++ b/arch/arm/arm/src/startup/reset_vector_up.S @@ -65,7 +65,9 @@ .equ MPIDR_CPUID_MASK, 0xffU - .fpu vfpv4 + .fpu neon-vfpv4 + .syntax unified + .arch armv7-a .arm /* param0 is stack bottom, param1 is stack size, r11 hold cpu id */ @@ -164,7 +166,7 @@ reloc_img_to_bottom_done: mov r0, r4 mov r1, #0 mov r2, #MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS - bl memset + bl memset_optimized /* optimized memset since r0 is 64-byte aligned */ PAGE_TABLE_SET SYS_MEM_BASE, KERNEL_VMM_BASE, KERNEL_VMM_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS @@ -431,6 +433,18 @@ _bootaddr_setup: bx lr +memset_optimized: + mov r3, r0 + vdup.8 q0, r1 + vmov q1, q0 + vmov q2, q0 + vmov q3, q0 +memset_optimized_loop: + subs r2, #64 + vstmia r3!, {d0 - d7} + bge memset_optimized_loop + bx lr + init_done: .long 0xDEADB00B