Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Big patch for merging common include files of the n...



details:   https://anonhg.NetBSD.org/src/rev/9c3f0379bdeb
branches:  trunk
changeset: 504148:9c3f0379bdeb
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Feb 23 21:23:45 2001 +0000

description:
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.

diffstat:

 sys/arch/arm/Makefile                    |    4 +-
 sys/arch/arm/conf/files.arm              |    6 +-
 sys/arch/arm/include/arm32/Makefile      |    8 +
 sys/arch/arm/include/arm32/bus.h         |  793 +++++++++++++++++++++++++++++++
 sys/arch/arm/include/arm32/frame.h       |  201 +++++++
 sys/arch/arm/include/arm32/katelib.h     |  111 ++++
 sys/arch/arm/include/arm32/param.h       |  191 +++++++
 sys/arch/arm/include/arm32/pcb.h         |   79 +++
 sys/arch/arm/include/arm32/pmap.h        |  189 +++++++
 sys/arch/arm/include/arm32/psl.h         |  108 ++++
 sys/arch/arm/include/arm32/rtc.h         |   83 +++
 sys/arch/arm/include/arm32/sysarch.h     |   56 ++
 sys/arch/arm/include/cpu.h               |  316 ++++++++++++
 sys/arch/arm/include/cpufunc.h           |  318 ++++++++++++
 sys/arch/arm/include/cpus.h              |  146 +++++
 sys/arch/arm/include/db_machdep.h        |  105 ++++
 sys/arch/arm/include/ipkdb.h             |   45 +
 sys/arch/arm/include/isa_machdep.h       |  182 +++++++
 sys/arch/arm/include/isapnp_machdep.h    |   46 +
 sys/arch/arm/include/ofisa_machdep.h     |   86 +++
 sys/arch/arm/include/ofw.h               |   71 ++
 sys/arch/arm/include/pci_machdep.h       |   99 +++
 sys/arch/arm/include/pio.h               |   46 +
 sys/arch/arm/include/proc.h              |   45 +
 sys/arch/arm/include/profile.h           |   79 +++
 sys/arch/arm/include/profileio.h         |  195 +++++++
 sys/arch/arm/include/pte.h               |  124 ++++
 sys/arch/arm/include/types.h             |   81 +++
 sys/arch/arm/include/undefined.h         |   63 ++
 sys/arch/arm32/conf/std.arm32            |    5 +-
 sys/arch/arm32/include/bus.h             |  793 +------------------------------
 sys/arch/arm32/include/cpu.h             |  314 +------------
 sys/arch/arm32/include/cpufunc.h         |  318 +------------
 sys/arch/arm32/include/cpus.h            |  146 +-----
 sys/arch/arm32/include/db_machdep.h      |  105 +----
 sys/arch/arm32/include/frame.h           |  202 +-------
 sys/arch/arm32/include/ipkdb.h           |   45 +-
 sys/arch/arm32/include/isa_machdep.h     |  183 +-------
 sys/arch/arm32/include/isapnp_machdep.h  |   46 +-
 sys/arch/arm32/include/katelib.h         |  111 +----
 sys/arch/arm32/include/ofisa_machdep.h   |   87 +---
 sys/arch/arm32/include/param.h           |  185 +-------
 sys/arch/arm32/include/pcb.h             |   79 +---
 sys/arch/arm32/include/pci_machdep.h     |  100 +---
 sys/arch/arm32/include/pio.h             |   47 +-
 sys/arch/arm32/include/pmap.h            |  189 +-------
 sys/arch/arm32/include/proc.h            |   46 +-
 sys/arch/arm32/include/profile.h         |   80 +---
 sys/arch/arm32/include/profileio.h       |  196 +-------
 sys/arch/arm32/include/psl.h             |  108 +----
 sys/arch/arm32/include/pte.h             |  125 +----
 sys/arch/arm32/include/rtc.h             |   84 +---
 sys/arch/arm32/include/sysarch.h         |   56 +--
 sys/arch/arm32/include/types.h           |   82 +---
 sys/arch/arm32/include/undefined.h       |   64 +--
 sys/arch/hpcarm/conf/std.hpcarm          |    5 +-
 sys/arch/hpcarm/include/bus.h            |  793 +------------------------------
 sys/arch/hpcarm/include/cpu.h            |  295 +-----------
 sys/arch/hpcarm/include/cpufunc.h        |  270 +----------
 sys/arch/hpcarm/include/cpus.h           |  148 +-----
 sys/arch/hpcarm/include/db_machdep.h     |  105 +----
 sys/arch/hpcarm/include/endian_machdep.h |    4 +-
 sys/arch/hpcarm/include/frame.h          |  202 +-------
 sys/arch/hpcarm/include/katelib.h        |  111 +----
 sys/arch/hpcarm/include/param.h          |  185 +-------
 sys/arch/hpcarm/include/pcb.h            |   79 +---
 sys/arch/hpcarm/include/pmap.h           |  189 +-------
 sys/arch/hpcarm/include/proc.h           |   46 +-
 sys/arch/hpcarm/include/psl.h            |  108 +----
 sys/arch/hpcarm/include/pte.h            |  125 +----
 sys/arch/hpcarm/include/ptrace.h         |   42 +-
 sys/arch/hpcarm/include/reg.h            |   55 +--
 sys/arch/hpcarm/include/rtc.h            |   84 +---
 sys/arch/hpcarm/include/sysarch.h        |   56 +--
 sys/arch/hpcarm/include/types.h          |   82 +---
 sys/arch/hpcarm/include/undefined.h      |   64 +--
 76 files changed, 3971 insertions(+), 6749 deletions(-)

