Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Add 26-bit and 32-bit types.h files, which indicate...



details:   https://anonhg.NetBSD.org/src/rev/619121806e7e
branches:  trunk
changeset: 517985:619121806e7e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Nov 22 17:59:57 2001 +0000

description:
Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>.  Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate.  Change all references to PROG26
and PROG32 to __PROG26 and __PROG32.  Eliminate the opt_progmode.h
header file.

diffstat:

 sys/arch/acorn32/include/types.h     |   4 +-
 sys/arch/arm/Makefile                |   4 +-
 sys/arch/arm/arm/arm_machdep.c       |   7 ++---
 sys/arch/arm/arm/compat_13_machdep.c |  10 +++----
 sys/arch/arm/arm/db_trace.c          |  10 +++----
 sys/arch/arm/arm/process_machdep.c   |  13 ++++-----
 sys/arch/arm/arm/sig_machdep.c       |   9 +++---
 sys/arch/arm/arm/undefined.c         |   9 +++---
 sys/arch/arm/conf/files.arm          |   4 +--
 sys/arch/arm/include/arm26/Makefile  |   8 ++++++
 sys/arch/arm/include/arm26/types.h   |  47 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/include/arm32/Makefile  |   4 +-
 sys/arch/arm/include/arm32/types.h   |  47 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/include/cpu.h           |  21 ++++-----------
 sys/arch/arm/include/db_machdep.h    |   5 +--
 sys/arch/arm26/arm26/db_interface.c  |   9 +++---
 sys/arch/arm26/include/types.h       |   4 +-
 sys/arch/arm32/include/types.h       |   4 +-
 sys/arch/cats/include/types.h        |   4 +-
 sys/arch/dnard/include/types.h       |   4 +-
 sys/arch/evbarm/include/types.h      |   4 +-
 sys/arch/hpcarm/include/types.h      |   4 +-
 sys/arch/netwinder/include/types.h   |   4 +-
 23 files changed, 160 insertions(+), 79 deletions(-)

diffs (truncated from 654 to 300 lines):

diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/acorn32/include/types.h
--- a/sys/arch/acorn32/include/types.h  Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/acorn32/include/types.h  Thu Nov 22 17:59:57 2001 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: types.h,v 1.1 2001/10/05 22:27:52 reinoud Exp $ */
+/* $NetBSD: types.h,v 1.2 2001/11/22 17:59:58 thorpej Exp $ */
 
 #ifndef _ARM32_TYPES_H_
 #define _ARM32_TYPES_H_
 
-#include <arm/types.h>
+#include <arm/arm32/types.h>
 
 #define __HAVE_DEVICE_REGISTER
 #define __HAVE_NWSCONS
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/Makefile
--- a/sys/arch/arm/Makefile     Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/Makefile     Thu Nov 22 17:59:57 2001 +0000
@@ -1,5 +1,5 @@
-#      $NetBSD: Makefile,v 1.2 2001/02/23 21:23:45 reinoud Exp $
+#      $NetBSD: Makefile,v 1.3 2001/11/22 17:59:58 thorpej Exp $
 
-SUBDIR=        include include/arm32
+SUBDIR=        include include/arm26 include/arm32
 
 .include <bsd.kinc.mk>
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/arm_machdep.c
--- a/sys/arch/arm/arm/arm_machdep.c    Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/arm_machdep.c    Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm_machdep.c,v 1.2 2001/07/28 12:29:58 chris Exp $    */
+/*     $NetBSD: arm_machdep.c,v 1.3 2001/11/22 17:59:58 thorpej Exp $  */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -37,11 +37,10 @@
  */
 
 #include "opt_compat_netbsd.h"
-#include "opt_progmode.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.2 2001/07/28 12:29:58 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.3 2001/11/22 17:59:58 thorpej Exp $");
 
 #include <sys/exec.h>
 #include <sys/proc.h>
@@ -71,7 +70,7 @@
        tf->tf_usr_lr = pack->ep_entry;
        tf->tf_svc_lr = 0x77777777;             /* Something we can see */
        tf->tf_pc = pack->ep_entry;
-#ifdef PROG32
+#ifdef __PROG32
        tf->tf_spsr = PSR_USR32_MODE;
 #endif
 
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/compat_13_machdep.c
--- a/sys/arch/arm/arm/compat_13_machdep.c      Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/compat_13_machdep.c      Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_13_machdep.c,v 1.3 2001/03/10 20:08:55 bjh21 Exp $      */
+/*     $NetBSD: compat_13_machdep.c,v 1.4 2001/11/22 17:59:59 thorpej Exp $    */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -36,11 +36,9 @@
  * SUCH DAMAGE.
  */
 
