forked from Imagelibrary/rtems
Adding ARM VFP V2 support
This commit is contained in:
committed by
Sebastian Huber
parent
29e08d41f4
commit
b43c2e8952
4
c/src/lib/libbsp/arm/shared/start/start.S
Normal file → Executable file
4
c/src/lib/libbsp/arm/shared/start/start.S
Normal file → Executable file
@@ -274,6 +274,7 @@ bsp_start_skip_hyp_svc_switch:
|
|||||||
/* Stay in SVC mode */
|
/* Stay in SVC mode */
|
||||||
|
|
||||||
#ifdef ARM_MULTILIB_VFP
|
#ifdef ARM_MULTILIB_VFP
|
||||||
|
#ifdef ARM_MULTILIB_HAS_CPACR
|
||||||
/* Read CPACR */
|
/* Read CPACR */
|
||||||
mrc p15, 0, r0, c1, c0, 2
|
mrc p15, 0, r0, c1, c0, 2
|
||||||
|
|
||||||
@@ -289,6 +290,7 @@ bsp_start_skip_hyp_svc_switch:
|
|||||||
/* Write CPACR */
|
/* Write CPACR */
|
||||||
mcr p15, 0, r0, c1, c0, 2
|
mcr p15, 0, r0, c1, c0, 2
|
||||||
isb
|
isb
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enable FPU */
|
/* Enable FPU */
|
||||||
mov r0, #(1 << 30)
|
mov r0, #(1 << 30)
|
||||||
@@ -408,6 +410,7 @@ _start:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_MULTILIB_VFP
|
#ifdef ARM_MULTILIB_VFP
|
||||||
|
#ifdef ARM_MULTILIB_HAS_CPACR
|
||||||
/*
|
/*
|
||||||
* Enable CP10 and CP11 coprocessors for privileged and user mode in
|
* Enable CP10 and CP11 coprocessors for privileged and user mode in
|
||||||
* CPACR (bits 20-23). Ensure that write to register completes.
|
* CPACR (bits 20-23). Ensure that write to register completes.
|
||||||
@@ -418,6 +421,7 @@ _start:
|
|||||||
str r1, [r0]
|
str r1, [r0]
|
||||||
dsb
|
dsb
|
||||||
isb
|
isb
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BSP_START_NEEDS_REGISTER_INITIALIZATION
|
#ifdef BSP_START_NEEDS_REGISTER_INITIALIZATION
|
||||||
bl bsp_start_init_registers_vfp
|
bl bsp_start_init_registers_vfp
|
||||||
|
|||||||
6
cpukit/score/cpu/arm/rtems/score/arm.h
Normal file → Executable file
6
cpukit/score/cpu/arm/rtems/score/arm.h
Normal file → Executable file
@@ -58,6 +58,12 @@ extern "C" {
|
|||||||
#define ARM_MULTILIB_CACHE_LINE_MAX_64
|
#define ARM_MULTILIB_CACHE_LINE_MAX_64
|
||||||
#endif
|
#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(__SOFTFP__)
|
||||||
#if defined(__ARM_NEON__)
|
#if defined(__ARM_NEON__)
|
||||||
#define ARM_MULTILIB_VFP_D32
|
#define ARM_MULTILIB_VFP_D32
|
||||||
|
|||||||
Reference in New Issue
Block a user