Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun68k Added sources for the sun2 boot blocks and o...
details: https://anonhg.NetBSD.org/src/rev/58199c3e4bc0
branches: trunk
changeset: 511200:58199c3e4bc0
user: fredette <fredette%NetBSD.org@localhost>
date: Thu Jun 14 12:57:10 2001 +0000
description:
Added sources for the sun2 boot blocks and other
sun68k-ish code, all of which ought to eventually
be shared with the sun3.
diffstat:
sys/arch/sun68k/Makefile | 5 +
sys/arch/sun68k/include/autoconf.h | 69 +
sys/arch/sun68k/include/bus.h | 1185 +++++++++++++++++++++++
sys/arch/sun68k/include/cpu.h | 157 +++
sys/arch/sun68k/include/disklabel.h | 57 +
sys/arch/sun68k/include/idprom.h | 98 +
sys/arch/sun68k/include/intr.h | 93 +
sys/arch/sun68k/include/loadfile_machdep.h | 76 +
sys/arch/sun68k/include/mc68851.h | 9 +
sys/arch/sun68k/include/mon.h | 448 ++++++++
sys/arch/sun68k/include/psl.h | 115 ++
sys/arch/sun68k/stand/Makefile | 5 +
sys/arch/sun68k/stand/Makefile.inc | 60 +
sys/arch/sun68k/stand/README | 38 +
sys/arch/sun68k/stand/bootxx/Makefile | 15 +
sys/arch/sun68k/stand/bootxx/bootxx.c | 142 ++
sys/arch/sun68k/stand/bootxx/conf.c | 11 +
sys/arch/sun68k/stand/bootyy/Makefile | 10 +
sys/arch/sun68k/stand/bootyy/bootyy.c | 147 ++
sys/arch/sun68k/stand/bootyy/conf.c | 11 +
sys/arch/sun68k/stand/installboot/Makefile | 20 +
sys/arch/sun68k/stand/installboot/installboot.c | 336 ++++++
sys/arch/sun68k/stand/libsa/Makefile | 70 +
sys/arch/sun68k/stand/libsa/SRT0.S | 159 +++
sys/arch/sun68k/stand/libsa/SRT1.c | 133 ++
sys/arch/sun68k/stand/libsa/clock.c | 27 +
sys/arch/sun68k/stand/libsa/dev_disk.c | 182 +++
sys/arch/sun68k/stand/libsa/dev_disk.h | 8 +
sys/arch/sun68k/stand/libsa/devopen.c | 35 +
sys/arch/sun68k/stand/libsa/dvma.h | 63 +
sys/arch/sun68k/stand/libsa/gets.c | 116 ++
sys/arch/sun68k/stand/libsa/idprom.c | 176 +++
sys/arch/sun68k/stand/libsa/libsa.h | 50 +
sys/arch/sun68k/stand/libsa/netif.h | 17 +
sys/arch/sun68k/stand/libsa/netif_sun.c | 474 +++++++++
sys/arch/sun68k/stand/libsa/panic.c | 19 +
sys/arch/sun68k/stand/libsa/promboot.c | 75 +
sys/arch/sun68k/stand/libsa/promcons.c | 27 +
sys/arch/sun68k/stand/libsa/promdev.c | 160 +++
sys/arch/sun68k/stand/libsa/saio.h | 168 +++
sys/arch/sun68k/stand/libsa/sun2.c | 376 +++++++
sys/arch/sun68k/stand/libsa/sun3.c | 299 +++++
sys/arch/sun68k/stand/libsa/sun3x.c | 332 ++++++
sys/arch/sun68k/stand/libsa/version | 18 +
sys/arch/sun68k/stand/libsa/xxboot.c | 154 ++
sys/arch/sun68k/stand/netboot/Makefile | 17 +
sys/arch/sun68k/stand/netboot/conf.c | 23 +
sys/arch/sun68k/stand/tapeboot/Makefile | 10 +
sys/arch/sun68k/stand/tapeboot/boot.c | 109 ++
sys/arch/sun68k/stand/tapeboot/conf.c | 20 +
sys/arch/sun68k/stand/tapeboot/dev_tape.c | 205 +++
sys/arch/sun68k/stand/tapeboot/dev_tape.h | 8 +
sys/arch/sun68k/stand/tapeboot/rawfs.c | 207 ++++
sys/arch/sun68k/stand/tapeboot/rawfs.h | 15 +
sys/arch/sun68k/stand/ufsboot/Makefile | 16 +
sys/arch/sun68k/stand/ufsboot/conf.c | 20 +
sys/arch/sun68k/sun68k/control.h | 60 +
sys/arch/sun68k/sun68k/ctrlsp.S | 96 +
58 files changed, 7051 insertions(+), 0 deletions(-)
diffs (truncated from 7283 to 300 lines):
diff -r cc70914c3281 -r 58199c3e4bc0 sys/arch/sun68k/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sun68k/Makefile Thu Jun 14 12:57:10 2001 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2001/06/14 12:57:10 fredette Exp $
+
+SUBDIR= stand
+
+.include <bsd.subdir.mk>
diff -r cc70914c3281 -r 58199c3e4bc0 sys/arch/sun68k/include/autoconf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sun68k/include/autoconf.h Thu Jun 14 12:57:10 2001 +0000
@@ -0,0 +1,69 @@
+/* $NetBSD: autoconf.h,v 1.1 2001/06/14 12:57:10 fredette Exp $ */
+
+/*-
+ * Copyright (c) 1996 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Adam Glass, Gordon W. Ross, and Matthew Fredette.
+ *
+ * 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.
+ */
+
+/*
+ * Autoconfiguration information.
+ * (machdep parts of driver/kernel interface)
+ */
+
+#include <machine/bus.h>
+#include <machine/promlib.h>
+
+/*
+ * This is the "args" parameter to the bus match/attach functions.
+ */
+struct confargs {
+ bus_space_tag_t ca_bustag; /* parent bus tag */
+ bus_dma_tag_t ca_dmatag;
+ const char *ca_name; /* device name */
+ bus_addr_t ca_paddr; /* physical address */
+ int ca_intpri; /* interrupt priority level */
+ int ca_intvec; /* interrupt vector index */
+};
+
+/* Locator aliases */
+#define cf_paddr cf_loc[0]
+#define cf_intpri cf_loc[1]
+#define cf_intvec cf_loc[2]
+#define LOCATOR_OPTIONAL (0)
+#define LOCATOR_REQUIRED (1)
+#define LOCATOR_FORBIDDEN (2)
+
+int sun68k_bus_search __P((struct device *, struct cfdata *, void *));
+int sun68k_bus_print __P((void *, const char *));
+
diff -r cc70914c3281 -r 58199c3e4bc0 sys/arch/sun68k/include/bus.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sun68k/include/bus.h Thu Jun 14 12:57:10 2001 +0000
@@ -0,0 +1,1185 @@
+/* $NetBSD: bus.h,v 1.1 2001/06/14 12:57:10 fredette 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 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 _SUN68K_BUS_H_
+#define _SUN68K_BUS_H_
+
+#define SUN68K_BUS_SPACE 0
+
+/*
+ * Bus address and size types
+ */
+typedef u_long bus_space_handle_t;
+typedef u_long bus_type_t;
+typedef u_long bus_addr_t;
+typedef u_long bus_size_t;
+
+/*
+ * Access methods for bus resources and address space.
+ */
+typedef struct sun68k_bus_space_tag *bus_space_tag_t;
+
+struct sun68k_bus_space_tag {
+ void *cookie;
+ bus_space_tag_t parent;
+
+ int (*sun68k_bus_map) __P((
+ bus_space_tag_t,
+ bus_type_t,
+ bus_addr_t,
+ bus_size_t,
+ int, /*flags*/
+ vaddr_t, /*preferred vaddr*/
+ bus_space_handle_t *));
+ int (*sun68k_bus_unmap) __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t));
+ int (*sun68k_bus_subregion) __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t, /*offset*/
+ bus_size_t, /*size*/
+ bus_space_handle_t *));
+
+ void (*sun68k_bus_barrier) __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t, /*offset*/
+ bus_size_t, /*size*/
+ int)); /*flags*/
+
+ int (*sun68k_bus_mmap) __P((
+ bus_space_tag_t,
+ bus_type_t, /**/
+ bus_addr_t, /**/
+ int, /*flags*/
+ bus_space_handle_t *));
+
+ void *(*sun68k_intr_establish) __P((
+ bus_space_tag_t,
+ int, /*bus-specific intr*/
+ int, /*device class level,
+ see machine/intr.h*/
+ int, /*flags*/
+ int (*) __P((void *)), /*handler*/
+ void *)); /*handler arg*/
+
+ int (*sun68k_bus_peek) __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t, /*offset*/
+ size_t, /*probe size*/
+ void *)); /*result ptr*/
+
+ int (*sun68k_bus_poke) __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t, /*offset*/
+ size_t, /*probe size*/
+ u_int32_t)); /*value*/
+};
+
+#if 0
+/*
+ * The following macro could be used to generate the bus_space*() functions
+ * but it uses a gcc extension and is ANSI-only.
+#define PROTO_bus_space_xxx __P((bus_space_tag_t t, ...))
+#define RETURNTYPE_bus_space_xxx void *
+#define BUSFUN(name, returntype, t, args...) \
+ __inline__ RETURNTYPE_##name \
+ bus_##name PROTO_##name \
+ { \
+ while (t->sun68k_##name == NULL) \
+ t = t->parent; \
+ return (*(t)->sun68k_##name)(t, args); \
+ }
+ */
+#endif
+
+/*
+ * Bus space function prototypes.
+ */
+static int bus_space_map __P((
+ bus_space_tag_t,
+ bus_addr_t,
+ bus_size_t,
+ int, /*flags*/
+ bus_space_handle_t *));
+static int bus_space_map2 __P((
+ bus_space_tag_t,
+ bus_type_t,
+ bus_addr_t,
+ bus_size_t,
+ int, /*flags*/
+ vaddr_t, /*preferred vaddr*/
+ bus_space_handle_t *));
+static int bus_space_unmap __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t));
+static int bus_space_subregion __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t,
+ bus_size_t,
+ bus_space_handle_t *));
+static void bus_space_barrier __P((
+ bus_space_tag_t,
+ bus_space_handle_t,
+ bus_size_t,
+ bus_size_t,
+ int));
+static int bus_space_mmap __P((
+ bus_space_tag_t,
+ bus_type_t, /**/
+ bus_addr_t, /**/
+ int, /*flags*/
+ bus_space_handle_t *));
+static void *bus_intr_establish __P((
+ bus_space_tag_t,
+ int, /*bus-specific intr*/
+ int, /*device class level,
+ see machine/intr.h*/
+ int, /*flags*/
+ int (*) __P((void *)), /*handler*/
+ void *)); /*handler arg*/
+static int _bus_space_peek __P((
Home |
Main Index |
Thread Index |
Old Index