-#include "opt_progmode.h"
-
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.3 2001/03/10 20:08:55 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.4 2001/11/22 17:59:59 thorpej Exp $");
 
 #include <sys/systm.h>
 #include <sys/signalvar.h>
@@ -74,11 +72,11 @@
         * Make sure the processor mode has not been tampered with and
         * interrupts have not been disabled.
         */
-#ifdef PROG32
+#ifdef __PROG32
        if ((context.sc_spsr & PSR_MODE) != PSR_USR32_MODE ||
            (context.sc_spsr & (I32_bit | F32_bit)) != 0)
                return (EINVAL);
-#else /* PROG26 */
+#else /* __PROG26 */
        if ((context.sc_pc & R15_MODE) != R15_MODE_USR ||
            (context.sc_pc & (R15_IRQ_DISABLE | R15_FIQ_DISABLE)) != 0)
                return EINVAL;
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/db_trace.c
--- a/sys/arch/arm/arm/db_trace.c       Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/db_trace.c       Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.3 2001/11/09 16:49:29 thorpej Exp $     */
+/*     $NetBSD: db_trace.c,v 1.4 2001/11/22 17:59:59 thorpej Exp $     */
 
 /* 
  * Copyright (c) 2000, 2001 Ben Harris
@@ -31,7 +31,7 @@
 
 #include <sys/param.h>
 
-__RCSID("$NetBSD: db_trace.c,v 1.3 2001/11/09 16:49:29 thorpej Exp $");
+__RCSID("$NetBSD: db_trace.c,v 1.4 2001/11/22 17:59:59 thorpej Exp $");
 
 #include <sys/proc.h>
 #include <sys/user.h>
@@ -44,8 +44,6 @@
 #include <ddb/db_sym.h>
 #include <ddb/db_output.h>
 
-#include "opt_progmode.h"
- 
 #define INKERNEL(va)   (((vm_offset_t)(va)) >= VM_MIN_KERNEL_ADDRESS)
 
 /*
@@ -142,7 +140,7 @@
                 * In theory, the SCP isn't guaranteed to be in the function
                 * that generated the stack frame.  We hope for the best.
                 */
-#ifdef PROG26
+#ifdef __PROG26
                scp = frame[FR_SCP] & R15_PC;
 #else
                scp = frame[FR_SCP];
@@ -150,7 +148,7 @@
 
                db_printsym(scp, DB_STGY_PROC, pr);
                (*pr)("\n\t");
-#ifdef PROG26
+#ifdef __PROG26
                (*pr)("scp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV] & R15_PC);
                db_printsym(frame[FR_RLV] & R15_PC, DB_STGY_PROC, pr);
                (*pr)(")\n");
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/process_machdep.c
--- a/sys/arch/arm/arm/process_machdep.c        Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/process_machdep.c        Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.7 2001/10/27 16:48:50 rearnsha Exp $     */
+/*     $NetBSD: process_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $      */
 
 /*
  * Copyright (c) 1995 Frank Lancaster.  All rights reserved.
@@ -67,11 +67,10 @@
  */
 
 #include "opt_armfpe.h"
-#include "opt_progmode.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.7 2001/10/27 16:48:50 rearnsha Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $");
 
 #include <sys/proc.h>
 #include <sys/ptrace.h>
@@ -138,7 +137,7 @@
        bcopy((caddr_t)regs->r, (caddr_t)&tf->tf_r0, sizeof(regs->r));
        tf->tf_usr_sp = regs->r_sp;
        tf->tf_usr_lr = regs->r_lr;
-#ifdef PROG32
+#ifdef __PROG32
        tf->tf_pc = regs->r_pc;
        tf->tf_spsr &=  ~PSR_FLAGS;
        tf->tf_spsr |= regs->r_cpsr & PSR_FLAGS;
@@ -147,7 +146,7 @@
            && tf->tf_spsr & I32_bit)
                panic("process_write_regs: Interrupts blocked in user process");
 #endif
-#else /* PROG26 */
+#else /* __PROG26 */
        if ((regs->r_pc & (R15_MODE | R15_IRQ_DISABLE | R15_FIQ_DISABLE)) != 0)
                return EPERM;
 
@@ -175,9 +174,9 @@
        struct trapframe *tf = process_frame(p);
 
        KASSERT(tf != NULL);
