some cleanup and various fixes for new fs code. plus some general

fixes from from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
This commit is contained in:
chopps 1994-06-13 08:12:30 +00:00
parent 8ed58a738d
commit 6729c03f86
22 changed files with 235 additions and 408 deletions

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: autoconf.c,v 1.22 1994/06/04 11:58:38 chopps Exp $
* $Id: autoconf.c,v 1.23 1994/06/13 08:12:30 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -198,14 +198,14 @@ mbattach(pdp, dp, auxp)
config_found(dp, "kbd", simple_devprint);
config_found(dp, "grfcc", simple_devprint);
config_found(dp, "fdc", simple_devprint);
if (is_a4000())
config_found(dp, "idesc", simple_devprint);
config_found(dp, "ztwobus", simple_devprint);
if (is_a3000())
config_found(dp, "ahsc", simple_devprint);
if (is_a3000() || is_a4000()) {
config_found(dp, "zthreebus", simple_devprint);
}
if (is_a4000())
config_found(dp, "idesc", simple_devprint);
}
int

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: machdep.c 1.63 91/04/24$
*
* @(#)machdep.c 7.16 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.29 1994/06/04 11:58:50 chopps Exp $
* $Id: machdep.c,v 1.30 1994/06/13 08:12:32 chopps Exp $
*/
#include <sys/param.h>
@ -1036,7 +1036,7 @@ bootsync(void)
if (nbusy == 0)
break;
printf("%d ", nbusy);
DELAY(40000 * iter);
delay(40000 * iter);
}
if (nbusy)
printf("giving up\n");
@ -1534,8 +1534,8 @@ nmihand(frame)
#endif
regdump(rp, sbytes)
int *rp; /* must not be register */
regdump(fp, sbytes)
struct frame *fp; /* must not be register */
int sbytes;
{
static int doingdump = 0;
@ -1547,8 +1547,8 @@ regdump(rp, sbytes)
return;
s = splhigh();
doingdump = 1;
printf("pid = %d, pc = %s, ", curproc->p_pid, hexstr(rp[PC], 8));
printf("ps = %s, ", hexstr(rp[PS], 4));
printf("pid = %d, pc = %s, ", curproc->p_pid, hexstr(fp->f_pc, 8));
printf("ps = %s, ", hexstr(fp->f_sr, 4));
printf("sfc = %s, ", hexstr(getsfc(), 4));
printf("dfc = %s\n", hexstr(getdfc(), 4));
printf("Registers:\n ");
@ -1556,18 +1556,18 @@ regdump(rp, sbytes)
printf(" %d", i);
printf("\ndreg:");
for (i = 0; i < 8; i++)
printf(" %s", hexstr(rp[i], 8));
printf(" %s", hexstr(fp->f_regs[i], 8));
printf("\nareg:");
for (i = 0; i < 8; i++)
printf(" %s", hexstr(rp[i+8], 8));
printf(" %s", hexstr(fp->f_regs[i+8], 8));
if (sbytes > 0) {
if (rp[PS] & PSL_S) {
if (fp->f_sr & PSL_S) {
printf("\n\nKernel stack (%s):",
hexstr((int)(((int *)&rp)-1), 8));
dumpmem(((int *)&rp)-1, sbytes, 0);
hexstr((int)(((int *)&fp)-1), 8));
dumpmem(((int *)&fp)-1, sbytes, 0);
} else {
printf("\n\nUser stack (%s):", hexstr(rp[SP], 8));
dumpmem((int *)rp[SP], sbytes, 1);
printf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8));
dumpmem((int *)fp->f_regs[SP], sbytes, 1);
}
}
doingdump = 0;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)swapgeneric.c 7.5 (Berkeley) 5/7/91
* $Id: swapgeneric.c,v 1.13 1994/05/16 04:50:45 chopps Exp $
* $Id: swapgeneric.c,v 1.14 1994/06/13 08:12:34 chopps Exp $
*/
#include <sys/param.h>
@ -52,8 +52,8 @@
/*
* Only boot on ufs. (XXX?)
*/
extern int ufs_mountroot();
int (*mountroot)() = ufs_mountroot;
int ffs_mountroot();
int (*mountroot)() = ffs_mountroot;
/*
* Generic configuration; all in one

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: trap.c 1.32 91/04/06$
*
* @(#)trap.c 7.15 (Berkeley) 8/2/91
* $Id: trap.c,v 1.20 1994/05/25 07:58:35 chopps Exp $
* $Id: trap.c,v 1.21 1994/06/13 08:12:35 chopps Exp $
*/
#include <sys/param.h>
@ -223,7 +223,7 @@ panictrap(type, code, v, fp)
static int panicing = 0;
if (panicing++ == 0) {
printf("trap type %d, code = %x, v = %x\n", type, code, v);
regdump(fp->f_regs, 128);
regdump(fp, 128);
}
type &= ~T_USER;
DCIS(); /* XXX? push cache */

