Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint Adapt to new PowerPC pmap.
details: https://anonhg.NetBSD.org/src/rev/ff2a419e151d
branches: trunk
changeset: 510950:ff2a419e151d
user: briggs <briggs%NetBSD.org@localhost>
date: Sun Jun 10 03:16:29 2001 +0000
description:
Adapt to new PowerPC pmap.
Use more common PowerPC code including bus_dma and unified bus_space.
diffstat:
sys/arch/sandpoint/conf/files.sandpoint | 4 +-
sys/arch/sandpoint/conf/std.sandpoint | 3 +-
sys/arch/sandpoint/include/Makefile | 6 +-
sys/arch/sandpoint/include/bat.h | 3 -
sys/arch/sandpoint/include/bus.h | 1120 +-----------------------------
sys/arch/sandpoint/include/isa_machdep.h | 58 +-
sys/arch/sandpoint/include/param.h | 94 +--
sys/arch/sandpoint/include/pci_machdep.h | 3 +-
sys/arch/sandpoint/include/pmap.h | 4 +-
sys/arch/sandpoint/include/pte.h | 3 -
sys/arch/sandpoint/include/vmparam.h | 109 +--
sys/arch/sandpoint/isa/isadma_machdep.c | 42 +-
sys/arch/sandpoint/pci/pci_machdep.c | 6 +-
sys/arch/sandpoint/pci/pcib.c | 9 +-
sys/arch/sandpoint/sandpoint/autoconf.c | 4 +-
sys/arch/sandpoint/sandpoint/bus_dma.c | 626 ----------------
sys/arch/sandpoint/sandpoint/bus_space.c | 227 ++++++
sys/arch/sandpoint/sandpoint/locore.S | 5 +-
sys/arch/sandpoint/sandpoint/machdep.c | 21 +-
sys/arch/sandpoint/sandpoint/mainbus.c | 15 +-
20 files changed, 331 insertions(+), 2031 deletions(-)
diffs (truncated from 2678 to 300 lines):
diff -r a1320f1ca34c -r ff2a419e151d sys/arch/sandpoint/conf/files.sandpoint
--- a/sys/arch/sandpoint/conf/files.sandpoint Sun Jun 10 02:31:25 2001 +0000
+++ b/sys/arch/sandpoint/conf/files.sandpoint Sun Jun 10 03:16:29 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.sandpoint,v 1.4 2001/03/12 20:10:06 manu Exp $
+# $NetBSD: files.sandpoint,v 1.5 2001/06/10 03:16:29 briggs Exp $
#
# Motorola's "SandPoint" evaluation board's specific configuration info
#
@@ -7,7 +7,7 @@
maxusers 2 8 64
file arch/sandpoint/sandpoint/autoconf.c
-file arch/sandpoint/sandpoint/bus_dma.c
+file arch/sandpoint/sandpoint/bus_space.c
file arch/sandpoint/sandpoint/clock.c
file arch/sandpoint/sandpoint/conf.c
file arch/sandpoint/sandpoint/disksubr.c disk
diff -r a1320f1ca34c -r ff2a419e151d sys/arch/sandpoint/conf/std.sandpoint
--- a/sys/arch/sandpoint/conf/std.sandpoint Sun Jun 10 02:31:25 2001 +0000
+++ b/sys/arch/sandpoint/conf/std.sandpoint Sun Jun 10 03:16:29 2001 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: std.sandpoint,v 1.1 2001/02/04 18:32:11 briggs Exp $
+# $NetBSD: std.sandpoint,v 1.2 2001/06/10 03:16:29 briggs Exp $
#
# standard, required NetBSD/sandpoint 'options'
machine sandpoint powerpc
+options PPC_MPC6XX # Sandpoint uses Motorola PPC60x CPUs
options EXEC_ELF32 # exec ELF binaries
options EXEC_SCRIPT # exec #! scripts
diff -r a1320f1ca34c -r ff2a419e151d sys/arch/sandpoint/include/Makefile
--- a/sys/arch/sandpoint/include/Makefile Sun Jun 10 02:31:25 2001 +0000
+++ b/sys/arch/sandpoint/include/Makefile Sun Jun 10 03:16:29 2001 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.8 2001/05/03 13:11:26 soren Exp $
+# $NetBSD: Makefile,v 1.9 2001/06/10 03:16:30 briggs Exp $
KDIR= /sys/arch/sandpoint/include
INCSDIR= /usr/include/sandpoint
INCS= ansi.h aout_machdep.h asm.h \
- bat.h bootinfo.h bswap.h bus.h \
+ bootinfo.h bswap.h bus.h \
cdefs.h conf.h cpu.h cpufunc.h \
db_machdep.h disklabel.h \
elf_machdep.h endian.h endian_machdep.h \
@@ -15,7 +15,7 @@
kcore.h kgdb.h \
limits.h lock.h \
math.h \
- param.h pcb.h pio.h pmap.h powerpc.h proc.h profile.h psl.h pte.h \
+ param.h pcb.h pio.h pmap.h powerpc.h proc.h profile.h psl.h \
ptrace.h \
reg.h reloc.h \
setjmp.h signal.h spkr.h stdarg.h \
diff -r a1320f1ca34c -r ff2a419e151d sys/arch/sandpoint/include/bat.h
--- a/sys/arch/sandpoint/include/bat.h Sun Jun 10 02:31:25 2001 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: bat.h,v 1.1 2001/02/04 18:32:11 briggs Exp $ */
-
-#include <powerpc/bat.h>
diff -r a1320f1ca34c -r ff2a419e151d sys/arch/sandpoint/include/bus.h
--- a/sys/arch/sandpoint/include/bus.h Sun Jun 10 02:31:25 2001 +0000
+++ b/sys/arch/sandpoint/include/bus.h Sun Jun 10 03:16:29 2001 +0000
@@ -1,110 +1,10 @@
-/* $NetBSD: bus.h,v 1.2 2001/03/07 22:42:20 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.3 2001/06/10 03:16:30 briggs Exp $ */
/* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */
-/*-
- * Copyright (c) 1996, 1997, 1998, 2001 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 Jason R. Thorpe. 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.
- */
-
-/*
- * Copyright (c) 1997 Per Fogelstrom. All rights reserved.
- * Copyright (c) 1996 Niklas Hallqvist. 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 _SANDPOINT_BUS_H_
#define _SANDPOINT_BUS_H_
-#include <machine/pio.h>
+#include <powerpc/bus.h>
/*
* Values for the SandPoint bus space tag, not to be used directly by MI code.
@@ -116,1016 +16,16 @@
#define SANDPOINT_PCI_CONFIG_DATA 0xFEE00CFC
/*
- * Bus access types.
- */
-typedef u_int32_t bus_addr_t;
-typedef u_int32_t bus_size_t;
-typedef u_int32_t bus_space_handle_t;
-typedef u_int32_t bus_space_tag_t;
-
-#define BUS_SPACE_MAP_CACHEABLE 0x01
-#define BUS_SPACE_MAP_LINEAR 0x02
-#define BUS_SPACE_MAP_PREFETCHABLE 0x04
-
-#ifdef __STDC__
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#else
-#define CAT(a,b) a/**/b
-#define CAT3(a,b,c) a/**/b/**/c
-#endif
-
-/*
- * Access methods for bus resources
- */
-
-#define __BUS_SPACE_HAS_STREAM_METHODS
-
-/*
- * 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(t, addr, size, flags, bshp) \
- ((*(bshp) = (t) + (addr)), 0)
-
-/*
- * int bus_space_unmap __P((bus_space_tag_t t,
- * bus_space_handle_t bsh, bus_size_t size));
- *
- * Unmap a region of bus space.
- */
-
-#define bus_space_unmap(t, bsh, size)
-
-/*
- * int bus_space_subregion __P((bus_space_tag_t t,
- * bus_space_handle_t bsh, bus_size_t offset, bus_size_t size,
- * bus_space_handle_t *nbshp));
- *
- * Get a new handle for a subregion of an already-mapped area of bus space.
- */
-
-#define bus_space_subregion(t, bsh, offset, size, bshp) \
- ((*(bshp) = (bsh) + (offset)), 0)
-
-/*
- * int bus_space_alloc __P((bus_space_tag_t t, bus_addr_t rstart,
- * bus_addr_t rend, bus_size_t size, bus_size_t align,
- * bus_size_t boundary, int flags, bus_addr_t *addrp,
- * bus_space_handle_t *bshp));
- *
- * Allocate a region of bus space.
- */
-
-#define bus_space_alloc !!! bus_space_alloc not implemented !!!
-
-/*
- * int bus_space_free __P((bus_space_tag_t t,
- * bus_space_handle_t bsh, bus_size_t size));
- *
- * Free a region of bus space.
- */
-
-#define bus_space_free !!! bus_space_free not implemented !!!
-
-/*
- * u_intN_t bus_space_read_N __P((bus_space_tag_t tag,
- * bus_space_handle_t bsh, bus_size_t offset));
- *
- * Read a 1, 2, 4, or 8 byte quantity from bus space
- * described by tag/handle/offset.
- */
-
-#define bus_space_read(n,m) \
-static __inline CAT3(u_int,m,_t) \
-CAT(bus_space_read_,n)(bus_space_tag_t tag, bus_space_handle_t bsh, \
- bus_size_t offset) \
-{ \
- return CAT3(in,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (offset))); \
-}
-
-bus_space_read(1,8)
-bus_space_read(2,16)
-bus_space_read(4,32)
-#define bus_space_read_8 !!! bus_space_read_8 unimplemented !!!
-
-/*
- * u_intN_t bus_space_read_stream_N __P((bus_space_tag_t tag,
- * bus_space_handle_t bsh, bus_size_t offset));
- *
- * Read a 2, 4, or 8 byte stream quantity from bus space
- * described by tag/handle/offset.
- */
-
-#define bus_space_read_stream(n,m) \
-static __inline CAT3(u_int,m,_t) \
-CAT(bus_space_read_stream_,n)(bus_space_tag_t tag, bus_space_handle_t bsh, \
- bus_size_t offset) \
-{ \
- return CAT(in,m)((volatile CAT3(u_int,m,_t) *)(bsh + (offset))); \
-}
-
-bus_space_read_stream(2,16)
-bus_space_read_stream(4,32)
-#define bus_space_read_stream_8 !!! bus_space_read_stream_8 unimplemented !!!
Home |
Main Index |
Thread Index |
Old Index