Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm Move the ARM, Ltd. floating point emulator to a...



details:   https://anonhg.NetBSD.org/src/rev/305e50f48f18
branches:  trunk
changeset: 518078:305e50f48f18
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Nov 24 01:26:23 2001 +0000

description:
Move the ARM, Ltd. floating point emulator to arch/arm.

diffstat:

 sys/arch/arm/arm/process_machdep.c |     8 +-
 sys/arch/arm/arm32/cpu.c           |     6 +-
 sys/arch/arm/arm32/vm_machdep.c    |     4 +-
 sys/arch/arm/conf/files.arm        |     9 +-
 sys/arch/arm/fpe-arm/armfpe.h      |   140 +
 sys/arch/arm/fpe-arm/armfpe.s      |  7520 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/fpe-arm/armfpe_glue.S |   475 ++
 sys/arch/arm/fpe-arm/armfpe_init.c |   277 +
 8 files changed, 8427 insertions(+), 12 deletions(-)

diffs (truncated from 8521 to 300 lines):

diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/arm/process_machdep.c
--- a/sys/arch/arm/arm/process_machdep.c        Sat Nov 24 01:16:54 2001 +0000
+++ b/sys/arch/arm/arm/process_machdep.c        Sat Nov 24 01:26:23 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $      */
+/*     $NetBSD: process_machdep.c,v 1.9 2001/11/24 01:26:23 thorpej Exp $      */
 
 /*
  * Copyright (c) 1995 Frank Lancaster.  All rights reserved.
@@ -70,7 +70,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.9 2001/11/24 01:26:23 thorpej Exp $");
 
 #include <sys/proc.h>
 #include <sys/ptrace.h>
@@ -84,8 +84,8 @@
 #include <arm/armreg.h>
 
 #ifdef ARMFPE
-#include <arm32/fpe-arm/armfpe.h>
-#endif /* ARMFPE */
+#include <arm/fpe-arm/armfpe.h>
+#endif
 
 static __inline struct trapframe *
 process_frame(struct proc *p)
diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/arm32/cpu.c
--- a/sys/arch/arm/arm32/cpu.c  Sat Nov 24 01:16:54 2001 +0000
+++ b/sys/arch/arm/arm32/cpu.c  Sat Nov 24 01:26:23 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.10 2001/11/23 21:18:30 thorpej Exp $ */
+/*     $NetBSD: cpu.c,v 1.11 2001/11/24 01:26:24 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -58,8 +58,8 @@
 
 #ifdef ARMFPE
 #include <machine/bootconfig.h> /* For boot args */
-#include <arm32/fpe-arm/armfpe.h>
-#endif /* ARMFPE */
+#include <arm/fpe-arm/armfpe.h>
+#endif
 
 cpu_t cpus[MAX_CPUS];
 
diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/arm32/vm_machdep.c
--- a/sys/arch/arm/arm32/vm_machdep.c   Sat Nov 24 01:16:54 2001 +0000
+++ b/sys/arch/arm/arm32/vm_machdep.c   Sat Nov 24 01:26:23 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.9 2001/11/19 20:38:58 chris Exp $     */
+/*     $NetBSD: vm_machdep.c,v 1.10 2001/11/24 01:26:24 thorpej Exp $  */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -64,7 +64,7 @@
 #include <machine/vmparam.h>
 
 #ifdef ARMFPE
-#include <arm32/fpe-arm/armfpe.h>
+#include <arm/fpe-arm/armfpe.h>
 #endif
 
 extern pv_addr_t systempage;
diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/conf/files.arm
--- a/sys/arch/arm/conf/files.arm       Sat Nov 24 01:16:54 2001 +0000
+++ b/sys/arch/arm/conf/files.arm       Sat Nov 24 01:26:23 2001 +0000
@@ -1,16 +1,19 @@
-#      $NetBSD: files.arm,v 1.42 2001/11/22 17:59:59 thorpej Exp $
+#      $NetBSD: files.arm,v 1.43 2001/11/24 01:26:24 thorpej Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defopt ARM32
 
 # CPU types
-defopt opt_cputypes.h  CPU_ARM2 CPU_ARM250 CPU_ARM3 : PROG26
+defopt opt_cputypes.h  CPU_ARM2 CPU_ARM250 CPU_ARM3
 defopt opt_cputypes.h  CPU_ARM6 CPU_ARM7 CPU_ARM7TDMI CPU_ARM8
                        CPU_ARM9 CPU_SA110 CPU_SA1100 CPU_SA1110
-                       CPU_XSCALE : PROG32
+                       CPU_XSCALE
 
 # Floating point emulator
 defopt ARMFPE
+file   arch/arm/fpe-arm/armfpe_glue.S          armfpe
+file   arch/arm/fpe-arm/armfpe_init.c          armfpe
+file   arch/arm/fpe-arm/armfpe.s               armfpe
 
 # PMAP_DEBUG (heavily abused option)
 defopt PMAP_DEBUG
diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/fpe-arm/armfpe.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/fpe-arm/armfpe.h     Sat Nov 24 01:26:23 2001 +0000
@@ -0,0 +1,140 @@
+/*     $NetBSD: armfpe.h,v 1.1 2001/11/24 01:26:24 thorpej Exp $       */
+
+/*
+ * Copyright (c) 1995 Neil A Carson.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ * This product includes software developed by Brini.
+ * 4. The name of the company nor the name of the author may be used to
+ *    endorse or promote products derived from this software without specific
+ *    prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * RiscBSD kernel project
+ *
+ * armfpe.h
+ *
+ * Details of functions and structures needed for ARM FP cor
+ * support in RiscBSD
+ *
+ * Created      : 04/01/96
+ */
+
+#ifndef _ARMFPE_H_
+#define _ARMFPE_H_
+
+#include <arm/cpus.h>
+#include <machine/fp.h>
+#include <machine/ieeefp.h>
+#include <machine/reg.h>
+
+#ifdef _KERNEL
+
+/*
+ * Type for a saved FP context, if we want to translate the context to a
+ * user-readable form
+ */
+ 
+typedef struct fp_context_frame {
+       u_int32_t fpsr;
+       fp_extended_precision_t regs[8];
+} fp_context_frame_t;
+
+/* Define a structure that overlays the start of the core */
+
+typedef struct {
+       /*
+        * Addresses of procedures/functions
+        */
+
+       u_int32_t core_abort_addr;
+       u_int32_t core_initws_addr;
+       u_int32_t core_initcontext_addr;
+       u_int32_t core_changecontext_addr;
+       u_int32_t core_shutdown_addr;
+       u_int32_t core_activatecontext_addr;
+       u_int32_t core_deactivatecontext_addr;
+       u_int32_t core_savecontext_addr;
+       u_int32_t core_loadcontext_addr;
+       u_int32_t core_disable_addr;
+       u_int32_t core_enable_addr;
+
+       /*
+        * Addresses of things that need to be filled in by the kernel on startup
+        */
+
+       u_int32_t *main_ws_ptr_addr;
+       u_int32_t *local_handler_ptr_addr;
+       u_int32_t *old_handler_ptr_addr;
+       u_int32_t *exc_handler_ptr_addr;
+       u_int32_t *fp_post_proc_addr;
+
+       /*
+        * Constants that the kernel needs
+        */
+
+       u_int32_t workspacelength;
+       u_int32_t contextlength;
+
+       /*
+        * Data pointers for extra information
+        */
+       u_char *core_identity_addr;
+
+} arm_fpe_mod_hdr_t;
+
+/* macro to return the FP context for a process */
+
+#define FP_CONTEXT(p) ((u_int)(((u_char *)(p)->p_addr) + sizeof(struct user)))
+
+/* Prototypes */
+
+int arm_fpe_boot       __P((cpu_t *cpu));
+int initialise_arm_fpe __P((cpu_t *cpu));
+void arm_fpe_postproc  __P((u_int fpframe, struct trapframe *frame));
+void arm_fpe_exception __P((int exception, u_int fpframe, struct trapframe *frame));
+
+void arm_fpe_core_disable      __P((void));
+void arm_fpe_core_enable       __P((void));
+u_int arm_fpe_core_initws      __P((u_int workspace, int handler1, int handler2));
+u_int arm_fpe_core_abort       __P((u_int context, int r12, int pc));
+void arm_fpe_core_initcontext  __P((u_int context));
+u_int arm_fpe_core_changecontext       __P((u_int context));
+void arm_fpe_core_shutdown             __P((void));
+void arm_fpe_core_activatecontext      __P((u_int context));
+u_int arm_fpe_core_deactivatecontext   __P((void));
+u_int arm_fpe_core_savecontext __P((u_int context, fp_context_frame_t *savearea, int pc));
+void arm_fpe_core_loadcontext  __P((u_int context, fp_context_frame_t *loadarea));
+void arm_fpe_copycontext       __P((u_int c1, u_int c2));
+void arm_fpe_getcontext                __P((struct proc *p, struct fpreg *fpregs));
+void arm_fpe_setcontext                __P((struct proc *p, struct fpreg *fpregs));
+
+void arm_fpe_exception_glue    __P((int exception));
+void arm_fpe_panic             __P((void));
+void undefined_entry           __P((void));
+void arm_fpe_post_proc_glue    __P((void));
+void arm_fpe_set_exception_mask        __P((fp_except));
+
+#endif /* _KERNEL */
+#endif /* _ARMFPE_H_ */
diff -r 77e6c09ca2f2 -r 305e50f48f18 sys/arch/arm/fpe-arm/armfpe.s
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/fpe-arm/armfpe.s     Sat Nov 24 01:26:23 2001 +0000
@@ -0,0 +1,7520 @@
+/*     $NetBSD: armfpe.s,v 1.1 2001/11/24 01:26:24 thorpej Exp $       */
+
+/*
+ * Copyright (c) 1996 Neil A Carson.
+ * Copyright (c) 1996 Advanced Risc Machines Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the RiscBSD kernel team.
+ *      This product includes software developed by Advanced Risc Machines
+ *      Ltd.
+ * 4. The name of the company nor the name of the author may be used to
+ *    endorse or promote products derived from this software without specific
+ *    prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * RiscBSD kernel project
+ *
+ * armfpe.s
+ *
+ * ARM FPE core
+ *
+ * Created      : 03/08/96
+ */
+
+/*
+ * DO NOT MODIFY - THIS FILE IS AUTOMATICALLY GENERATED
+ */
+
+/* Generated from kernelfpe by ftv@voyager */
+
+       .text
+
+       .global _fpe_arm_start  /* ARM FPE start address */
+_fpe_arm_start:
+
+       .global _fpe_arm_header /* ARM FPE header address */
+_fpe_arm_header:
+



Home | Main Index | Thread Index | Old Index