Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/vfp If we can't enable VFP/VFP2 via the CPACCES...
details: https://anonhg.NetBSD.org/src/rev/0933384189f7
branches: trunk
changeset: 791972:0933384189f7
user: matt <matt%NetBSD.org@localhost>
date: Sat Dec 14 15:47:18 2013 +0000
description:
If we can't enable VFP/VFP2 via the CPACCESS register, bail since there
isn't a VFP.
diffstat:
sys/arch/arm/vfp/vfp_init.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 7832b07194ac -r 0933384189f7 sys/arch/arm/vfp/vfp_init.c
--- a/sys/arch/arm/vfp/vfp_init.c Sat Dec 14 10:30:50 2013 +0000
+++ b/sys/arch/arm/vfp/vfp_init.c Sat Dec 14 15:47:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfp_init.c,v 1.27 2013/11/18 18:02:01 matt Exp $ */
+/* $NetBSD: vfp_init.c,v 1.28 2013/12/14 15:47:18 matt Exp $ */
/*
* Copyright (c) 2008 ARM Ltd
@@ -261,7 +261,6 @@
{
struct cpu_info * const ci = curcpu();
const char *model = NULL;
- bool vfp_p = false;
if (CPU_ID_ARM11_P(curcpu()->ci_arm_cpuid)
|| CPU_ID_CORTEX_P(curcpu()->ci_arm_cpuid)) {
@@ -289,8 +288,14 @@
* If we could enable them, then they exist.
*/
cpacr = armreg_cpacr_read();
- vfp_p = __SHIFTOUT(cpacr, cpacr_vfp2) != CPACR_NOACCESS
+ bool vfp_p = __SHIFTOUT(cpacr, cpacr_vfp2) != CPACR_NOACCESS
|| __SHIFTOUT(cpacr, cpacr_vfp) != CPACR_NOACCESS;
+ if (!vfp_p) {
+ aprint_normal_dev(ci->ci_dev, "No VFP detected\n");
+ install_coproc_handler(VFP_COPROC, vfp_fpscr_handler);
+ ci->ci_vfp_id = 0;
+ return;
+ }
}
void *uh = install_coproc_handler(VFP_COPROC, vfp_test);
Home |
Main Index |
Thread Index |
Old Index