[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT RFC PATCH 2/5] plat/kvm: arm64: Enable the fp/simd at the starting point



Write the sys reg to enable the fp/simd feature, otherwise it will
cause floating point/simd exception when touching q0-q31.

Signed-off-by: Jia He <justin.he@xxxxxxx>
---
 plat/kvm/arm/entry64.S | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/plat/kvm/arm/entry64.S b/plat/kvm/arm/entry64.S
index 359a310..1e32268 100644
--- a/plat/kvm/arm/entry64.S
+++ b/plat/kvm/arm/entry64.S
@@ -36,6 +36,7 @@
 #include <kvm-arm/mm.h>
 #include <arm/cpu_defs.h>
 #include <uk/plat/common/sections.h>
+#include <uk/config.h>
 
 .global page_table_size
 .data
@@ -49,6 +50,13 @@ page_table_size:
 
 .text
 ENTRY(_libkvmplat_entry)
+#ifdef CONFIG_FLOAT_POINT
+       /* Enable fp/simd support */
+       ldr        x0, =(3 << 20)
+       msr        cpacr_el1, x0
+       isb
+#endif
+
        /* Calculate the image size */
        ldr x25, =_dtb
        ldr x26, =_end
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.