Adding ARM VFP V2 support

This commit is contained in:
Kevin Kirspel
2017-01-24 09:40:31 -05:00
committed by Sebastian Huber
parent 29e08d41f4
commit b43c2e8952
2 changed files with 10 additions and 0 deletions

4
c/src/lib/libbsp/arm/shared/start/start.S Normal file → Executable file
View File

@@ -274,6 +274,7 @@ bsp_start_skip_hyp_svc_switch:
/* Stay in SVC mode */
#ifdef ARM_MULTILIB_VFP
#ifdef ARM_MULTILIB_HAS_CPACR
/* Read CPACR */
mrc p15, 0, r0, c1, c0, 2
@@ -289,6 +290,7 @@ bsp_start_skip_hyp_svc_switch:
/* Write CPACR */
mcr p15, 0, r0, c1, c0, 2
isb
#endif
/* Enable FPU */
mov r0, #(1 << 30)
@@ -408,6 +410,7 @@ _start:
#endif
#ifdef ARM_MULTILIB_VFP
#ifdef ARM_MULTILIB_HAS_CPACR
/*
* Enable CP10 and CP11 coprocessors for privileged and user mode in
* CPACR (bits 20-23). Ensure that write to register completes.
@@ -418,6 +421,7 @@ _start:
str r1, [r0]
dsb
isb
#endif
#ifdef BSP_START_NEEDS_REGISTER_INITIALIZATION
bl bsp_start_init_registers_vfp

6
cpukit/score/cpu/arm/rtems/score/arm.h Normal file → Executable file
View File

@@ -58,6 +58,12 @@ extern "C" {
#define ARM_MULTILIB_CACHE_LINE_MAX_64
#endif
#if defined(__ARM_ARCH_7A__) \
|| defined(__ARM_ARCH_7M__) \
|| defined(__ARM_ARCH_7EM__)
#define ARM_MULTILIB_HAS_CPACR
#endif
#if !defined(__SOFTFP__)
#if defined(__ARM_NEON__)
#define ARM_MULTILIB_VFP_D32