diffs (truncated from 11110 to 300 lines):

diff -r f1c5af8ba9a3 -r 9c3f0379bdeb sys/arch/arm/Makefile
--- a/sys/arch/arm/Makefile     Fri Feb 23 21:16:19 2001 +0000
+++ b/sys/arch/arm/Makefile     Fri Feb 23 21:23:45 2001 +0000
@@ -1,5 +1,5 @@
-#      $NetBSD: Makefile,v 1.1 2001/01/10 18:23:02 bjh21 Exp $
+#      $NetBSD: Makefile,v 1.2 2001/02/23 21:23:45 reinoud Exp $
 
-SUBDIR=        include
+SUBDIR=        include include/arm32
 
 .include <bsd.kinc.mk>
diff -r f1c5af8ba9a3 -r 9c3f0379bdeb sys/arch/arm/conf/files.arm
--- a/sys/arch/arm/conf/files.arm       Fri Feb 23 21:16:19 2001 +0000
+++ b/sys/arch/arm/conf/files.arm       Fri Feb 23 21:23:45 2001 +0000
@@ -1,5 +1,9 @@
-#      $NetBSD: files.arm,v 1.8 2001/02/13 22:54:25 bjh21 Exp $
+#      $NetBSD: files.arm,v 1.9 2001/02/23 21:23:46 reinoud Exp $
 
+# temporary define to allow easy moving to ../arch/arm/arm32
+defopt ARM32
+
+# generic networking files
 file   arch/arm/arm/in_cksum_arm.c             inet
 file   netinet/in4_cksum.c                     inet
 file   netns/ns_cksum.c                        ns
