summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-08 09:30:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-10 12:10:14 +0200
commitcfd8d7a3d73a10ae7cdbbfe5eb39839c46a5c77e (patch)
tree5b694eb680b61129908a274b218d5f67fa0d34d6 /c
parentarm: Simplify architecture selection (diff)
downloadrtems-cfd8d7a3d73a10ae7cdbbfe5eb39839c46a5c77e.tar.bz2
arm: Support VFP-D32 and Neon
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/arm/realview-pbx-a9/make/custom/realview_pbx_a9_qemu.cfg2
-rw-r--r--c/src/lib/libbsp/arm/shared/start/start.S20
-rw-r--r--c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq_a9_qemu.cfg2
3 files changed, 22 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/arm/realview-pbx-a9/make/custom/realview_pbx_a9_qemu.cfg b/c/src/lib/libbsp/arm/realview-pbx-a9/make/custom/realview_pbx_a9_qemu.cfg
index fbee00144b..5b63eeddee 100644
--- a/c/src/lib/libbsp/arm/realview-pbx-a9/make/custom/realview_pbx_a9_qemu.cfg
+++ b/c/src/lib/libbsp/arm/realview-pbx-a9/make/custom/realview_pbx_a9_qemu.cfg
@@ -2,6 +2,6 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -mcpu=cortex-a9 -mthumb
+CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9
CFLAGS_OPTIMIZE_V ?= -O0 -g
diff --git a/c/src/lib/libbsp/arm/shared/start/start.S b/c/src/lib/libbsp/arm/shared/start/start.S
index cb91d41494..e79a5fc503 100644
--- a/c/src/lib/libbsp/arm/shared/start/start.S
+++ b/c/src/lib/libbsp/arm/shared/start/start.S
@@ -154,6 +154,26 @@ _start:
/* Stay in SVC mode */
+#ifdef ARM_MULTILIB_VFP_D32
+ /* Read CPACR */
+ mrc p15, 0, r0, c1, c0, 2
+
+ /* Enable CP10 and CP11 */
+ orr r0, r0, #(1 << 20)
+ orr r0, r0, #(1 << 22)
+
+ /* Clear ASEDIS and D32DIS */
+ bic r0, r0, #(3 << 30)
+
+ /* Write CPACR */
+ mcr p15, 0, r0, c1, c0, 2
+ isb
+
+ /* Enable FPU */
+ mov r0, #(1 << 30)
+ vmsr FPEXC, r0
+#endif
+
/*
* Branch to start hook 0.
*
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq_a9_qemu.cfg b/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq_a9_qemu.cfg
index fbee00144b..5b63eeddee 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq_a9_qemu.cfg
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq_a9_qemu.cfg
@@ -2,6 +2,6 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -mcpu=cortex-a9 -mthumb
+CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9
CFLAGS_OPTIMIZE_V ?= -O0 -g