View File

@ -1,7 +1,7 @@
#
# GENERIC AMIGA
#
# $Id: GENERIC,v 1.16 1994/06/05 18:24:44 chopps Exp $
# $Id: GENERIC,v 1.17 1994/06/13 08:12:48 chopps Exp $
#
# This configuration file contains all possible options
#
@ -52,13 +52,13 @@ options FFS # Berkeley fast file system
options MFS # Memory based filesystem
options PROCFS # Process filesystem
options KERNFS # Kernel parameter filesystem (Recommended)
options MSDOSFS # MS-DOS filesystem
#options MSDOSFS # MS-DOS filesystem
options FDESC # /dev/fd filesystem
options LOFS # Loopback filesystem
options ISOFS # ISO 9660 file system, with Rock Ridge
#options LOFS # Loopback filesystem
#options ISOFS # ISO 9660 file system, with Rock Ridge
options PORTAL # Portal filesystem
options FIFO # FIFO operations on vnodes (Recommended)
options ADOSFS # AmigaDOS file system
#options ADOSFS # AmigaDOS file system
#

View File

@ -1,5 +1,5 @@
# @(#)Makefile.hp300 7.10 (Berkeley) 6/27/91
# $Id: Makefile.amiga,v 1.17 1994/05/11 19:03:34 chopps Exp $
# $Id: Makefile.amiga,v 1.18 1994/06/13 08:12:50 chopps Exp $
#
# Makefile for 4.4 BSD
#
@ -27,14 +27,13 @@ CC= cc ${DEBUG}
CPP= cpp
LD= ld
TOUCH= touch -f -c
GPROF.EX=/usr/src/usr.lib/libc/csu/amiga/gmon.ex
# source tree is located via $S relative to the compilation directory
S= ../../../..
AMIGA= ../..
INCLUDES= -I. -I$S/arch -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Damiga -DREFBIT
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Damiga
CFLAGS= -O -mc68020 -m68881 ${COPTS}
### find out what to use for libkern
@ -56,8 +55,8 @@ DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
PROFILE_C= ${CC} -S -c ${COPTS} $<; \
ex - $*.s < ${GPROF.EX}; \
${AS} -o $@ $*.s; \
sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
${AS} -o $@; \
rm -f $*.s
NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@
@ -72,11 +71,15 @@ NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vers.o ${LIBKERN}
SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vnode_if.o ${LIBKERN}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @strip=-x; [ X${DEBUG} = X-g ] && strip=-X || true; \
${LD} $$strip -T 0 -n -o $@ -e start ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD= -@if [ X${DEBUG} = X-g ]; \
then strip=-X; \
else strip=-x; \
fi; \
echo ${LD} $$strip -n -T 0 -o $@ -e start '$${SYSTEM_OBJ}' vers.o; \
${LD} $$strip -n -T 0 -o $@ -e start ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @size $@; chmod 755 $@; \
[ X${DEBUG} = X-g ] && { \
echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
@ -91,7 +94,7 @@ newvers:
${CC} $(CFLAGS) -c vers.c
clean:
rm -f eddep *netbsd tags *.o locore.i [a-z]*.s \
rm -f eddep *netbsd netbsd.gdb tags *.o locore.i [a-z]*.s \
Errs errs linterrs makelinks
lint: /tmp param.c
@ -110,10 +113,10 @@ autoconf.o: Makefile
# the following are necessary because the files depend on the types of
# hp cpu's included in the system configuration
clock.o machdep.o autoconf.o conf.o: Makefile
machdep.o sys_machdep.o pmap.o pmap_bootstrap.o trap.o dma.o: Makefile
# depend on network configuration
af.o uipc_proto.o locore.o: Makefile
# depend on network or filesystem configuration
uipc_proto.o vfs_conf.o locore.o: Makefile
# depend on maxusers
assym.s: Makefile
@ -125,7 +128,7 @@ genassym:
${CC} -static ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Damiga \
-o genassym ${AMIGA}/amiga/genassym.c
depend: assym.s param.c
depend: assym.s param.c vnode_if.h
mkdep ${COPTS} ${CFILES} ioconf.c param.c
mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${AMIGA}/amiga/genassym.c
@ -149,5 +152,9 @@ param.c: $S/conf/param.c
param.o: param.c Makefile
${CC} -c ${CFLAGS} ${PARAM} param.c
vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
%RULES

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: clock.c 1.18 91/01/21$
*
* @(#)clock.c 7.6 (Berkeley) 5/7/91
* $Id: clock.c,v 1.2 1994/05/09 06:38:37 chopps Exp $
* $Id: clock.c,v 1.3 1994/06/13 08:12:54 chopps Exp $
*/
#include <sys/param.h>
@ -112,6 +112,8 @@ clockattach(pdp, dp, auxp)
* stop timer A
*/
ciab.cra = ciab.cra & 0xc0;
ciab.icr = 1 << 0; /* disable timer A interrupt */
interval = ciab.icr; /* and make sure it's clear */
/*
* load interval into registers.

View File

@ -1,5 +1,5 @@
/*
* $Id: grf_cc.c,v 1.12 1994/05/08 05:53:04 chopps Exp $
* $Id: grf_cc.c,v 1.13 1994/06/13 08:12:55 chopps Exp $
*/
#include "grf.h"
@ -104,6 +104,7 @@ grfccattach(pdp, dp, auxp)
(char *)&gp[1] - (char *)&gp->g_display);
} else {
gp->g_unit = GRF_CC_UNIT;
gp->g_flags = GF_ALIVE;
gp->g_mode = cc_mode;
gp->g_conpri = grfcc_cnprobe();
grfcc_iteinit(gp);

View File

@ -66,7 +66,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: idesc.c,v 1.2 1994/05/22 19:05:10 chopps Exp $
* $Id: idesc.c,v 1.3 1994/06/13 08:12:56 chopps Exp $
*
*
*/
@ -352,7 +352,7 @@ idescattach(pdp, dp, auxp)
return;
/* test if controller will reset */
if (idereset(sc) != 0) {
DELAY (5000000);
delay (500000);
if (idereset(sc) != 0) {
printf (" IDE controller did not reset\n");
return;
@ -651,7 +651,7 @@ idewait (sc, mask)
printf ("idewait timeout %02x\n", regs->ide_status);
return (-1);
}
DELAY (10000);
delay (1000);
}
if (regs->ide_status & IDES_ERR)
printf ("idewait: error %02x %02x\n", regs->ide_error,

View File

@ -37,7 +37,7 @@
*
* from: Utah Hdr: ite.c 1.1 90/07/09
* from: @(#)ite.c 7.6 (Berkeley) 5/16/91
* $Id: ite.c,v 1.19 1994/06/05 07:45:15 chopps Exp $
* $Id: ite.c,v 1.20 1994/06/13 08:12:58 chopps Exp $
*/
/*
@ -870,14 +870,14 @@ ite_filter(c, caller)
(kbd_ite && kbd_ite->keypad_appmode)) {
static char *in = "0123456789-+.\r()/*";
static char *out = "pqrstuvwxymlnMPQRS";
char *cp;
char *cp = index (in, code);
/*
* keypad-appmode sends SS3 followed by the above
* translated character
*/
(*linesw[kbd_tty->t_line].l_rint) (27, kbd_tty);
(*linesw[kbd_tty->t_line].l_rint) ('0', kbd_tty);
(*linesw[kbd_tty->t_line].l_rint) ('O', kbd_tty);
(*linesw[kbd_tty->t_line].l_rint) (out[cp - in], kbd_tty);
splx(s);
return;
@ -1445,9 +1445,9 @@ doesc:
case 'Z': /* request ID */
if (ip->emul_level == EMUL_VT100)
ite_sendstr (ip, "\033[61;0c"); /* XXX not clean */
ite_sendstr ("\033[?61;0c"); /* XXX not clean */
else
ite_sendstr (ip, "\033[63;0c"); /* XXX not clean */
ite_sendstr ("\033[?63;0c"); /* XXX not clean */
ip->escape = 0;
return;
@ -1568,16 +1568,16 @@ doesc:
*ip->ap = 0;
if (ip->argbuf[0] == '>')
{
ite_sendstr (ip, "\033[>24;0;0;0c");
ite_sendstr ("\033[>24;0;0;0c");
}
else switch (ite_zargnum(ip))
{
case 0:
/* primary DA request, send primary DA response */
if (ip->emul_level == EMUL_VT100)
ite_sendstr (ip, "\033[?1;1c");
ite_sendstr ("\033[?1;1c");
else
ite_sendstr (ip, "\033[63;0c");
ite_sendstr ("\033[?63;1c");
break;
}
ip->escape = 0;
@ -1587,13 +1587,13 @@ doesc:
switch (ite_zargnum(ip))
{
case 5:
ite_sendstr (ip, "\033[0n"); /* no malfunction */
ite_sendstr ("\033[0n"); /* no malfunction */
break;
case 6:
/* cursor position report */
sprintf (ip->argbuf, "\033[%d;%dR",
ip->cury + 1, ip->curx + 1);
ite_sendstr (ip, ip->argbuf);
ite_sendstr (ip->argbuf);
break;
}
ip->escape = 0;
@ -1605,10 +1605,10 @@ doesc:
{
case 0:
/* Fake some terminal parameters. */
ite_sendstr (ip, "\033[2;1;1;112;112;1;0x");
ite_sendstr ("\033[2;1;1;112;112;1;0x");
break;
case 1:
ite_sendstr (ip, "\033[3;1;1;112;112;1;0x");
ite_sendstr ("\033[3;1;1;112;112;1;0x");
break;
}
ip->escape = 0;
@ -1928,7 +1928,7 @@ doesc:
case 'u':
/* DECRQTSR */
ite_sendstr (ip, "\033P\033\\");
ite_sendstr ("\033P\033\\");
ip->escape = 0;
return;
@ -1961,15 +1961,15 @@ doesc:
{
if (! strncmp (ip->argbuf, "15", 2))
/* printer status: no printer */
ite_sendstr (ip, "\033[13n");
ite_sendstr ("\033[13n");
else if (! strncmp (ip->argbuf, "25", 2))
/* udk status */
ite_sendstr (ip, "\033[20n");
ite_sendstr ("\033[20n");
else if (! strncmp (ip->argbuf, "26", 2))
/* keyboard dialect: US */
ite_sendstr (ip, "\033[27;1n");
ite_sendstr ("\033[27;1n");
}
ip->escape = 0;
return;

View File

@ -1,5 +1,5 @@
/*
* $Id: ite_cc.c,v 1.17 1994/05/25 11:33:05 chopps Exp $
* $Id: ite_cc.c,v 1.18 1994/06/13 08:13:00 chopps Exp $
*/
#include <sys/param.h>
@ -114,7 +114,7 @@ grfcc_cnprobe()
}
/*
* called form grf_cc to init ite portion of
* called from grf_cc to init ite portion of
* grf_softc struct
*/
void

View File

@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)ivsdma.c
* $Id: ivsc.c,v 1.2 1994/05/29 04:50:12 chopps Exp $
* $Id: ivsc.c,v 1.3 1994/06/13 08:13:02 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -142,6 +142,8 @@ ivscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct ztwobus_args *zap;
printf("\n");
zap = auxp;
sc = (struct sci_softc *)dp;

View File

@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)dma.c
* $Id: mlhsc.c,v 1.2 1994/05/29 04:50:16 chopps Exp $
* $Id: mlhsc.c,v 1.3 1994/06/13 08:13:03 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -115,6 +115,8 @@ mlhscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct ztwobus_args *zap;
printf("\n");
zap = auxp;
sc = (struct sci_softc *)dp;
@ -203,70 +205,23 @@ mlhsc_dma_xfer_in (dev, len, buf, phase)
}
}
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
#define R1 (*buf++ = *sci_dma)
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
len -= 128;
}
while (len > 0) {
@ -341,38 +296,15 @@ mlhsc_dma_xfer_out (dev, len, buf, phase)
}
}
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
#define W1 (*sci_dma = *buf++)
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
W1; W1; W1; W1; W1; W1; W1; W1;
len -= 64;
}
while (len > 0) {

View File

@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)csa12gdma.c
* $Id: otgsc.c,v 1.2 1994/05/29 04:50:19 chopps Exp $
* $Id: otgsc.c,v 1.3 1994/06/13 08:13:04 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -100,7 +100,7 @@ otgscmatch(pdp, cdp, auxp)
/*
* Check manufacturer and product id.
*/
if (zap->manid == 2011 && zap->prodid == 1)
if (zap->manid == 1058 && zap->prodid == 21)
return(1);
else
return(0);
@ -115,6 +115,8 @@ otgscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct ztwobus_args *zap;
printf("\n");
zap = auxp;
sc = (struct sci_softc *)dp;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)scsi.c 7.5 (Berkeley) 5/4/91
* $Id: sci.c,v 1.5 1994/05/29 04:50:21 chopps Exp $
* $Id: sci.c,v 1.6 1994/06/13 08:13:05 chopps Exp $
*/
/*
@ -361,7 +361,7 @@ scireset(dev)
*/
*dev->sci_icmd = SCI_ICMD_TEST;
*dev->sci_icmd = SCI_ICMD_TEST | SCI_ICMD_RST;
DELAY (25);
delay (25);
*dev->sci_icmd = 0;
/*
@ -426,7 +426,7 @@ sciselectbus(dev, target, our_addr)
*dev->sci_icmd = SCI_ICMD_DATA|SCI_ICMD_SEL;
while ((*dev->sci_bus_csr & SCI_BUS_BSY) == 0) {
if (--timeo > 0) {
DELAY(100);
delay(100);
} else {
break;
}
@ -467,7 +467,7 @@ sci_ixfer_out(dev, len, buf, phase)
#endif
return (len);
}
DELAY(1);
delay(1);
csr = *dev->sci_bus_csr;
}
@ -516,7 +516,7 @@ sci_ixfer_in(dev, len, buf, phase)
return;
}
DELAY(1);
delay(1);
csr = *sci_bus_csr;
}

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)siop.c 7.5 (Berkeley) 5/4/91
* $Id: siop.c,v 1.10 1994/05/22 07:22:33 chopps Exp $
* $Id: siop.c,v 1.11 1994/06/13 08:13:06 chopps Exp $
*/
/*
@ -62,9 +62,9 @@ extern u_int kvtop();
* SCSI delays
* In u-seconds, primarily for state changes on the SPC.
*/
#define SCSI_CMD_WAIT 50000 /* wait per step of 'immediate' cmds */
#define SCSI_DATA_WAIT 50000 /* wait per data in/out step */
#define SCSI_INIT_WAIT 50000 /* wait per step (both) during init */
#define SCSI_CMD_WAIT 500000 /* wait per step of 'immediate' cmds */
#define SCSI_DATA_WAIT 500000 /* wait per data in/out step */
#define SCSI_INIT_WAIT 500000 /* wait per step (both) during init */
int siopicmd __P((struct siop_softc *, int, void *, int, void *, int));
int siopgo __P((struct siop_softc *, struct scsi_xfer *));
@ -486,7 +486,7 @@ siopabort(dev, regs, where)
/* ok, get more drastic.. */
SET_SBIC_cmd (regs, SBIC_CMD_RESET);
DELAY(25);
delay(25);
SBIC_WAIT(regs, SBIC_ASR_INT, 0);
GET_SBIC_csr (regs, csr); /* clears interrupt also */
@ -588,7 +588,7 @@ siopreset(dev)
splx (s);
DELAY (siop_reset_delay * 10000);
delay (siop_reset_delay * 1000);
printf("siop id %d reset\n", my_id);
dev->sc_flags |= SIOP_ALIVE;
dev->sc_flags &= ~(SIOP_SELECTED | SIOP_DMA);
@ -707,7 +707,9 @@ siop_setup (dev, target, cbuf, clen, buf, len)
else
regs->siop_scratch = regs->siop_scratch & ~0xff00;
regs->siop_dsa = (long) kvtop(&dev->sc_ds);
#if 1
DCIS(); /* push data cache */
#endif
regs->siop_dsp = (long) kvtop(scripts);
}
@ -786,7 +788,9 @@ siop_checkintr(dev, istat, dstat, sstat0, status)
scsi_period_to_siop (dev, target);
}
}
#if 1
DCIAS(kvtop(&dev->sc_stat)); /* XXX */
#endif
*status = dev->sc_stat[0];
return 1;
}
@ -977,7 +981,7 @@ siopicmd(dev, target, cbuf, clen, buf, len)
i = siop_cmd_wait << 2;
/* XXXX need an upper limit and reset */
}
DELAY(1);
delay(1);
}
dstat = regs->siop_dstat;
sstat0 = regs->siop_sstat0;

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: view.c,v 1.8 1994/05/08 05:53:49 chopps Exp $
* $Id: view.c,v 1.9 1994/06/13 08:13:08 chopps Exp $
*/
/* The view major device is a placeholder device. It serves
@ -44,18 +44,7 @@
#include <sys/device.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <machine/cpu.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <miscfs/specfs/specdev.h>
#include <sys/vnode.h>
#include <sys/mman.h>
#include <amiga/dev/grfabs_reg.h>
#include <amiga/dev/viewioctl.h>
#include <amiga/dev/viewvar.h>

View File

@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)supradma.c
* $Id: wstsc.c,v 1.2 1994/05/29 04:50:25 chopps Exp $
* $Id: wstsc.c,v 1.3 1994/06/13 08:13:09 chopps Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -121,6 +121,8 @@ wstscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct ztwobus_args *zap;
printf("\n");
zap = auxp;
sc = (struct sci_softc *)dp;
@ -217,70 +219,23 @@ wstsc_dma_xfer_in (dev, len, buf, phase)
}
}
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
#define R1 (*buf++ = *sci_dma)
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
R1; R1; R1; R1; R1; R1; R1; R1;
len -= 128;
}
@ -409,38 +364,15 @@ wstsc_dma_xfer_in2 (dev, len, buf, phase)
;
#endif
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
*buf++ = *sci_dma; *buf++ = *sci_dma;
#define R2 (*buf++ = *sci_dma)
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
len -= 128;
}
while (len > 0) {
@ -501,6 +433,40 @@ wstsc_dma_xfer_out2 (dev, len, buf, phase)
*dev->sci_mode = SCI_MODE_DMA;
*dev->sci_icmd = SCI_ICMD_DATA;
*dev->sci_dma_send = 0;
while (len > 64) {
#if 0
wait = sci_data_wait;
while ((*sci_csr & (SCI_CSR_DREQ|SCI_CSR_PHASE_MATCH)) !=
(SCI_CSR_DREQ|SCI_CSR_PHASE_MATCH)) {
if (!(*sci_csr & SCI_CSR_PHASE_MATCH)
|| !(*dev->sci_bus_csr & SCI_BUS_BSY)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
printf("supradma_out2 fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode = 0;
return 0;
}
}
#else
*dev->sci_mode = 0;
*dev->sci_icmd &= ~SCI_ICMD_ACK;
while (!(*sci_bus_csr & SCI_BUS_REQ))
;
*dev->sci_mode = SCI_MODE_DMA;
*dev->sci_dma_send = 0;
#endif
#define W2 (*sci_dma = *buf++)
W2; W2; W2; W2; W2; W2; W2; W2;
W2; W2; W2; W2; W2; W2; W2; W2;
if (*(sci_bus_csr + 0x10) & SCI_BUS_REQ)
;
len -= 64;
}
while (len > 0) {
#if 0
wait = sci_data_wait;
@ -527,25 +493,10 @@ wstsc_dma_xfer_out2 (dev, len, buf, phase)
*dev->sci_dma_send = 0;
#endif
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++; *sci_dma = *buf++;
*sci_dma = *buf++;
if (*(sci_bus_csr + 0x10) & SCI_BUS_REQ)
;
len -= 64;
len -= 2;
}
#if 0

View File

@ -142,11 +142,6 @@ zthreeattach(pdp, dp, auxp)
if (amiga_realconfig) {
if (ZTHREEAVAIL)
printf (" I/O size 0x%08x", ZTHREEAVAIL);
#if 0
if (ZTHREEMEMADDR)
printf(" mem %08x-%08x\n", ZTHREEMEMADDR,
ZTHREEMEMADDR + NZTHREEMEMPG * NBPG - 1);
#endif
printf("\n");
}
@ -167,9 +162,9 @@ zthreeattach(pdp, dp, auxp)
else {
/*
* check that its from zorro III space
* (board type = Zorro III and not memory)
*/
if ((u_long)za.pa >= ZTHREETOP ||
(u_long)za.pa < ZTHREEBASE)
if ((cdp->rom.type & 0xe0) != 0x80)
continue;
za.va = (void *)(iszthreepa(za.pa) ?
zthreemap(za.pa, za.size) : 0);

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ztwobus.c,v 1.6 1994/06/04 11:59:19 chopps Exp $
* $Id: ztwobus.c,v 1.7 1994/06/13 08:13:11 chopps Exp $
*/
#include <sys/param.h>
#include <sys/device.h>
@ -179,12 +179,13 @@ ztwoattach(pdp, dp, auxp)
if (amiga_realconfig == 0 && pcp >= epcp)
continue;
za.pa = cdp->addr;
/*
* check that its from zorro II space
* check if it's a Zorro II board and not linked into
* MemList (i.e. not a memory board)
*/
if ((u_long)za.pa >= 0xF00000 || (u_long)za.pa < 0xE90000)
continue;
if ((cdp->rom.type & 0xe0) != 0xc0)
continue; /* er_Type != ZorroII I/O */
za.pa = cdp->addr;
za.va = (void *) (isztwopa(za.pa) ? ztwomap(za.pa) : 0);
za.size = cdp->size;
za.manid = cdp->rom.manid;

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: vmparam.h 1.16 91/01/18$
*
* @(#)vmparam.h 7.3 (Berkeley) 5/7/91
* $Id: vmparam.h,v 1.10 1994/06/04 05:25:04 chopps Exp $
* $Id: vmparam.h,v 1.11 1994/06/13 08:13:14 chopps Exp $
*/
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
@ -116,19 +116,6 @@
#define SHMMAXPGS (1 * NPTEPG) /* 16mb */
#endif
/*
* Boundary at which to place first MAPMEM segment if not explicitly
* specified. Should be a power of two. This allows some slop for
* the data segment to grow underneath the first mapped segment.
*/
/* XXXX probably too low !?!? */
#define MMSEG 0x200000
/*
* The size of the clock loop.
*/
#define LOOPPAGES (maxfree - firstfree)
/*
* The time for a process to be blocked before being very swappable.
* This is a number of seconds which the system takes as being a non-trivial
@ -157,92 +144,23 @@
protected against replacement */
/*
* DISKRPM is used to estimate the number of paging i/o operations
* which one can expect from a single disk controller.
* user/kernel map constants
*/
#define DISKRPM 60
/*
* Klustering constants. Klustering is the gathering
* of pages together for pagein/pageout, while clustering
* is the treatment of hardware page size as though it were
* larger than it really is.
*
* KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
* units. Note that ctod(KLMAX*CLSIZE) must be <= DMMIN in dmap.h.
* ctob(KLMAX) should also be less than MAXPHYS (in vm_swp.c)
* unless you like "big push" panics.
*/
#define KLMAX (4/CLSIZE)
#define KLSEQL (2/CLSIZE) /* in klust if vadvise(VA_SEQL) */
#define KLIN (4/CLSIZE) /* default data/stack in klust */
#define KLTXT (4/CLSIZE) /* default text in klust */
#define KLOUT (4/CLSIZE)
/*
* KLSDIST is the advance or retard of the fifo reclaim for sequential
* processes data space.
*/
#define KLSDIST 3 /* klusters advance/retard for seq. fifo */
/*
* Paging thresholds (see vm_sched.c).
* Strategy of 1/19/85:
* lotsfree is 512k bytes, but at most 1/4 of memory
* desfree is 200k bytes, but at most 1/8 of memory
* minfree is 64k bytes, but at most 1/2 of desfree
*/
#define LOTSFREE (512 * 1024)
#define LOTSFREEFRACT 4
#define DESFREE (200 * 1024)
#define DESFREEFRACT 8
#define MINFREE (64 * 1024)
#define MINFREEFRACT 2
/*
* There are two clock hands, initially separated by HANDSPREAD bytes
* (but at most all of user memory). The amount of time to reclaim
* a page once the pageout process examines it increases with this
* distance and decreases as the scan rate rises.
*/
#define HANDSPREAD (2 * 1024 * 1024)
/*
* The number of times per second to recompute the desired paging rate
* and poke the pagedaemon.
*/
#define RATETOSCHEDPAGING 4
/*
* Believed threshold (in megabytes) for which interleaved
* swapping area is desirable.
*/
#define LOTSOFMEM 2
#define mapin(pte, v, pfnum, prot) \
(*(u_int *)(pte) = ((pfnum) << PGSHIFT) | (prot), TBIS((caddr_t)(v)))
/*
* Mach derived constants
*/
/* user/kernel map constants */
#define VM_MIN_ADDRESS ((vm_offset_t)0)
#define VM_MAXUSER_ADDRESS ((vm_offset_t)(USRSTACK))
#define VM_MAX_ADDRESS ((vm_offset_t)(0-(UPAGES*NBPG)))
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0)
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(0-NBPG))
/* virtual sizes (bytes) for various kernel submaps */
/*
* virtual sizes (bytes) for various kernel submaps
*/
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
/* # of kernel PT pages (initial only, can grow dynamically) */
/*
* number of kernel PT pages (initial only, can grow dynamically)
*/
#define VM_KERNEL_PT_PAGES ((vm_size_t)1) /* XXX: SYSPTSIZE */
/* pcb base */
#define pcbb(p) ((u_int)(p)->p_addr)
#endif /* !_MACHINE_VMPARAM_H_ */