diff -r f1c5af8ba9a3 -r 9c3f0379bdeb sys/arch/arm/include/arm32/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/arm32/Makefile       Fri Feb 23 21:23:45 2001 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile,v 1.1 2001/02/23 21:23:49 reinoud Exp $
+
+KDIR=  /sys/arch/arm/include/arm32
+INCSDIR= /usr/include/arm/arm32
+
+INCS=  bus.h katelib.h pcb.h psl.h sysarch.h frame.h param.h pmap.h rtc.h
+
+.include <bsd.kinc.mk>
diff -r f1c5af8ba9a3 -r 9c3f0379bdeb sys/arch/arm/include/arm32/bus.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/include/arm32/bus.h  Fri Feb 23 21:23:45 2001 +0000
@@ -0,0 +1,793 @@
+/*     $NetBSD: bus.h,v 1.1 2001/02/23 21:23:49 reinoud Exp $  */
+
+/*-
+ * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
+ * NASA Ames Research Center.
+ *
+ * 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 NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION 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.
+ */
+
+/*
+ * Copyright (c) 1996 Charles M. Hannum.  All rights reserved.
+ * Copyright (c) 1996 Christopher G. Demetriou.  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 Christopher G. Demetriou
+ *     for the NetBSD Project.
+ * 4. The name of the author may not 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 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.
+ */
+
+#ifndef _ARM32_BUS_H_
+#define _ARM32_BUS_H_
+
+/*
+ * Addresses (in bus space).
+ */
+typedef u_long bus_addr_t;
+typedef u_long bus_size_t;
+
+/*
+ * Access methods for bus space.
+ */
+typedef struct bus_space *bus_space_tag_t;
+typedef u_long bus_space_handle_t;
+
+/*
+ *     int bus_space_map  __P((bus_space_tag_t t, bus_addr_t addr,
+ *         bus_size_t size, int flags, bus_space_handle_t *bshp));
+ *
+ * Map a region of bus space.
+ */
+
+#define        BUS_SPACE_MAP_CACHEABLE         0x01
+#define        BUS_SPACE_MAP_LINEAR            0x02
+#define        BUS_SPACE_MAP_PREFETCHABLE      0x04
+
+struct bus_space {
+       /* cookie */
+       void            *bs_cookie;
+
+       /* mapping/unmapping */
+       int             (*bs_map) __P((void *, bus_addr_t, bus_size_t,
+                           int, bus_space_handle_t *));
+       void            (*bs_unmap) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+       int             (*bs_subregion) __P((void *, bus_space_handle_t,
+                           bus_size_t, bus_size_t, bus_space_handle_t *));
+
+       /* allocation/deallocation */
+       int             (*bs_alloc) __P((void *, bus_addr_t, bus_addr_t,
+                           bus_size_t, bus_size_t, bus_size_t, int,
+                           bus_addr_t *, bus_space_handle_t *));
+       void            (*bs_free) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+
+       /* get kernel virtual address */
+       void *          (*bs_vaddr) __P((void *, bus_space_handle_t));
+
+       /* barrier */
+       void            (*bs_barrier) __P((void *, bus_space_handle_t,
+                           bus_size_t, bus_size_t, int));
+
+       /* read (single) */
+       u_int8_t        (*bs_r_1) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+       u_int16_t       (*bs_r_2) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+       u_int32_t       (*bs_r_4) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+       u_int64_t       (*bs_r_8) __P((void *, bus_space_handle_t,
+                           bus_size_t));
+
+       /* read multiple */
+       void            (*bs_rm_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int8_t *, bus_size_t));
+       void            (*bs_rm_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int16_t *, bus_size_t));
+       void            (*bs_rm_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int32_t *, bus_size_t));
+       void            (*bs_rm_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int64_t *, bus_size_t));
+                                       
+       /* read region */
+       void            (*bs_rr_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int8_t *, bus_size_t));
+       void            (*bs_rr_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int16_t *, bus_size_t));
+       void            (*bs_rr_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int32_t *, bus_size_t));
+       void            (*bs_rr_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int64_t *, bus_size_t));
+                                       
+       /* write (single) */
+       void            (*bs_w_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int8_t));
+       void            (*bs_w_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int16_t));
+       void            (*bs_w_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int32_t));
+       void            (*bs_w_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int64_t));
+
+       /* write multiple */
+       void            (*bs_wm_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int8_t *, bus_size_t));
+       void            (*bs_wm_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int16_t *, bus_size_t));
+       void            (*bs_wm_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int32_t *, bus_size_t));
+       void            (*bs_wm_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int64_t *, bus_size_t));
+                                       
+       /* write region */
+       void            (*bs_wr_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int8_t *, bus_size_t));
+       void            (*bs_wr_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int16_t *, bus_size_t));
+       void            (*bs_wr_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int32_t *, bus_size_t));
+       void            (*bs_wr_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, const u_int64_t *, bus_size_t));
+
+       /* set multiple */
+       void            (*bs_sm_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int8_t, bus_size_t));
+       void            (*bs_sm_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int16_t, bus_size_t));
+       void            (*bs_sm_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int32_t, bus_size_t));
+       void            (*bs_sm_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int64_t, bus_size_t));
+
+       /* set region */
+       void            (*bs_sr_1) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int8_t, bus_size_t));
+       void            (*bs_sr_2) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int16_t, bus_size_t));
+       void            (*bs_sr_4) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int32_t, bus_size_t));
+       void            (*bs_sr_8) __P((void *, bus_space_handle_t,
+                           bus_size_t, u_int64_t, bus_size_t));
+
+       /* copy */
+       void            (*bs_c_1) __P((void *, bus_space_handle_t, bus_size_t,
+                           bus_space_handle_t, bus_size_t, bus_size_t));
+       void            (*bs_c_2) __P((void *, bus_space_handle_t, bus_size_t,
+                           bus_space_handle_t, bus_size_t, bus_size_t));
+       void            (*bs_c_4) __P((void *, bus_space_handle_t, bus_size_t,
+                           bus_space_handle_t, bus_size_t, bus_size_t));
+       void            (*bs_c_8) __P((void *, bus_space_handle_t, bus_size_t,
+                           bus_space_handle_t, bus_size_t, bus_size_t));
+
+};
+
+
+/*
+ * Utility macros; INTERNAL USE ONLY.
+ */
+#define        __bs_c(a,b)             __CONCAT(a,b)
+#define        __bs_opname(op,size)    __bs_c(__bs_c(__bs_c(bs_,op),_),size)
+
+#define        __bs_rs(sz, t, h, o)                                            \
+       (*(t)->__bs_opname(r,sz))((t)->bs_cookie, h, o)
+#define        __bs_ws(sz, t, h, o, v)                                         \
+       (*(t)->__bs_opname(w,sz))((t)->bs_cookie, h, o, v)
+#define        __bs_nonsingle(type, sz, t, h, o, a, c)                         \
+       (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c)
+#define        __bs_set(type, sz, t, h, o, v, c)                               \
+       (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, v, c)
+#define        __bs_copy(sz, t, h1, o1, h2, o2, cnt)                           \
+       (*(t)->__bs_opname(c,sz))((t)->bs_cookie, h1, o1, h2, o2, cnt)
+
+
+/*
+ * Mapping and unmapping operations.
+ */
+#define        bus_space_map(t, a, s, c, hp)                                   \
+       (*(t)->bs_map)((t)->bs_cookie, (a), (s), (c), (hp))
+#define        bus_space_unmap(t, h, s)                                        \
+       (*(t)->bs_unmap)((t)->bs_cookie, (h), (s))
+#define        bus_space_subregion(t, h, o, s, hp)                             \
+       (*(t)->bs_subregion)((t)->bs_cookie, (h), (o), (s), (hp))
+
+
+/*
+ * Allocation and deallocation operations.
+ */
+#define        bus_space_alloc(t, rs, re, s, a, b, c, ap, hp)                  \
+       (*(t)->bs_alloc)((t)->bs_cookie, (rs), (re), (s), (a), (b),     \
+           (c), (ap), (hp))
+#define        bus_space_free(t, h, s)                                         \
+       (*(t)->bs_free)((t)->bs_cookie, (h), (s))
+
+/*
+ * Get kernel virtual address for ranges mapped BUS_SPACE_MAP_LINEAR.
+ */
+#define        bus_space_vaddr(t, h)                                           \
+       (*(t)->bs_vaddr)((t)->bs_cookie, (h))
+



Home | Main Index | Thread Index | Old Index