-#ifdef PROG32
+#ifdef __PROG32
        tf->tf_pc = (int)addr;
-#else /* PROG26 */
+#else /* __PROG26 */
        /* Only set the PC, not the PSR */
        if (((register_t)addr & R15_PC) != (register_t)addr)
                return EINVAL;
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/sig_machdep.c
--- a/sys/arch/arm/arm/sig_machdep.c    Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/sig_machdep.c    Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sig_machdep.c,v 1.7 2001/08/07 22:56:09 bjh21 Exp $    */
+/*     $NetBSD: sig_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $  */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -41,11 +41,10 @@
  */
 
 #include "opt_compat_netbsd.h"
-#include "opt_progmode.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.7 2001/08/07 22:56:09 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.8 2001/11/22 17:59:59 thorpej Exp $");
 
 #include <sys/mount.h>         /* XXX only needed by syscallargs.h */
 #include <sys/proc.h>
@@ -205,11 +204,11 @@
         * Make sure the processor mode has not been tampered with and
         * interrupts have not been disabled.
         */
-#ifdef PROG32
+#ifdef __PROG32
        if ((context.sc_spsr & PSR_MODE) != PSR_USR32_MODE ||
            (context.sc_spsr & (I32_bit | F32_bit)) != 0)
                return (EINVAL);
-#else /* PROG26 */
+#else /* __PROG26 */
        if ((context.sc_pc & R15_MODE) != R15_MODE_USR ||
            (context.sc_pc & (R15_IRQ_DISABLE | R15_FIQ_DISABLE)) != 0)
                return EINVAL;
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/arm/undefined.c
--- a/sys/arch/arm/arm/undefined.c      Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/arm/undefined.c      Thu Nov 22 17:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: undefined.c,v 1.9 2001/10/18 21:26:21 bjh21 Exp $      */
+/*     $NetBSD: undefined.c,v 1.10 2001/11/22 17:59:59 thorpej Exp $   */
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -48,11 +48,10 @@
 
 #include "opt_cputypes.h"
 #include "opt_ddb.h"
-#include "opt_progmode.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.9 2001/10/18 21:26:21 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.10 2001/11/22 17:59:59 thorpej Exp $");
 
 #include <sys/malloc.h>
 #include <sys/queue.h>
@@ -172,7 +171,7 @@
        frame->tf_pc -= INSN_SIZE;
 #endif
 
-#ifdef PROG26
+#ifdef __PROG26
        fault_pc = frame->tf_r15 & R15_PC;
 #else
        fault_pc = frame->tf_pc;
@@ -210,7 +209,7 @@
        if ((p = curproc) == 0)
                p = &proc0;
 
-#ifdef PROG26
+#ifdef __PROG26
        if ((frame->tf_r15 & R15_MODE) == R15_MODE_USR) {
 #else
        if ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) {
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/conf/files.arm
--- a/sys/arch/arm/conf/files.arm       Thu Nov 22 14:22:30 2001 +0000
+++ b/sys/arch/arm/conf/files.arm       Thu Nov 22 17:59:57 2001 +0000
@@ -1,10 +1,8 @@
-#      $NetBSD: files.arm,v 1.41 2001/11/20 12:56:22 lukem Exp $
+#      $NetBSD: files.arm,v 1.42 2001/11/22 17:59:59 thorpej Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defopt ARM32
 
-# What mode are we running in?  These are mutually exclusive for now.
-defopt opt_progmode.h  PROG26 PROG32
 # CPU types
 defopt opt_cputypes.h  CPU_ARM2 CPU_ARM250 CPU_ARM3 : PROG26
 defopt opt_cputypes.h  CPU_ARM6 CPU_ARM7 CPU_ARM7TDMI CPU_ARM8
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/include/arm26/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/arm26/Makefile       Thu Nov 22 17:59:57 2001 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile,v 1.1 2001/11/22 17:59:57 thorpej Exp $
+
+KDIR=  /sys/arch/arm/include/arm26
+INCSDIR= /usr/include/arm/arm26
+
+INCS=  types.h
+
+.include <bsd.kinc.mk>
diff -r 5a8e6c5970fb -r 619121806e7e sys/arch/arm/include/arm26/types.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/arm26/types.h        Thu Nov 22 17:59:57 2001 +0000
@@ -0,0 +1,47 @@
+/*     $NetBSD: types.h,v 1.1 2001/11/22 17:59:57 thorpej Exp $        */
+
+/*



Home | Main Index | Thread Index | Old Index