File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
libc/startup/baremetal/arm Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,16 @@ namespace LIBC_NAMESPACE_DECL {
134134#ifdef __ARM_FP
135135// Enable FPU
136136#if __ARM_ARCH_PROFILE == 'M'
137+ // Based on
138+ // https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/Floating-Point-Unit/Enabling-the-FPU
137139 // Set CPACR cp10 and cp11
138140 auto cpacr = (volatile uint32_t *const )0xE000ED88 ;
139141 *cpacr |= (0xF << 20 );
140142 __dsb (0xF );
141143 __isb (0xF );
142144#elif __ARM_ARCH_PROFILE == 'A' || __ARM_ARCH_PROFILE == 'R'
145+ // Based on
146+ // https://developer.arm.com/documentation/dui0472/m/Compiler-Coding-Practices/Enabling-NEON-and-FPU-for-bare-metal
143147 // Set CPACR cp10 and cp11
144148 uint32_t cpacr = __arm_rsr (" p15:0:c1:c0:2" );
145149 cpacr |= (0xF << 20 );
You can’t perform that action at this time.
0 commit comments