Module Name:    src
Committed By:   matt
Date:           Mon Jan 28 23:49:13 UTC 2013

Modified Files:
        src/sys/arch/arm/arm32: arm32_machdep.c
        src/sys/arch/arm/include: cpu.h
        src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Add a machdep.fpu_present sysctl for ld.elf_so to use in ld.so.conf to load
libc_vfp.so.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/include/cpu.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/vfp/vfp_init.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.89 src/sys/arch/arm/arm32/arm32_machdep.c:1.90
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.89	Sat Jan 19 10:16:56 2013
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Mon Jan 28 23:49:12 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.89 2013/01/19 10:16:56 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.90 2013/01/28 23:49:12 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.89 2013/01/19 10:16:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.90 2013/01/28 23:49:12 matt Exp $");
 
 #include "opt_modular.h"
 #include "opt_md.h"
@@ -97,6 +97,7 @@ void *	msgbufaddr;
 extern paddr_t msgbufphys;
 
 int kernel_debug = 0;
+int cpu_fpu_present;
 
 /* exported variable to be filled in by the bootloaders */
 char *booted_kernel;
@@ -360,6 +361,11 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysc
 		       CTLTYPE_INT, "powersave", NULL,
 		       sysctl_machdep_powersave, 0, &cpu_do_powersave, 0,
 		       CTL_MACHDEP, CPU_POWERSAVE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		       CTLFLAG_PERMANENT|CTLFLAG_READONLY,
+		       CTLTYPE_INT, "fpu_present", NULL,
+		       NULL, 0, &cpu_fpu_present, 0,
+		       CTL_MACHDEP, CTL_CREATE, CTL_EOL);
 }
 
 void

Index: src/sys/arch/arm/include/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.74 src/sys/arch/arm/include/cpu.h:1.75
--- src/sys/arch/arm/include/cpu.h:1.74	Wed Dec 26 18:32:41 2012
+++ src/sys/arch/arm/include/cpu.h	Mon Jan 28 23:49:12 2013
@@ -85,6 +85,7 @@
 #ifndef _LOCORE
 /* 1 == use cpu_sleep(), 0 == don't */
 extern int cpu_do_powersave;
+extern int cpu_fpu_present;
 #endif
 
 #ifdef _LOCORE

Index: src/sys/arch/arm/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.16 src/sys/arch/arm/vfp/vfp_init.c:1.17
--- src/sys/arch/arm/vfp/vfp_init.c:1.16	Mon Jan 28 06:14:45 2013
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Jan 28 23:49:13 2013
@@ -1,4 +1,4 @@
-/*      $NetBSD: vfp_init.c,v 1.16 2013/01/28 06:14:45 matt Exp $ */
+/*      $NetBSD: vfp_init.c,v 1.17 2013/01/28 23:49:13 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -382,6 +382,7 @@ vfp_attach(void)
 		return;
 	}
 
+	cpu_fpu_present = 1;
 	if (fpsid != 0) {
 		aprint_normal("vfp%d at %s: %s\n",
 		    device_unit(curcpu()->ci_dev), device_xname(curcpu()->ci_dev),

Reply via email to