View File

@ -1,5 +1,5 @@
/*
* $Id: loadbsd.c,v 1.10 1994/05/12 05:57:33 chopps Exp $
* $Id: loadbsd.c,v 1.11 1994/06/13 08:13:16 chopps Exp $
*/
#include <sys/types.h>
@ -47,6 +47,7 @@ OPTIONS
\t-S Include kernel symbol table.
\t-D Enter debugger
\t-V Version of loadbsd program.
\t-c Set machine type.
HISTORY
This version supports Kernel version 720 +
";
@ -79,6 +80,8 @@ struct GfxBase *GfxBase;
* 2.3 04/26/94 - Added -D option to enter debugger on boot.
* 2.4 04/30/94 - Cpuid includes base machine type.
* Also check if CPU is capable of running NetBSD.
* 2.5 05/17/94 - Add check for "A3000 bonus".
* 2.6 06/05/94 - Added -c option to override machine type.
*/
struct MEM_LIST {
@ -110,7 +113,7 @@ void get_cpuid (void);
void Usage (char *program_name);
void Version (void);
static const char _version[] = "$VER: LoadBSD 2.4 (30.4.94)";
static const char _version[] = "$VER: LoadBSD 2.6 (5.6.94)";
int
main (int argc, char *argv[])
@ -146,7 +149,7 @@ main (int argc, char *argv[])
if (! ExpansionBase) /* not supposed to fail... */
abort();
optind = 2;
while ((i = getopt (argc, argv, "kabptVm:SD")) != EOF)
while ((i = getopt (argc, argv, "kabptVm:SDc:")) != EOF)
switch (i) {
case 'k':
k_opt = 1;
@ -175,6 +178,9 @@ main (int argc, char *argv[])
case 'D':
D_opt = 1;
break;
case 'c':
cpuid = atoi (optarg) << 16;
break;
default:
Usage(argv[0]);
fprintf(stderr,"Unrecognized option \n");
@ -427,7 +433,23 @@ get_cpuid ()
u_long *rl;
struct Resident *rm;
cpuid = SysBase->AttnFlags; /* get FPU and CPU flags */
cpuid |= SysBase->AttnFlags; /* get FPU and CPU flags */
if (cpuid & 0xffff0000) {
switch (cpuid >> 16) {
case 500:
case 600:
case 1000:
case 1200:
case 2000:
case 3000:
case 4000:
return;
default:
printf ("Machine type Amiga %d is not valid\n",
cpuid >> 16);
exit (1);
}
}
rl = (u_long *) SysBase->ResModules;
if (rl == NULL)
return;
@ -439,7 +461,8 @@ get_cpuid ()
cpuid |= 4000 << 16;
break;
}
if (strcmp (rm->rt_Name, "A3000 Bonus") == 0) {
if (strcmp (rm->rt_Name, "A3000 bonus") == 0 ||
strcmp (rm->rt_Name, "A3000 Bonus") == 0) {
cpuid |= 3000 << 16;
break;
}