summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mac68k/conf/GENERIC4
-rw-r--r--sys/arch/mac68k/conf/Makefile.mac68k2
-rw-r--r--sys/arch/mac68k/conf/OCELOT5
-rw-r--r--sys/arch/mac68k/conf/PUMA15
-rw-r--r--sys/arch/mac68k/conf/RAMDISK58
-rw-r--r--sys/arch/mac68k/conf/files.mac68k17
-rw-r--r--sys/arch/mac68k/conf/std.mac68k5
-rw-r--r--sys/arch/mac68k/dev/adb.c2
-rw-r--r--sys/arch/mac68k/dev/asc.c4
-rw-r--r--sys/arch/mac68k/dev/mac68k5380.c9
-rw-r--r--sys/arch/mac68k/dev/ncr5380.c77
-rw-r--r--sys/arch/mac68k/dev/ncr5380reg.h3
-rw-r--r--sys/arch/mac68k/dev/rd_root.c79
-rw-r--r--sys/arch/mac68k/mac68k/autoconf.c2
-rw-r--r--sys/arch/mac68k/mac68k/conf.c17
-rw-r--r--sys/arch/mac68k/mac68k/locore.s77
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c15
-rw-r--r--sys/arch/mac68k/mac68k/pmap.c7
-rw-r--r--sys/arch/mac68k/mac68k/vm_machdep.c6
19 files changed, 267 insertions, 137 deletions
diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC
index c700ecf7ac1..d2df66a5eba 100644
--- a/sys/arch/mac68k/conf/GENERIC
+++ b/sys/arch/mac68k/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.31 1995/10/04 11:05:25 briggs Exp $
+# $NetBSD: GENERIC,v 1.32 1995/11/21 05:00:37 briggs Exp $
#
# GENERIC
@@ -7,7 +7,7 @@ include "std.mac68k"
maxusers 16
# obsolete timezone spec
-options TIMEZONE=0, DST=1, MAXFDESCS=2048
+options MAXFDESCS=2048
# Standard system options
options SWAPPAGER, VNODEPAGER, DEVPAGER # paging
diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k
index c960dd25725..16854a80087 100644
--- a/sys/arch/mac68k/conf/Makefile.mac68k
+++ b/sys/arch/mac68k/conf/Makefile.mac68k
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.mac68k,v 1.25 1995/10/10 03:47:59 briggs Exp $
+# $NetBSD: Makefile.mac68k,v 1.26 1995/11/01 04:53:34 briggs Exp $
# Makefile for NetBSD for the mac
# Derived from makefile for hp300 from NetBSD
diff --git a/sys/arch/mac68k/conf/OCELOT b/sys/arch/mac68k/conf/OCELOT
index c3a64f244ce..31dee88e20b 100644
--- a/sys/arch/mac68k/conf/OCELOT
+++ b/sys/arch/mac68k/conf/OCELOT
@@ -1,4 +1,4 @@
-# $NetBSD: OCELOT,v 1.5 1995/09/16 12:33:07 briggs Exp $
+# $NetBSD: OCELOT,v 1.6 1995/11/21 05:00:34 briggs Exp $
#
# OCELOT
@@ -6,9 +6,6 @@ include "std.mac68k"
maxusers 16
-# obsolete timezone spec
-options TIMEZONE=0, DST=1, MAXFDESCS=2048
-
# Standard system options
options SWAPPAGER, VNODEPAGER, DEVPAGER # paging
options DIAGNOSTIC # DEBUG for extra kernel debugging
diff --git a/sys/arch/mac68k/conf/PUMA b/sys/arch/mac68k/conf/PUMA
index fe0e10fb870..de8920fac7c 100644
--- a/sys/arch/mac68k/conf/PUMA
+++ b/sys/arch/mac68k/conf/PUMA
@@ -1,4 +1,4 @@
-# $NetBSD: PUMA,v 1.5.2.1 1995/10/16 14:17:10 briggs Exp $
+# $NetBSD: PUMA,v 1.7 1995/11/21 05:00:36 briggs Exp $
#
# PUMA
@@ -6,8 +6,7 @@ include "std.mac68k"
maxusers 16
-# obsolete timezone spec
-options TIMEZONE=0, DST=1, MAXFDESCS=2048
+options MAXFDESCS=2048
# Standard system options
options SWAPPAGER, VNODEPAGER, DEVPAGER # paging
@@ -42,11 +41,11 @@ options SYSVSHM,SYSVSEM,SYSVMSG
# Mac-specific options
options M68030 # Includes the 020+851
+options MACHINE_NONCONTIG
options COMPAT_NOMID
options COMPAT_SUNOS
options COMPAT_09
options COMPAT_10
-options MACHINE_NONCONTIG
config netbsd root on sd0 swap on sd0 and sd1 and vnd0a dumps on sd1b
@@ -59,9 +58,9 @@ sd* at scsibus? target ? lun ?
st* at scsibus? target ? lun ?
cd* at scsibus? target ? lun ?
-pseudo-device loop
pseudo-device pty 16
-pseudo-device sl
-pseudo-device bpfilter 4
-pseudo-device ppp
+pseudo-device bpfilter 16
pseudo-device vnd 4
+pseudo-device loop
+pseudo-device ppp
+pseudo-device sl
diff --git a/sys/arch/mac68k/conf/RAMDISK b/sys/arch/mac68k/conf/RAMDISK
new file mode 100644
index 00000000000..f900026d620
--- /dev/null
+++ b/sys/arch/mac68k/conf/RAMDISK
@@ -0,0 +1,58 @@
+# $NetBSD: RAMDISK,v 1.1 1995/11/21 05:02:02 briggs Exp $
+
+# RAMDISK
+# Support Root/swap on ramdisk
+#
+
+include "std.mac68k"
+
+maxusers 2
+
+# Enable the hooks used for initializing the ram-disk
+options RAMDISK_HOOKS
+options MINIROOTSIZE=512 # 256K
+
+# Standard system options
+options SWAPPAGER, VNODEPAGER, DEVPAGER # paging
+
+# Filesystem options
+options FIFO # POSIX fifo support (in all filesystems)
+options DDB
+options FFS
+options NFSCLIENT # Sun NFS-compatible filesystem
+options CD9660 # ISO-9660 w/ RockRidge
+options KERNFS # Kernel filesystem
+
+options SCSI
+
+# Networking options
+options INET
+options TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP
+
+# Mac-specific options
+options M68040
+options M68030 # Includes the 020+851
+options FPSP
+options FPU_EMULATE
+options COMPAT_09
+options COMPAT_10
+options MACHINE_NONCONTIG
+
+config netbsd root on rd0a swap on rd0b
+
+rd0 at mainbus?
+
+ae* at nubus0 slot -1 id ? claimed 0
+
+ncrscsi0 at mainbus? # SCSI NCR 5380
+ncr96scsi0 at mainbus? # SCSI NCR 53C96
+
+scsibus* at scsi?
+sd* at scsibus? target ? lun ?
+st* at scsibus? target ? lun ?
+cd* at scsibus? target ? lun ?
+ch* at scsibus? target ? lun ?
+
+pseudo-device ppp
+pseudo-device sl
+pseudo-device loop
diff --git a/sys/arch/mac68k/conf/files.mac68k b/sys/arch/mac68k/conf/files.mac68k
index f750fee0ea3..2ef138cb726 100644
--- a/sys/arch/mac68k/conf/files.mac68k
+++ b/sys/arch/mac68k/conf/files.mac68k
@@ -1,4 +1,4 @@
-# $NetBSD: files.mac68k,v 1.35 1995/09/03 03:37:32 briggs Exp $
+# $NetBSD: files.mac68k,v 1.37 1995/11/21 05:06:28 briggs Exp $
# mac68k-specific configuration info
@@ -37,9 +37,6 @@ device ae at nubus: ifnet, ether
file arch/mac68k/dev/if_ae.c ae needs-flag
include "../../../scsi/files.scsi"
-major {sd = 4}
-major {st = 5}
-major {cd = 6}
device ncrscsi at mainbus: scsi
file arch/mac68k/dev/mac68k5380.c ncrscsi needs-flag
@@ -48,7 +45,8 @@ device ncr96scsi at mainbus: scsi
file arch/mac68k/dev/scsi96.c ncr96scsi needs-flag
file arch/m68k/m68k/copy.s
-file arch/m68k/fpe/fpu_emulate.c fpu_emulate
+include "../../m68k/fpe/files.fpe"
+
file arch/mac68k/mac68k/autoconf.c
file arch/mac68k/mac68k/clock.c
file arch/mac68k/mac68k/disksubr.c disk
@@ -68,7 +66,16 @@ file arch/mac68k/mac68k/vm_machdep.c
file dev/cons.c
file dev/cninit.c
+# RAM Disk for installs
+device rd at mainbus
+file dev/ramdisk.c rd needs-count
+file arch/mac68k/dev/rd_root.c ramdisk_hooks
+
+major {sd = 4}
+major {st = 5}
+major {cd = 6}
major {vnd = 8}
+major {rd = 13}
# Compatibility modules
diff --git a/sys/arch/mac68k/conf/std.mac68k b/sys/arch/mac68k/conf/std.mac68k
index 9423fd9fb36..a7e356de495 100644
--- a/sys/arch/mac68k/conf/std.mac68k
+++ b/sys/arch/mac68k/conf/std.mac68k
@@ -1,4 +1,4 @@
-# $NetBSD: std.mac68k,v 1.6.2.1 1995/10/14 22:26:46 briggs Exp $
+# $NetBSD: std.mac68k,v 1.8 1995/11/21 05:05:51 briggs Exp $
#
# standard Macintosh information.
# roughly copied from std.sparc 14 Oct 1993.
@@ -18,3 +18,6 @@ asc0 at mainbus0
ser0 at mainbus0
grf0 at nubus0 slot -1 id ? claimed 0
grf1 at nubus0 slot -1 id ? claimed 0
+
+options TIMEZONE=0 # minutes west of GMT--read from booter
+options DST=0 # daylight savings rules--obsolete
diff --git a/sys/arch/mac68k/dev/adb.c b/sys/arch/mac68k/dev/adb.c
index c8906239952..8e75d7df8ab 100644
--- a/sys/arch/mac68k/dev/adb.c
+++ b/sys/arch/mac68k/dev/adb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: adb.c,v 1.4.2.1 1995/11/02 04:35:05 briggs Exp $ */
+/* $NetBSD: adb.c,v 1.5 1995/11/01 04:40:21 briggs Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c
index b487e47786b..7d6782b19a0 100644
--- a/sys/arch/mac68k/dev/asc.c
+++ b/sys/arch/mac68k/dev/asc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: asc.c,v 1.8 1995/09/21 03:36:25 briggs Exp $ */
+/* $NetBSD: asc.c,v 1.9 1995/11/01 04:58:21 briggs Exp $ */
/*-
* Copyright (C) 1993 Allen K. Briggs, Chris P. Caputo,
@@ -84,8 +84,6 @@ ascattach(parent, dev, aux)
void *aux;
{
printf(" Apple sound chip.\n");
-
- ASCBase = IOBase + ASCBase;
}
int
diff --git a/sys/arch/mac68k/dev/mac68k5380.c b/sys/arch/mac68k/dev/mac68k5380.c
index e94e16bbf0f..72bb0f51380 100644
--- a/sys/arch/mac68k/dev/mac68k5380.c
+++ b/sys/arch/mac68k/dev/mac68k5380.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mac68k5380.c,v 1.14 1995/10/01 05:10:20 briggs Exp $ */
+/* $NetBSD: mac68k5380.c,v 1.15 1995/11/01 04:59:03 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs
@@ -376,9 +376,10 @@ extern int *nofault, mac68k_buserr_addr;
count = ( (u_long) mac68k_buserr_addr
- (u_long) ncr_5380_with_drq);
if ((count < 0) || (count > pending_5380_count)) {
- printf("pdma in: count = %d (0x%x) (pending "
- "count %d)\n", count, count,
- pending_5380_count);
+ printf("pdma %s: count = %d (0x%x) (pending "
+ "count %d)\n",
+ (pdma_5380_dir == 2) ? "in" : "out",
+ count, count, pending_5380_count);
panic("something is wrong");
}
diff --git a/sys/arch/mac68k/dev/ncr5380.c b/sys/arch/mac68k/dev/ncr5380.c
index a6af97e3df5..c6d4798ca90 100644
--- a/sys/arch/mac68k/dev/ncr5380.c
+++ b/sys/arch/mac68k/dev/ncr5380.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380.c,v 1.10.2.2 1995/10/31 21:47:49 briggs Exp $ */
+/* $NetBSD: ncr5380.c,v 1.14 1995/12/04 02:10:44 briggs Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -68,6 +68,17 @@ u_char dbg_target_mask = 0x7f;
*/
u_char ncr5380_no_parchk = 0xff;
+#ifdef AUTO_SENSE
+
+/*
+ * Bit masks of targets that accept linked commands, and those
+ * that we've already checked out
+ */
+u_char ncr_will_link = 0x00;
+u_char ncr_test_link = 0x00;
+
+#endif /* AUTO_SENSE */
+
/*
* This is the default sense-command we send.
*/
@@ -191,7 +202,6 @@ extern __inline__ void finish_req(SC_REQ *reqp)
if (reqp->xs->error != 0)
show_request(reqp, "ERR_RET");
#endif
-
/*
* Return request to free-q
*/
@@ -201,7 +211,8 @@ extern __inline__ void finish_req(SC_REQ *reqp)
splx(sps);
xs->flags |= ITSDONE;
- scsi_done(xs);
+ if (!(reqp->dr_flag & DRIVER_LINKCHK))
+ scsi_done(xs);
}
/*
@@ -306,7 +317,7 @@ static int
ncr5380_scsi_cmd(struct scsi_xfer *xs)
{
int sps;
- SC_REQ *reqp;
+ SC_REQ *reqp, *link, *tmp;
int flags = xs->flags;
/*
@@ -375,27 +386,59 @@ ncr5380_scsi_cmd(struct scsi_xfer *xs)
* Interrupts are disabled while we are fiddling with the issue-queue.
*/
sps = splbio();
+ link = NULL;
if ((issue_q == NULL) || (reqp->xcmd.opcode == REQUEST_SENSE)) {
reqp->next = issue_q;
issue_q = reqp;
}
else {
- SC_REQ *tmp, *link;
-
tmp = issue_q;
- link = NULL;
do {
if (!link && (tmp->targ_id == reqp->targ_id) && !tmp->link)
link = tmp;
} while (tmp->next && (tmp = tmp->next));
tmp->next = reqp;
#ifdef AUTO_SENSE
- if (link) {
+ if (link && (ncr_will_link & (1<<reqp->targ_id))) {
link->link = reqp;
link->xcmd.bytes[link->xs->cmdlen-2] |= 1;
}
#endif
}
+#ifdef AUTO_SENSE
+ /*
+ * If we haven't already, check the target for link support.
+ * Do this by prefixing the current command with a dummy
+ * Request_Sense command, link the dummy to the current
+ * command, and insert the dummy command at the head of the
+ * issue queue. Set the DRIVER_LINKCHK flag so that we'll
+ * ignore the results of the dummy command, since we only
+ * care about whether it was accepted or not.
+ */
+ if (!link && !(ncr_test_link & (1<<reqp->targ_id)) &&
+ (tmp = free_head) && !(reqp->dr_flag & DRIVER_NOINT)) {
+ free_head = tmp->next;
+ tmp->dr_flag = (reqp->dr_flag & ~DRIVER_DMAOK) | DRIVER_LINKCHK;
+ tmp->phase = NR_PHASE;
+ tmp->msgout = MSG_NOOP;
+ tmp->status = SCSGOOD;
+ tmp->xs = reqp->xs;
+ tmp->targ_id = reqp->targ_id;
+ tmp->targ_lun = reqp->targ_lun;
+ bcopy(sense_cmd, &tmp->xcmd, sizeof(sense_cmd));
+ tmp->xdata_ptr = (u_char *)&tmp->xs->sense;
+ tmp->xdata_len = sizeof(tmp->xs->sense);
+ ncr_test_link |= 1<<tmp->targ_id;
+ tmp->link = reqp;
+ tmp->xcmd.bytes[sizeof(sense_cmd)-2] |= 1;
+ tmp->next = issue_q;
+ issue_q = tmp;
+#ifdef DBG_REQ
+ if (dbg_target_mask & (1 << tmp->targ_id))
+ show_request(tmp, "LINKCHK");
+#endif
+ }
+#endif
splx(sps);
#ifdef DBG_REQ
@@ -844,6 +887,8 @@ SC_REQ *reqp;
reqp->xs->error = code ? code : XS_SELTIMEOUT;
DBG_SELPRINT ("Target %d not responding to sel\n",
reqp->targ_id);
+ if (reqp->dr_flag & DRIVER_LINKCHK)
+ ncr_test_link &= ~(1<<reqp->targ_id);
finish_req(reqp);
PID("scsi_select8");
return (0);
@@ -1532,6 +1577,17 @@ int linked;
int sps;
/*
+ * If this is the driver's Link Check for this target, ignore
+ * the results of the command. All we care about is whether we
+ * got here from a LINK_CMD_COMPLETE or CMD_COMPLETE message.
+ */
+ PID("linkcheck");
+ if (reqp->dr_flag & DRIVER_LINKCHK) {
+ if (linked)
+ ncr_will_link |= 1<<reqp->targ_id;
+ return (0);
+ }
+ /*
* If we not executing an auto-sense and the status code
* is request-sense, we automatically issue a request
* sense command.
@@ -1551,7 +1607,7 @@ int linked;
issue_q = reqp;
splx(sps);
}
- else reqp->xcmd.bytes[4] |= 1;
+ else reqp->xcmd.bytes[sizeof(sense_cmd)-2] |= 1;
#ifdef DBG_REQ
bzero(reqp->xdata_ptr, reqp->xdata_len);
@@ -1875,9 +1931,10 @@ show_request(reqp, qtxt)
SC_REQ *reqp;
char *qtxt;
{
- printf("REQ-%s: %d %x[%d] cmd[0]=%x S=%x M=%x R=%x resid=%d %s\n",
+ printf("REQ-%s: %d %x[%d] cmd[0]=%x S=%x M=%x R=%x resid=%d dr_flag=%x %s\n",
qtxt, reqp->targ_id, reqp->xdata_ptr, reqp->xdata_len,
reqp->xcmd.opcode, reqp->status, reqp->message,
+ reqp->dr_flag,
reqp->xs->error, reqp->xs->resid, reqp->link ? "L":"");
if (reqp->status == SCSCHKC)
show_data_sense(reqp->xs);
diff --git a/sys/arch/mac68k/dev/ncr5380reg.h b/sys/arch/mac68k/dev/ncr5380reg.h
index 60a7a7c7653..a19f41f3fca 100644
--- a/sys/arch/mac68k/dev/ncr5380reg.h
+++ b/sys/arch/mac68k/dev/ncr5380reg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380reg.h,v 1.4 1995/10/02 09:03:54 briggs Exp $ */
+/* $NetBSD: ncr5380reg.h,v 1.5 1995/12/04 02:10:46 briggs Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -219,6 +219,7 @@ typedef struct req_q {
#define DRIVER_NOINT 0x04 /* We are booting: no interrupts */
#define DRIVER_DMAOK 0x08 /* DMA can be used on this request */
#define DRIVER_BOUNCING 0x10 /* Using the bounce buffer */
+#define DRIVER_LINKCHK 0x20 /* Doing the linked command check */
/* XXX: Should go to ncr5380var.h */
static SC_REQ *issue_q = NULL; /* Commands waiting to be issued*/
diff --git a/sys/arch/mac68k/dev/rd_root.c b/sys/arch/mac68k/dev/rd_root.c
new file mode 100644
index 00000000000..e7ac28a3040
--- /dev/null
+++ b/sys/arch/mac68k/dev/rd_root.c
@@ -0,0 +1,79 @@
+/* $NetBSD: rd_root.c,v 1.1 1995/11/21 04:53:20 briggs Exp $ */
+
+/*
+ * Copyright (c) 1995 Gordon W. Ross
+ * 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. 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.
+ */
+
+#include <sys/param.h>
+#include <sys/reboot.h>
+
+#include <dev/ramdisk.h>
+
+extern int boothowto;
+
+#ifndef MINIROOTSIZE
+#define MINIROOTSIZE 512
+#endif
+
+#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
+
+/*
+ * This array will be patched to contain a file-system image.
+ * See the program: src/distrib/sun3/common/rdsetroot.c
+ */
+int rd_root_size = ROOTBYTES;
+char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
+
+/*
+ * This is called during autoconfig.
+ */
+void
+rd_attach_hook(unit, rd)
+ int unit;
+ struct rd_conf *rd;
+{
+ if (unit == 0) {
+ /* Setup root ramdisk */
+ rd->rd_addr = (caddr_t) rd_root_image;
+ rd->rd_size = (size_t) rd_root_size;
+ rd->rd_type = RD_KMEM_FIXED;
+ printf(" fixed, %d blocks", MINIROOTSIZE);
+ }
+}
+
+/*
+ * This is called during open (i.e. mountroot)
+ */
+void
+rd_open_hook(unit, rd)
+ int unit;
+ struct rd_conf *rd;
+{
+ if (unit == 0) {
+ /* The root ramdisk only works single-user. */
+ boothowto |= RB_SINGLE;
+ }
+}
diff --git a/sys/arch/mac68k/mac68k/autoconf.c b/sys/arch/mac68k/mac68k/autoconf.c
index 81e240db18f..edc9439ec04 100644
--- a/sys/arch/mac68k/mac68k/autoconf.c
+++ b/sys/arch/mac68k/mac68k/autoconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.19.2.1 1995/10/14 22:26:33 briggs Exp $ */
+/* $NetBSD: autoconf.c,v 1.20 1995/11/01 04:59:31 briggs Exp $ */
/*
* Copyright (c) 1988 University of Utah.
diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c
index 5c702162214..84ac08fa8b8 100644
--- a/sys/arch/mac68k/mac68k/conf.c
+++ b/sys/arch/mac68k/mac68k/conf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.28 1995/08/17 17:40:52 thorpej Exp $ */
+/* $NetBSD: conf.c,v 1.29 1995/11/21 03:39:45 briggs Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -94,6 +94,9 @@ bdev_decl(ch);
bdev_decl(vnd);
#include "ccd.h"
bdev_decl(ccd);
+#include "rd.h"
+bdev_decl(rd);
+/* No cdev for rd */
#ifdef LKM
int lkmenodev();
@@ -113,12 +116,16 @@ struct bdevsw bdevsw[] =
bdev_notdef(), /* 7 */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
- bdev_lkm_dummy(), /* 10 */
- bdev_lkm_dummy(), /* 11 */
- bdev_lkm_dummy(), /* 12 */
- bdev_lkm_dummy(), /* 13 */
+ bdev_notdef(), /* 10 */
+ bdev_notdef(), /* 11 */
+ bdev_notdef(), /* 12 */
+ bdev_disk_init(NRD,rd), /* 13: RAM disk -- for install */
bdev_lkm_dummy(), /* 14 */
bdev_lkm_dummy(), /* 15 */
+ bdev_lkm_dummy(), /* 16 */
+ bdev_lkm_dummy(), /* 17 */
+ bdev_lkm_dummy(), /* 18 */
+ bdev_lkm_dummy(), /* 19 */
};
int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
diff --git a/sys/arch/mac68k/mac68k/locore.s b/sys/arch/mac68k/mac68k/locore.s
index 1efee961a1f..0566a16ee32 100644
--- a/sys/arch/mac68k/mac68k/locore.s
+++ b/sys/arch/mac68k/mac68k/locore.s
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.51 1995/10/10 04:14:18 briggs Exp $ */
+/* $NetBSD: locore.s,v 1.52 1995/12/11 02:38:08 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1758,81 +1758,6 @@ ENTRY(_remque)
movw d0,sr
rts
-ENTRY(memcpy)
- movl sp@(12),d0 | get count
- jeq Lcpyexit | if zero, return
- movl sp@(8), a0 | src address
- movl sp@(4), a1 | dest address
- jra Ldocopy | jump into bcopy
-/*
- * {ov}bcopy(from, to, len)
- *
- * Works for counts up to 128K.
- */
-ALTENTRY(ovbcopy, _bcopy)
-ENTRY(bcopy)
- movl sp@(12),d0 | get count
- jeq Lcpyexit | if zero, return
- movl sp@(4),a0 | src address
- movl sp@(8),a1 | dest address
-Ldocopy:
- cmpl a1,a0 | src before dest?
- jlt Lcpyback | yes, copy backwards (avoids overlap)
- movl a0,d1
- btst #0,d1 | src address odd?
- jeq Lcfeven | no, go check dest
- movb a0@+,a1@+ | yes, copy a byte
- subql #1,d0 | update count
- jeq Lcpyexit | exit if done
-Lcfeven:
- movl a1,d1
- btst #0,d1 | dest address odd?
- jne Lcfbyte | yes, must copy by bytes
- movl d0,d1 | no, get count
- lsrl #2,d1 | convert to longwords
- jeq Lcfbyte | no longwords, copy bytes
- subql #1,d1 | set up for dbf
-Lcflloop:
- movl a0@+,a1@+ | copy longwords
- dbf d1,Lcflloop | til done
- andl #3,d0 | get remaining count
- jeq Lcpyexit | done if none
-Lcfbyte:
- subql #1,d0 | set up for dbf
-Lcfbloop:
- movb a0@+,a1@+ | copy bytes
- dbf d0,Lcfbloop | til done
-Lcpyexit:
- rts
-Lcpyback:
- addl d0,a0 | add count to src
- addl d0,a1 | add count to dest
- movl a0,d1
- btst #0,d1 | src address odd?
- jeq Lcbeven | no, go check dest
- movb a0@-,a1@- | yes, copy a byte
- subql #1,d0 | update count
- jeq Lcpyexit | exit if done
-Lcbeven:
- movl a1,d1
- btst #0,d1 | dest address odd?
- jne Lcbbyte | yes, must copy by bytes
- movl d0,d1 | no, get count
- lsrl #2,d1 | convert to longwords
- jeq Lcbbyte | no longwords, copy bytes
- subql #1,d1 | set up for dbf
-Lcblloop:
- movl a0@-,a1@- | copy longwords
- dbf d1,Lcblloop | til done
- andl #3,d0 | get remaining count
- jeq Lcpyexit | done if none
-Lcbbyte:
- subql #1,d0 | set up for dbf
-Lcbbloop:
- movb a0@-,a1@- | copy bytes
- dbf d0,Lcbbloop | til done
- rts
-
/*
* Save and restore 68881 state.
* Pretty awful looking since our assembler does not
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index d410a95d648..83999dd5e78 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.80 1995/10/07 06:25:48 mycroft Exp $ */
+/* $NetBSD: machdep.c,v 1.82 1995/11/21 04:00:43 briggs Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -123,11 +123,6 @@
#include <dev/cons.h>
-#ifdef COMPAT_SUNOS
-#include <compat/sunos/sunos_syscall.h>
-extern struct emul emul_sunos;
-#endif
-
#include "via.h"
#include "macrom.h"
#include "ether.h"
@@ -840,6 +835,10 @@ boot(howto)
savectx(&dumppcb);
dumpsys();
}
+
+ /* run any shutdown hooks */
+ doshutdownhooks();
+
/*
* Map ROM where the MacOS likes it, so we can reboot,
* hopefully.
@@ -2066,7 +2065,7 @@ setmachdep()
IOBase = 0x50f00000;
Via1Base = (volatile u_char *) IOBase;
mac68k_machine.scsi80 = 1;
- mac68k_machine.sccClkConst = 122400;
+ mac68k_machine.sccClkConst = 115200;
via_reg(VIA1, vIER) = 0x7f; /* disable VIA1 int */
via_reg(VIA2, rIER) = 0x7f; /* disable RBV int */
break;
@@ -2075,7 +2074,7 @@ setmachdep()
IOBase = 0x50f00000;
Via1Base = (volatile u_char *) IOBase;
mac68k_machine.scsi80 = 1;
- mac68k_machine.sccClkConst = 122400;
+ mac68k_machine.sccClkConst = 115200;
via_reg(VIA1, vIER) = 0x7f; /* disable VIA1 int */
via_reg(VIA2, rIER) = 0x7f; /* disable RBV int */
break;
diff --git a/sys/arch/mac68k/mac68k/pmap.c b/sys/arch/mac68k/mac68k/pmap.c
index d9f3b1cc551..89fe92aaf42 100644
--- a/sys/arch/mac68k/mac68k/pmap.c
+++ b/sys/arch/mac68k/mac68k/pmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.21 1995/10/10 04:14:30 briggs Exp $ */
+/* $NetBSD: pmap.c,v 1.22 1995/12/03 13:52:50 briggs Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -474,7 +474,8 @@ pmap_init()
* map where we want it.
*/
addr = MAC_PTBASE;
- s = min(MAC_PTMAXSIZE, maxproc*MAC_MAX_PTSIZE);
+ s = (MAC_PTMAXSIZE / MAC_MAX_PTSIZE < maxproc) ?
+ MAC_PTMAXSIZE : (maxproc * MAC_MAX_PTSIZE);
addr2 = addr + s;
rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
if (rv != KERN_SUCCESS)
@@ -1386,7 +1387,7 @@ validate:
if (mmutype == MMU_68040 && pmap != pmap_kernel() &&
(curproc->p_md.md_flags & MDP_UNCACHE_WX) &&
(prot & VM_PROT_EXECUTE) && (prot & VM_PROT_WRITE))
- checkpv = cacheable = FALSE;
+ checkpv = cacheable = FALSE;
if (!checkpv && !cacheable)
npte |= PG_CI;
diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c
index bddb9d73608..38e447d9ecd 100644
--- a/sys/arch/mac68k/mac68k/vm_machdep.c
+++ b/sys/arch/mac68k/mac68k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.13 1995/06/21 03:45:10 briggs Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.14 1995/12/09 04:37:48 mycroft Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -73,7 +73,7 @@ extern int fpu_type;
* address in each process; in the future we will probably relocate
* the frame pointers on the stack after copying.
*/
-int
+void
cpu_fork(p1, p2)
register struct proc *p1, *p2;
{
@@ -105,8 +105,6 @@ cpu_fork(p1, p2)
pcb->pcb_regs[6] = (int)child_return; /* A2 */
pcb->pcb_regs[7] = (int)p2; /* A3 */
pcb->pcb_regs[11] = (int)sf; /* SSP */
-
- return (0);
}
/*