summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-08-13 16:29:04 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-08-13 16:29:04 +0100
commitfd86bdc7a00bb8ed736fff3efe331be2fcdf78ba (patch)
treef80ba8b934617ce320a1d69c94727209a03e87f4
parent9e63052ee30722dc9ce03331092e68b31444970c (diff)
semihosting tests: enable FPU for system tests
Enable the FPU in the startup code for system emulation tests. This is necessary for the A64 test in particular and a good idea for A32/T32. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--start.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/start.S b/start.S
index 1bc0c9c..6fa6769 100644
--- a/start.S
+++ b/start.S
@@ -27,11 +27,15 @@
.globl start
start:
# We assume uniprocessor.
- # TODO: enable floating point??
#ifndef __aarch64__
# Set up a stack
ldr sp, =stacktop
+
+ # Turn on the FPU
+ mov r0, 0xf00000
+ mcr p15, 0, r0, c1, c0, 2
+
bl main
bl semi_exit
# not reached
@@ -42,6 +46,11 @@ start:
# Set up a stack
ldr x0, =stacktop
mov sp, x0
+
+ # Turn on the FPU
+ mov x0, 0x300000
+ msr CPACR_EL1, x0
+
bl main
bl semi_exit
# not reached