Module: xenomai-2.6
Branch: master
Commit: 7709acb082cb2f357a5b4e408b8b5d353f8b437d
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=7709acb082cb2f357a5b4e408b8b5d353f8b437d

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Jan  9 13:23:32 2014 +0100

hal/arm: avoid using VFP instructions on SOCs without VFP

---

 doc/asciidoc/TROUBLESHOOTING.adoc |   15 +++++++++++++++
 ksrc/arch/arm/hal.c               |   12 +++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/doc/asciidoc/TROUBLESHOOTING.adoc 
b/doc/asciidoc/TROUBLESHOOTING.adoc
index 433be63..71edd57 100644
--- a/doc/asciidoc/TROUBLESHOOTING.adoc
+++ b/doc/asciidoc/TROUBLESHOOTING.adoc
@@ -243,6 +243,21 @@ IMPORTANT: Disabling +AMD K8 Cool&Quiet+ option in a BIOS 
does not
 solve the problem.
 
 
+On ARM
+^^^^^^
+
+If you see the following message:
+
+----------------------------------------------------------------
+Xenomai: hal/arm: hardware FPU support enabled but not available
+----------------------------------------------------------------
+
+It means that you enabled CONFIG_VFP and CONFIG_XENO_HW_FPU in the
+kernel configuration, but the processor on which you are running the
+kernel has no support for VFP. In that case, you have to recompile the
+kernel with CONFIG_XENO_HW_FPU disabled.
+
+
 On other supported platforms
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/ksrc/arch/arm/hal.c b/ksrc/arch/arm/hal.c
index 2a48012..f0d683c 100644
--- a/ksrc/arch/arm/hal.c
+++ b/ksrc/arch/arm/hal.c
@@ -538,7 +538,17 @@ RTHAL_DECLARE_DOMAIN(rthal_domain_entry);
 
 int rthal_arch_init(void)
 {
-       int ret = rthal_tickdev_select();
+       int ret;
+
+#if defined(CONFIG_XENO_HW_FPU) && defined(CONFIG_VFP)
+       if ((elf_hwcap & HWCAP_VFP) == 0) {
+               printk(KERN_ERR "Xenomai: hal/arm: hardware FPU support enabled"
+                       " but not available\n");
+               return -ENODEV;
+       }
+#endif /* CONFIG_VFP && CONFIG_XENO_OPT_HW_FPU */
+
+       ret = rthal_tickdev_select();
        if (ret < 0)
                return ret;
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to