update from my local tree; better CPU configuration, support for 3000/300.
This commit is contained in:
parent
3badd510a0
commit
dd5a5290f2
@ -67,9 +67,12 @@ So, some details on the status of the port, and a list of supported hardware:
|
||||
At this time neither the Smart Frame Buffer nor the
|
||||
ISDN/Audio interface is supported.
|
||||
|
||||
DEC 3000/300 (with the same hardware supported as above;
|
||||
I've not tested these very much at all, on any of the
|
||||
3000/300 models.)
|
||||
|
||||
Unfortunately, at this time none of the following systems are
|
||||
supported:
|
||||
DEC 3000/300s (these shouldn't be too much work)
|
||||
AlphaPCs -- the EISA-bus Alpha systems
|
||||
AlphaStations -- the PCI-bus Alpha systems
|
||||
The Futurebus-based Alpha server systems
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.c,v 1.1 1995/02/13 23:06:55 cgd Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.2 1995/03/08 00:38:48 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -62,11 +62,68 @@ cpuattach(parent, dev, aux)
|
||||
void *aux;
|
||||
{
|
||||
struct pcs *p;
|
||||
char *cpu_major[] = {
|
||||
"UNKNOWN MAJOR TYPE (0)",
|
||||
"EV3",
|
||||
"EV4 (21064)",
|
||||
"UNKNOWN MAJOR TYPE (3)",
|
||||
"LCA4 (21066/21068)",
|
||||
};
|
||||
char *cpu_minor[] = {
|
||||
"Pass 2 or 2.1",
|
||||
"Pass 3",
|
||||
"UNKOWN MINOR TYPE (2)",
|
||||
"Simulated",
|
||||
};
|
||||
int ncpu_major = sizeof(cpu_major) / sizeof(cpu_major[0]);
|
||||
int ncpu_minor = sizeof(cpu_minor) / sizeof(cpu_minor[0]);
|
||||
u_int32_t major, minor;
|
||||
int needcomma, needrev, i;
|
||||
|
||||
p = (struct pcs*)((char *)hwrpb + hwrpb->rpb_pcs_off +
|
||||
(dev->dv_unit * hwrpb->rpb_pcs_size));
|
||||
printf(": 0x%lx 0x%lx, type 0x%lx, var 0x%lx, rev 0x%lx\n",
|
||||
(long)(p->pcs_proc_sn[0]), (long)(p->pcs_proc_sn[8]),
|
||||
(long)p->pcs_proc_type, *((long *)&p->pcs_proc_var),
|
||||
*((long *)p->pcs_proc_revision));
|
||||
printf(": ");
|
||||
|
||||
major = (p->pcs_proc_type & PCS_PROC_MAJOR) >> PCS_PROC_MAJORSHIFT;
|
||||
minor = (p->pcs_proc_type & PCS_PROC_MINOR) >> PCS_PROC_MINORSHIFT;
|
||||
|
||||
if (major < ncpu_major)
|
||||
printf("%s", cpu_major[major]);
|
||||
else
|
||||
printf("UNKNOWN MAJOR TYPE (%d)", major);
|
||||
|
||||
printf(", ");
|
||||
|
||||
if (minor < ncpu_minor)
|
||||
printf("%s", cpu_minor[minor]);
|
||||
else
|
||||
printf("UNKNOWN MINOR TYPE (%d)", minor);
|
||||
|
||||
if (p->pcs_proc_revision[0] != 0) { /* XXX bad test? */
|
||||
printf(", ");
|
||||
|
||||
printf("Revision %c%c%c%c", p->pcs_proc_revision[0],
|
||||
p->pcs_proc_revision[1], p->pcs_proc_revision[2],
|
||||
p->pcs_proc_revision[3]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
if (p->pcs_proc_var != 0) {
|
||||
printf("cpu%d: ", dev->dv_unit);
|
||||
|
||||
needcomma = 0;
|
||||
if (p->pcs_proc_var & PCS_VAR_VAXFP) {
|
||||
printf("VAX FP support");
|
||||
needcomma = 1;
|
||||
}
|
||||
if (p->pcs_proc_var & PCS_VAR_IEEEFP) {
|
||||
printf("%sIEEE FP support", needcomma ? ", " : "");
|
||||
needcomma = 1;
|
||||
}
|
||||
if (p->pcs_proc_var & PCS_VAR_RESERVED)
|
||||
printf("%sreserved bits: 0x%lx", needcomma ? ", " : "",
|
||||
p->pcs_proc_var & PCS_VAR_RESERVED);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.1 1995/02/13 23:07:02 cgd Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.2 1995/03/08 00:38:50 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -109,10 +109,24 @@ u_int32_t no_optimize;
|
||||
|
||||
/* the following is used externally (sysctl_hw) */
|
||||
char machine[] = "alpha";
|
||||
char cpu_model[64];
|
||||
char *cpu_model;
|
||||
char *model_names[] = {
|
||||
"UNKNOWN (0)", "Alpha ADU", "DEC 4000", "DEC 7000", "DEC 3000/[4568]00",
|
||||
"UNKNOWN (5)", "DEC 2000/300", "DEC 3000/300",
|
||||
"UNKNOWN (0)",
|
||||
"Alpha Demonstration Unit",
|
||||
"DEC 4000 (\"Cobra\")",
|
||||
"DEC 7000 (\"Ruby\")",
|
||||
"DEC 3000/500 (\"Flamingo\") family",
|
||||
"UNKNOWN (5)",
|
||||
"DEC 2000/300 (\"Jensen\")",
|
||||
"DEC 3000/300 (\"Pelican\")",
|
||||
"UNKNOWN (8)",
|
||||
"DEC 2100/A500 (\"Sable\")",
|
||||
"AXPvme 64",
|
||||
"AXPpci 33 (\"NoName\")",
|
||||
"UNKNOWN (12)",
|
||||
"DEC 2100/A50 (\"Avanti\")",
|
||||
"Mustang",
|
||||
"DEC 1000 (\"Mikasa\")",
|
||||
};
|
||||
int nmodel_names = sizeof model_names/sizeof model_names[0];
|
||||
|
||||
@ -135,11 +149,7 @@ alpha_init(pfn, ptb, argc, argv, envp)
|
||||
u_long argc;
|
||||
char *argv[], *envp[];
|
||||
{
|
||||
#ifdef __GNUC__ /* XXX */
|
||||
extern char _end[]; /* XXX */
|
||||
#else /* __GNUC__ */ /* XXX */
|
||||
extern char end[]; /* XXX */
|
||||
#endif /* __GNUC__ */ /* XXX */
|
||||
extern char _end[];
|
||||
caddr_t start, v;
|
||||
struct mddt *mddtp;
|
||||
int i;
|
||||
@ -192,9 +202,29 @@ alpha_init(pfn, ptb, argc, argv, envp)
|
||||
*/
|
||||
mddtp = (struct mddt *)(((caddr_t)hwrpb) + hwrpb->rpb_memdat_off);
|
||||
physmem = 0;
|
||||
if (mddtp->mddt_cluster_cnt != 2)
|
||||
if (mddtp->mddt_cluster_cnt != 2) {
|
||||
printf("warning: strange number of memory clusters (%d).\n",
|
||||
mddtp->mddt_cluster_cnt);
|
||||
printf("memory cluster information:\n");
|
||||
for (i = 0; i < mddtp->mddt_cluster_cnt; i++) {
|
||||
printf("mddt %d:\n", i);
|
||||
printf("\tpfn %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_pfn);
|
||||
printf("\tcnt %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_pg_cnt);
|
||||
printf("\ttest %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_pg_test);
|
||||
printf("\tbva %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_v_bitaddr);
|
||||
printf("\tbpa %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_p_bitaddr);
|
||||
printf("\tbcksum %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_bit_cksum);
|
||||
printf("\tusage %lx\n",
|
||||
mddtp->mddt_clusters[i].mddt_usage);
|
||||
}
|
||||
}
|
||||
|
||||
physmem = 0;
|
||||
for (i = 0; i < mddtp->mddt_cluster_cnt; i++) {
|
||||
/* add up physmem, stopping on first OS-available space. */
|
||||
@ -213,11 +243,7 @@ alpha_init(pfn, ptb, argc, argv, envp)
|
||||
*/
|
||||
PAGE_SIZE = hwrpb->rpb_page_size;
|
||||
|
||||
#ifdef __GNUC__ /* XXX */
|
||||
v = (caddr_t)alpha_round_page(_end); /* XXX */
|
||||
#else /* __GNUC__ */ /* XXX */
|
||||
v = (caddr_t)alpha_round_page(end); /* XXX */
|
||||
#endif /* __GNUC__ */ /* XXX */
|
||||
v = (caddr_t)alpha_round_page(_end);
|
||||
/*
|
||||
* Init mapping for u page(s) for proc 0
|
||||
*/
|
||||
@ -234,28 +260,131 @@ alpha_init(pfn, ptb, argc, argv, envp)
|
||||
#ifdef ADU
|
||||
case ST_ADU:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif /* ADU */
|
||||
#endif
|
||||
|
||||
#ifdef DEC_4000
|
||||
case ST_DEC_4000:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif /* DEC_4000 */
|
||||
#endif
|
||||
|
||||
#ifdef DEC_7000
|
||||
case ST_DEC_7000:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif /* DEC_7000 */
|
||||
#ifdef DEC_3000_500 /* and 400, and 600 and 800 */
|
||||
#endif
|
||||
|
||||
#ifdef DEC_3000_500 /* and 400, [6-9]00 */
|
||||
case ST_DEC_3000_500:
|
||||
/* XXX XXX XXX */
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case SV_ST_SANDPIPER:
|
||||
systype_sandpiper:
|
||||
cpu_model = "DEC 3000/400 (\"Sandpiper\")";
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGO:
|
||||
systype_flamingo:
|
||||
cpu_model = "DEC 3000/500 (\"Flamingo\")";
|
||||
break;
|
||||
|
||||
case SV_ST_HOTPINK:
|
||||
cpu_model = "DEC 3000/500X (\"Hot Pink\")";
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGOPLUS:
|
||||
case SV_ST_ULTRA:
|
||||
cpu_model = "DEC 3000/800 (\"Flamingo+\")";
|
||||
break;
|
||||
|
||||
case SV_ST_SANDPLUS:
|
||||
cpu_model = "DEC 3000/600 (\"Sandpiper+\")";
|
||||
break;
|
||||
|
||||
case SV_ST_SANDPIPER45:
|
||||
cpu_model = "DEC 3000/700 (\"Sandpiper45\")";
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGO45:
|
||||
cpu_model = "DEC 3000/900 (\"Flamingo45\")";
|
||||
break;
|
||||
|
||||
case SV_ST_RESERVED: /* this is how things used to be done */
|
||||
if (hwrpb->rpb_variation & SV_GRAPHICS)
|
||||
goto systype_flamingo;
|
||||
else
|
||||
goto systype_sandpiper;
|
||||
/* NOTREACHED */
|
||||
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
}
|
||||
break;
|
||||
#endif /* DEC_3000_500 */
|
||||
#endif
|
||||
|
||||
#ifdef DEC_2000_300
|
||||
case ST_DEC_2000_300:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif /* DEC_2000_300 */
|
||||
/* XXX XXX XXX */
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef DEC_3000_300
|
||||
case DEC_3000_300:
|
||||
case ST_DEC_3000_300:
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case SV_ST_PELICAN:
|
||||
cpu_model = "DEC 3000/300 (\"Pelican\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICANL:
|
||||
cpu_model = "DEC 3000/300L (\"???\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICANX:
|
||||
cpu_model = "DEC 3000/300X (\"???\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICANLX:
|
||||
cpu_model = "DEC 3000/300LX (\"???\")";
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef DEC_2100_A500
|
||||
case ST_DEC_2100_A500:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif /* DEC_3000_300*/
|
||||
#endif
|
||||
|
||||
#ifdef DEC_AXPVME_64
|
||||
case ST_DEC_AXPVME_64:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef DEC_AXPPCI_33
|
||||
case ST_DEC_AXPPCI_33:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef DEC_2100_A50
|
||||
case ST_DEC_2100_A50:
|
||||
/* XXX */
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef DEC_MUSTANG
|
||||
case ST_DEC_MUSTANG:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef DEC_1000
|
||||
case ST_DEC_1000:
|
||||
THIS SYSTEM NOT SUPPORTED
|
||||
#endif
|
||||
|
||||
default:
|
||||
if (cputype > nmodel_names)
|
||||
panic("Unknown system type %d", cputype);
|
||||
@ -263,7 +392,8 @@ alpha_init(pfn, ptb, argc, argv, envp)
|
||||
panic("Support for %s system type not in kernel.",
|
||||
model_names[cputype]);
|
||||
}
|
||||
strcpy(cpu_model, model_names[cputype]);
|
||||
if (cpu_model == NULL)
|
||||
cpu_model = model_names[cputype];
|
||||
|
||||
#if NLE > 0
|
||||
/*
|
||||
@ -576,6 +706,8 @@ boot(howto)
|
||||
|
||||
/* If system is cold, just halt. */
|
||||
if (cold) {
|
||||
while (1);
|
||||
|
||||
howto |= RB_HALT;
|
||||
goto haltsys;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mainbus.c,v 1.1 1995/02/13 23:07:04 cgd Exp $ */
|
||||
/* $NetBSD: mainbus.c,v 1.2 1995/03/08 00:38:51 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -33,6 +33,7 @@
|
||||
#include <sys/reboot.h>
|
||||
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/rpb.h>
|
||||
|
||||
struct mainbus_softc {
|
||||
struct device sc_dv;
|
||||
@ -52,16 +53,6 @@ void mb_intr_disestablish __P((struct confargs *));
|
||||
caddr_t mb_cvtaddr __P((struct confargs *));
|
||||
int mb_matchname __P((struct confargs *, char *));
|
||||
|
||||
/*
|
||||
* The devices that might be hanging off of the mainbus.
|
||||
* XXX Needs rethinking for multi-cpu support, if that happens.
|
||||
*/
|
||||
struct confargs mainbusdevs[] = {
|
||||
{ "cpu", 0, },
|
||||
{ "tc", 0, },
|
||||
};
|
||||
int nmainbusdevs = sizeof (mainbusdevs) / sizeof (mainbusdevs[0]);
|
||||
|
||||
static int
|
||||
mbmatch(parent, cfdata, aux)
|
||||
struct device *parent;
|
||||
@ -89,7 +80,9 @@ mbattach(parent, self, aux)
|
||||
void *aux;
|
||||
{
|
||||
struct mainbus_softc *sc = (struct mainbus_softc *)self;
|
||||
struct confargs nca;
|
||||
int i;
|
||||
extern int cputype;
|
||||
|
||||
printf("\n");
|
||||
|
||||
@ -100,10 +93,24 @@ mbattach(parent, self, aux)
|
||||
sc->sc_bus.ab_cvtaddr = mb_cvtaddr;
|
||||
sc->sc_bus.ab_matchname = mb_matchname;
|
||||
|
||||
for (i = 0; i < nmainbusdevs; i++) {
|
||||
mainbusdevs[i].ca_bus = &sc->sc_bus;
|
||||
config_found(self, &mainbusdevs[i], mbprint);
|
||||
nca.ca_name = "cpu";
|
||||
nca.ca_slot = 0;
|
||||
nca.ca_offset = 0;
|
||||
nca.ca_bus = &sc->sc_bus;
|
||||
config_found(self, &nca, mbprint);
|
||||
|
||||
#if defined(DEC_3000_500) || defined(DEC_3000_300)
|
||||
if (cputype == ST_DEC_3000_500 || cputype == ST_DEC_3000_300) {
|
||||
/* we have a TurboChannel bus! */
|
||||
nca.ca_name = "tc";
|
||||
nca.ca_slot = 0;
|
||||
nca.ca_offset = 0;
|
||||
nca.ca_bus = &sc->sc_bus;
|
||||
config_found(self, &nca, mbprint);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX EISA, PCI busses. */
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.1 1995/02/13 23:07:07 cgd Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.2 1995/03/08 00:38:53 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -296,8 +296,9 @@ pmap_bootstrap(firstaddr, ptaddr)
|
||||
/* must be page aligned */
|
||||
start = firstaddr = alpha_round_page(firstaddr);
|
||||
|
||||
#define valloc(name, type, num) \
|
||||
(name) = (type *)firstaddr; firstaddr = (vm_offset_t)((name)+(num))
|
||||
#define valloc(name, type, num) \
|
||||
(name) = (type *)firstaddr; \
|
||||
firstaddr = ALIGN((vm_offset_t)((name)+(num)))
|
||||
|
||||
/*
|
||||
* Allocate an empty prototype segment map for processes.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.old.c,v 1.1 1995/02/13 23:07:07 cgd Exp $ */
|
||||
/* $NetBSD: pmap.old.c,v 1.2 1995/03/08 00:38:53 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -296,8 +296,9 @@ pmap_bootstrap(firstaddr, ptaddr)
|
||||
/* must be page aligned */
|
||||
start = firstaddr = alpha_round_page(firstaddr);
|
||||
|
||||
#define valloc(name, type, num) \
|
||||
(name) = (type *)firstaddr; firstaddr = (vm_offset_t)((name)+(num))
|
||||
#define valloc(name, type, num) \
|
||||
(name) = (type *)firstaddr; \
|
||||
firstaddr = ALIGN((vm_offset_t)((name)+(num)))
|
||||
|
||||
/*
|
||||
* Allocate an empty prototype segment map for processes.
|
||||
|
@ -1,11 +1,11 @@
|
||||
# $NetBSD: ALPHA,v 1.2 1995/02/27 16:36:31 cgd Exp $
|
||||
# $NetBSD: ALPHA,v 1.3 1995/03/08 00:38:55 cgd Exp $
|
||||
#
|
||||
# Alpha kernel with all the options you'd want, and more.
|
||||
|
||||
include "std.alpha"
|
||||
|
||||
makeoptions CC="gcc -Werror"
|
||||
makeoptions DEBUG="-g"
|
||||
makeoptions CC="gcc -Werror"
|
||||
makeoptions DEBUG="-g"
|
||||
|
||||
maxusers 8
|
||||
|
||||
@ -13,7 +13,10 @@ maxusers 8
|
||||
options GENERIC
|
||||
|
||||
# CPU Support
|
||||
options DEC_3000_500 # 3000/400, /500, /600, and /700
|
||||
options DEC_3000_500 # Flamingo family: 3000/[4-9]00*
|
||||
options DEC_2000_300 # "Jensen": 2000/300
|
||||
options DEC_3000_300 # Pelican family: 3000/300*
|
||||
options DEC_2100_A50 # "Avanti": AlphaStation 400 4/233
|
||||
|
||||
# needs to be set per system
|
||||
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
|
||||
@ -75,8 +78,8 @@ options SYSVSHM
|
||||
# Loadable kernel modules
|
||||
options LKM
|
||||
|
||||
config netbsd root on sd0 swap on sd0
|
||||
#config netbsd swap generic
|
||||
config netbsd swap generic
|
||||
#config netbsd root on sd0 swap on sd0
|
||||
#config netbsd root nfs swap nfs
|
||||
|
||||
tc* at mainbus0
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.3 1995/03/03 01:33:03 cgd Exp $
|
||||
# $NetBSD: GENERIC,v 1.4 1995/03/08 00:38:56 cgd Exp $
|
||||
#
|
||||
# Generic Alpha kernel. Enough to get booted, etc., but not much more.
|
||||
|
||||
@ -13,7 +13,10 @@ maxusers 8
|
||||
options GENERIC
|
||||
|
||||
# CPU Support
|
||||
options DEC_3000_500 # 3000/[4-9]00
|
||||
options DEC_3000_500 # Flamingo family: 3000/[4-9]00*
|
||||
options DEC_2000_300 # "Jensen": 2000/300
|
||||
options DEC_3000_300 # Pelican family: 3000/300*
|
||||
options DEC_2100_A50 # "Avanti": AlphaStation 400 4/233
|
||||
|
||||
# needs to be set per system
|
||||
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
|
||||
@ -39,7 +42,7 @@ options COMPAT_43
|
||||
# OSF/1 binary compatibility
|
||||
options COMPAT_OSF1
|
||||
|
||||
# Loadable Kernel Modules
|
||||
# Loadable kernel modules
|
||||
options LKM
|
||||
|
||||
config netbsd swap generic
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MACALLAN,v 1.1 1995/03/03 01:35:03 cgd Exp $
|
||||
# $NetBSD: MACALLAN,v 1.2 1995/03/08 00:38:58 cgd Exp $
|
||||
#
|
||||
# Kernel for macallan.dssc.cs.cmu.edu.
|
||||
|
||||
@ -9,9 +9,6 @@ makeoptions DEBUG="-g"
|
||||
|
||||
maxusers 8
|
||||
|
||||
# does not really do anything anymore, but this replaces "ident GENERIC"
|
||||
options GENERIC
|
||||
|
||||
# CPU Support
|
||||
options DEC_3000_500 # 3000/[4-9]00
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpb.h,v 1.1 1995/02/13 23:07:54 cgd Exp $ */
|
||||
/* $NetBSD: rpb.h,v 1.2 1995/03/08 00:39:00 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -28,8 +28,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* From DEC 3000 300/400/500/600/800 System Programmer's Manual,
|
||||
* EK-D3SYS-PM.A01.
|
||||
* From DEC 3000 300/400/500/600/700/800/900 System Programmer's Manual,
|
||||
* EK-D3SYS-PM.B01.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,30 +49,54 @@ struct rpb {
|
||||
u_int64_t rpb_max_asn; /* 38: (16) */
|
||||
char rpb_ssn[16]; /* 40: only first 10 valid */
|
||||
|
||||
#define ST_ADU 1
|
||||
#define ST_DEC_4000 2
|
||||
#define ST_DEC_7000 3
|
||||
#define ST_DEC_3000_500 4
|
||||
#define ST_DEC_2000_300 6
|
||||
#define ST_DEC_3000_300 7
|
||||
#define ST_ADU 1 /* Alpha Demo. Unit (?) */
|
||||
#define ST_DEC_4000 2 /* "Cobra" (?) */
|
||||
#define ST_DEC_7000 3 /* "Ruby" (?) */
|
||||
#define ST_DEC_3000_500 4 /* "Flamingo" family (TC) */
|
||||
#define ST_DEC_2000_300 6 /* "Jensen" (EISA/ISA) */
|
||||
#define ST_DEC_3000_300 7 /* "Pelican" (TC) */
|
||||
#define ST_DEC_2100_A500 9 /* "Sable" (?) */
|
||||
#define ST_DEC_APXVME_64 10 /* "AXPvme" (VME?) */
|
||||
#define ST_DEC_AXPPCI_33 11 /* "NoName" (PCI/ISA?) */
|
||||
#define ST_DEC_2100_A50 13 /* "Avanti" (PCI/ISA) */
|
||||
#define ST_DEC_MUSTANG 14 /* "Mustang" (?) */
|
||||
#define ST_DEC_1000 17 /* "Mikasa" (PCI/ISA?) */
|
||||
|
||||
u_int64_t rpb_type; /* 50: */
|
||||
|
||||
#define SYSTEM_VAR_MPCAP 0x0001 /* multiprocessor */
|
||||
#define SV_MPCAP 0x00000001 /* multiprocessor capable */
|
||||
|
||||
#define SYSTEM_VAR_CONSOLE 0x001e /* console hardware mask */
|
||||
#define SYSTEM_VAR_CNSL_DETACHED 0x0002
|
||||
#define SYSTEM_VAR_CNSL_EMBEDDED 0x0004
|
||||
#define SV_CONSOLE 0x0000001e /* console hardware mask */
|
||||
#define SV_CONSOLE_DETACHED 0x00000002
|
||||
#define SV_CONSOLE_EMBEDDED 0x00000004
|
||||
|
||||
#define SV_POWERFAIL 0x000000e0 /* powerfail mask */
|
||||
#define SV_PF_UNITED 0x00000020
|
||||
#define SV_PF_SEPARATE 0x00000040
|
||||
#define SV_PF_BBACKUP 0x00000060
|
||||
#define SV_PF_ACTION 0x00000100 /* powerfail restart */
|
||||
|
||||
#define SV_GRAPHICS 0x00000200 /* graphic engine present */
|
||||
|
||||
#define SV_ST_MASK 0x0000fc00 /* system type mask */
|
||||
#define SV_ST_RESERVED 0x00000000 /* RESERVED */
|
||||
|
||||
#define SV_ST_SANDPIPER 0x00000400 /* Sandpiper; 3000/400 */
|
||||
#define SV_ST_FLAMINGO 0x00000800 /* Flamingo; 3000/500 */
|
||||
#define SV_ST_HOTPINK 0x00000c00 /* "Hot Pink"; 3000/500X */
|
||||
#define SV_ST_FLAMINGOPLUS 0x00001000 /* Flamingo+; 3000/800 */
|
||||
#define SV_ST_ULTRA 0x00001400 /* "Ultra", aka Flamingo+ */
|
||||
#define SV_ST_SANDPLUS 0x00001800 /* Sandpiper+; 3000/600 */
|
||||
#define SV_ST_SANDPIPER45 0x00001c00 /* Sandpiper45; 3000/700 */
|
||||
#define SV_ST_FLAMINGO45 0x00002000 /* Flamingo45; 3000/900 */
|
||||
|
||||
#define SV_ST_SABLE 0x00000400 /* Sable (???) */
|
||||
|
||||
#define SV_ST_PELICAN 0x00000000 /* Pelican; 3000/300 */
|
||||
#define SV_ST_PELICANL 0x00000400 /* ???; 3000/300L */
|
||||
#define SV_ST_PELICANX 0x00000800 /* ???; 3000/300X */
|
||||
#define SV_ST_PELICANLX 0x00000c00 /* ???; 3000/300LX */
|
||||
|
||||
#define SYSTEM_VAR_POWERFAIL 0x00e0 /* powerfail mask */
|
||||
#define SYSTEM_VAR_PF_UNITED 0x0020
|
||||
#define SYSTEM_VAR_PF_SEPARATE 0x0040
|
||||
#define SYSTEM_VAR_PF_BBACKUP 0x0060
|
||||
#define SYSTEM_VAR_PF_ACTION 0x0100 /* 1 -> restart all processors
|
||||
* on powerfail
|
||||
* 0 -> only primary
|
||||
*/
|
||||
#define SYSTEM_VAR_GRAPHICS 0x0200 /* graphic engine present */
|
||||
#define SYSTEM_VAR_mbz 0xfffffffffffffc00 /* 10:64 -- must be zero */
|
||||
u_int64_t rpb_variation; /* 58 */
|
||||
|
||||
char rpb_revision[8]; /* 60; only first 4 valid */
|
||||
@ -144,11 +168,13 @@ struct pcs {
|
||||
u_int64_t
|
||||
pcs_alpha : 8, /* alphabetic char 'a' - 'z' */
|
||||
#define PAL_TYPE_STANDARD 0
|
||||
#define PAL_TYPE_ULTRIX 1
|
||||
#define PAL_TYPE_VMS 1
|
||||
#define PAL_TYPE_OSF1 2
|
||||
pcs_pal_type : 8, /* PALcode type:
|
||||
* 0 == standard
|
||||
* 1 == Ultrix
|
||||
* 2-127 DIGITAL reserv.
|
||||
* 1 == OpenVMS
|
||||
* 2 == OSF/1
|
||||
* 3-127 DIGITAL reserv.
|
||||
* 128-255 non-DIGITAL reserv.
|
||||
*/
|
||||
sbz1 : 16,
|
||||
@ -159,15 +185,29 @@ struct pcs {
|
||||
#define pcs_pal_type pcs_pal_rev.pal_type
|
||||
#define pcs_proc_cnt pcs_pal_rev.proc_cnt
|
||||
|
||||
u_int64_t pcs_proc_type; /* B0: (always 2) */
|
||||
struct {
|
||||
u_int64_t
|
||||
pcs_vaxfp : 1, /* Vax floating point */
|
||||
pcs_ieeefp : 1, /* IEEE floating point */
|
||||
pcs_reserved : 62;
|
||||
} pcs_proc_var; /* B8: */
|
||||
#define pcs_vaxfp pcs_proc_var.pcs_vaxfp
|
||||
#define pcs_ieeefp pcs_proc_var.pcs_ieeefp
|
||||
u_int64_t pcs_proc_type; /* B0: processor type */
|
||||
|
||||
#define PCS_PROC_MAJOR 0x00000000ffffffff
|
||||
#define PCS_PROC_MAJORSHIFT 0
|
||||
#define PCS_PROC_EV3 1 /* EV3 */
|
||||
#define PCS_PROC_EV4 2 /* EV4: 21064 */
|
||||
#define PCS_PROC_SIMULATOR 3 /* simulation */
|
||||
#define PCS_PROC_LCA4 4 /* LCA4: 2106[68] */
|
||||
#define PCS_PROC_EV45 6 /* EV45: 21064A */
|
||||
#ifdef XXX_UNKNOWN
|
||||
#define PCS_PROC_EV5 ??? /* EV5: 21164 */
|
||||
#endif
|
||||
|
||||
#define PCS_PROC_MINOR 0xffffffff00000000
|
||||
#define PCS_PROC_MINORSHIFT 32
|
||||
#define PCS_PROC_PASS2 0 /* pass 2 or 2.1 */
|
||||
#define PCS_PROC_PASS3 1 /* pass 3 */
|
||||
|
||||
u_int64_t pcs_proc_var; /* B8: processor variation. */
|
||||
|
||||
#define PCS_VAR_VAXFP 0x0000000000000001 /* VAX FP support */
|
||||
#define PCS_VAR_IEEEFP 0x0000000000000002 /* IEEE FP support */
|
||||
#define PCS_VAR_RESERVED 0xfffffffffffffffc /* Reserved */
|
||||
|
||||
char pcs_proc_revision[8]; /* C0: only first 4 valid */
|
||||
char pcs_proc_sn[16]; /* C8: only first 10 valid */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: asic.c,v 1.1 1995/02/13 23:08:49 cgd Exp $ */
|
||||
/* $NetBSD: asic.c,v 1.2 1995/03/08 00:39:02 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -99,14 +99,9 @@ asicmatch(parent, cfdata, aux)
|
||||
|
||||
/* See if the unit number is valid. */
|
||||
switch (hwrpb->rpb_type) {
|
||||
#ifdef DEC_3000_300
|
||||
case ST_DEC_3000_300:
|
||||
if (cf->cf_unit > 0)
|
||||
return (0);
|
||||
break;
|
||||
#endif
|
||||
#ifdef DEC_3000_500
|
||||
#if defined(DEC_3000_500) || defined(DEC_3000_300)
|
||||
case ST_DEC_3000_500:
|
||||
case ST_DEC_3000_300:
|
||||
if (cf->cf_unit > 0)
|
||||
return (0);
|
||||
break;
|
||||
@ -127,6 +122,7 @@ asicattach(parent, self, aux)
|
||||
struct confargs *ca = aux;
|
||||
struct confargs *nca;
|
||||
int i;
|
||||
extern int cputype;
|
||||
|
||||
printf("\n");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_le.c,v 1.1 1995/02/13 23:08:59 cgd Exp $ */
|
||||
/* $NetBSD: if_le.c,v 1.2 1995/03/08 00:39:04 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -300,8 +300,8 @@ le_setup(unit, aux, sc)
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
|
||||
if (unit == 0 && (hwrpb->rpb_type == ST_DEC_3000_500 ||
|
||||
hwrpb->rpb_type == ST_DEC_3000_300)) {
|
||||
if (unit == 0 && (hwrpb->rpb_type == ST_DEC_3000_300 ||
|
||||
hwrpb->rpb_type == ST_DEC_3000_500)) {
|
||||
/* It's on the system ASIC */
|
||||
volatile u_int *ldp;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tc.c,v 1.1 1995/02/13 23:09:06 cgd Exp $ */
|
||||
/* $NetBSD: tc.c,v 1.2 1995/03/08 00:39:05 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -55,6 +55,9 @@ int tc_matchname __P((struct confargs *, char *));
|
||||
|
||||
extern int cputype;
|
||||
|
||||
#ifdef DEC_3000_300
|
||||
extern struct tc_cpu_desc dec_3000_300_cpu;
|
||||
#endif
|
||||
#ifdef DEC_3000_500
|
||||
extern struct tc_cpu_desc dec_3000_500_cpu;
|
||||
#endif
|
||||
@ -71,7 +74,11 @@ struct tc_cpu_desc *tc_cpu_devs[] = {
|
||||
#endif
|
||||
NULL, /* Unused */
|
||||
NULL, /* ST_DEC_2000_300 */
|
||||
NULL, /* ST_DEC_3000_300 */
|
||||
#ifdef DEC_3000_300
|
||||
&dec_3000_300_cpu, /* ST_DEC_3000_300 */
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
};
|
||||
int ntc_cpu_devs = sizeof tc_cpu_devs / sizeof tc_cpu_devs[0];
|
||||
|
||||
|
213
sys/arch/alpha/tc/tc_3000_300.c
Normal file
213
sys/arch/alpha/tc/tc_3000_300.c
Normal file
@ -0,0 +1,213 @@
|
||||
/* $NetBSD: tc_3000_300.c,v 1.1 1995/03/08 00:39:06 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Chris G. Demetriou
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and
|
||||
* its documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
||||
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/pte.h>
|
||||
|
||||
#include <alpha/tc/tc.h>
|
||||
#include <alpha/tc/tc_3000_300.h>
|
||||
|
||||
/* XXX ESTABLISH, DISESTABLISH */
|
||||
void tc_3000_300_intr_setup __P((void));
|
||||
void tc_3000_300_intr_establish
|
||||
__P((struct confargs *, intr_handler_t, void *));
|
||||
void tc_3000_300_intr_disestablish __P((struct confargs *));
|
||||
void tc_3000_300_iointr __P((void *, int));
|
||||
int tc_3000_300_getdev __P((struct confargs *));
|
||||
|
||||
#define KV(x) ((caddr_t)phystok0seg(x))
|
||||
#define TC_3000_300_NSLOTS 5
|
||||
#define TC_3000_300_MAXDEVS 5
|
||||
|
||||
static struct tc_slot_desc dec_3000_300_slots[TC_3000_300_NSLOTS] = {
|
||||
{ KV(0x100000000), }, /* slot 0 - TC option slot 0 */
|
||||
{ KV(0x120000000), }, /* slot 1 - TC option slot 1 */
|
||||
{ KV(0x180000000), }, /* slot 2 - TCDS ASIC on cpu board */
|
||||
{ KV(0x1a0000000), }, /* slot 3 - IOCTL ASIC on cpu board */
|
||||
{ KV(0x1c0000000), }, /* slot 4 - CXTurbo on cpu board */
|
||||
};
|
||||
|
||||
static struct confargs dec_3000_300_devs[TC_3000_300_MAXDEVS] = {
|
||||
{ "PMAGB-BA", 4, 0x02000000, },
|
||||
{ "IOCTL ", 3, 0x00000000, },
|
||||
{ "PMAZ-DS ", 2, 0x00000000, },
|
||||
{ NULL, 1, 0x0, },
|
||||
{ NULL, 0, 0x0, },
|
||||
};
|
||||
|
||||
/* Indices into the struct confargs array. */
|
||||
#define TC_3000_300_DEV_CXTURBO 0
|
||||
#define TC_3000_300_DEV_IOCTL 1
|
||||
#define TC_3000_300_DEV_TCDS 2
|
||||
#define TC_3000_300_DEV_OPT1 3
|
||||
#define TC_3000_300_DEV_OPT0 4
|
||||
|
||||
struct tc_cpu_desc dec_3000_300_cpu = {
|
||||
dec_3000_300_slots, TC_3000_300_NSLOTS,
|
||||
dec_3000_300_devs, TC_3000_300_MAXDEVS,
|
||||
tc_3000_300_intr_setup,
|
||||
tc_3000_300_intr_establish,
|
||||
tc_3000_300_intr_disestablish,
|
||||
tc_3000_300_iointr,
|
||||
};
|
||||
|
||||
intr_handler_t tc_3000_300_intrhand[TC_3000_300_MAXDEVS];
|
||||
void *tc_3000_300_intrval[TC_3000_300_MAXDEVS];
|
||||
|
||||
void
|
||||
tc_3000_300_intr_setup()
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Set up interrupt handlers. */
|
||||
for (i = 0; i < TC_3000_300_MAXDEVS; i++) {
|
||||
tc_3000_300_intrhand[i] = tc_intrnull;
|
||||
tc_3000_300_intrval[i] = (void *)(long)i;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tc_3000_300_intr_establish(ca, handler, val)
|
||||
struct confargs *ca;
|
||||
int (*handler) __P((void *));
|
||||
void *val;
|
||||
{
|
||||
int dev = tc_3000_300_getdev(ca);
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (dev == -1)
|
||||
panic("tc_3000_300_intr_establish: dev == -1");
|
||||
#endif
|
||||
|
||||
if (tc_3000_300_intrhand[dev] != tc_intrnull)
|
||||
panic("tc_3000_300_intr_establish: dev %d twice", dev);
|
||||
|
||||
tc_3000_300_intrhand[dev] = handler;
|
||||
tc_3000_300_intrval[dev] = val;
|
||||
|
||||
/* XXX ENABLE INTERRUPT MASK FOR DEV */
|
||||
}
|
||||
|
||||
void
|
||||
tc_3000_300_intr_disestablish(ca)
|
||||
struct confargs *ca;
|
||||
{
|
||||
int dev = tc_3000_300_getdev(ca);
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (dev == -1)
|
||||
panic("tc_3000_300_intr_disestablish: somebody goofed");
|
||||
#endif
|
||||
|
||||
if (tc_3000_300_intrhand[dev] == tc_intrnull)
|
||||
panic("tc_3000_300_intr_disestablish: dev %d missing intr",
|
||||
dev);
|
||||
|
||||
tc_3000_300_intrhand[dev] = tc_intrnull;
|
||||
tc_3000_300_intrval[dev] = (void *)(long)dev;
|
||||
|
||||
/* XXX DISABLE INTERRUPT MASK FOR DEV */
|
||||
}
|
||||
|
||||
void
|
||||
tc_3000_300_iointr(framep, vec)
|
||||
void *framep;
|
||||
int vec;
|
||||
{
|
||||
u_int32_t ir;
|
||||
int ifound;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
int s;
|
||||
if (vec != 0x800)
|
||||
panic("INVALID ASSUMPTION: vec %x, not 0x800", vec);
|
||||
s = splhigh();
|
||||
if (s != PSL_IPL_IO)
|
||||
panic("INVALID ASSUMPTION: IPL %d, not %d", s, PSL_IPL_IO);
|
||||
splx(s);
|
||||
#endif
|
||||
|
||||
do {
|
||||
MB();
|
||||
MAGIC_READ;
|
||||
MB();
|
||||
|
||||
ifound = 0;
|
||||
#define CHECKINTR(slot, bits) \
|
||||
if (ir & bits) { \
|
||||
ifound = 1; \
|
||||
(*tc_3000_300_intrhand[slot]) \
|
||||
(tc_3000_300_intrval[slot]); \
|
||||
}
|
||||
/* Do them in order of priority; highest slot # first. */
|
||||
CHECKINTR(TC_3000_300_DEV_CXTURBO, TC_3000_300_IR_CXTURBO);
|
||||
CHECKINTR(TC_3000_300_DEV_IOCTL, TC_3000_300_IR_IOCTL);
|
||||
CHECKINTR(TC_3000_300_DEV_TCDS, TC_3000_300_IR_TCDS);
|
||||
#if 0
|
||||
CHECKINTR(TC_3000_300_DEV_OPT1, TC_3000_300_IR_OPT1);
|
||||
CHECKINTR(TC_3000_300_DEV_OPT0, TC_3000_300_IR_OPT0);
|
||||
#else
|
||||
/* XXX XXX XXX CHECK OPTION SLOT INTERRUPTS!!! */
|
||||
#endif
|
||||
#undef CHECKINTR
|
||||
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
#define PRINTINTR(msg, bits) \
|
||||
if (ir & bits) \
|
||||
printf(msg);
|
||||
PRINTINTR("BCache tag parity error\n",
|
||||
TC_3000_300_IR_BCTAGPARITY);
|
||||
PRINTINTR("TC overrun error\n", TC_3000_300_IR_TCOVERRUN);
|
||||
PRINTINTR("TC I/O timeout\n", TC_3000_300_IR_TCTIMEOUT);
|
||||
PRINTINTR("Bcache parity error\n",
|
||||
TC_3000_300_IR_BCACHEPARITY);
|
||||
PRINTINTR("Memory parity error\n", TC_3000_300_IR_MEMPARITY);
|
||||
#undef PRINTINTR
|
||||
#endif
|
||||
} while (ifound);
|
||||
}
|
||||
|
||||
int
|
||||
tc_3000_300_getdev(ca)
|
||||
struct confargs *ca;
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < TC_3000_300_MAXDEVS; i++)
|
||||
if (ca->ca_slot == dec_3000_300_devs[i].ca_slot &&
|
||||
ca->ca_offset == dec_3000_300_devs[i].ca_offset &&
|
||||
!strncmp(ca->ca_name, dec_3000_300_devs[i].ca_name))
|
||||
return (i);
|
||||
|
||||
return (-1);
|
||||
}
|
50
sys/arch/alpha/tc/tc_3000_300.h
Normal file
50
sys/arch/alpha/tc/tc_3000_300.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* $NetBSD: tc_3000_300.h,v 1.1 1995/03/08 00:39:07 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Chris G. Demetriou
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and
|
||||
* its documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
||||
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* TurboChannel-specific functions and structures for 3000_500.
|
||||
*/
|
||||
|
||||
/*
|
||||
* TURBOchannel Interface Registers.
|
||||
*/
|
||||
#define TC_3000_300_IR KV(0x00000001e0000000) /* Dense */
|
||||
#define TC_3000_300_CSR KV(0x00000001e0000008) /* Dense */
|
||||
#define TC_3000_300_MCR KV(0x00000001e0000010) /* Dense */
|
||||
#define TC_3000_300_LED KV(0x00000001e0000018) /* Dense */
|
||||
|
||||
/* Interrupt bits. */
|
||||
#define TC_3000_300_IR_CXTURBO 0x00000004 /* TC CXTURBO */
|
||||
#define TC_3000_300_IR_TCDS 0x00000008 /* TC Dual SCSI */
|
||||
#define TC_3000_300_IR_IOCTL 0x00000010 /* TC IOCTL */
|
||||
#define TC_3000_300_IR_BCTAGPARITY 0x08000000 /* BC tag par. err. */
|
||||
#define TC_3000_300_IR_TCOVERRUN 0x10000000 /* TC overrun */
|
||||
#define TC_3000_300_IR_TCTIMEOUT 0x20000000 /* TC timeout on I/O */
|
||||
#define TC_3000_300_IR_BCACHEPARITY 0x40000000 /* Bcache par. err. */
|
||||
#define TC_3000_300_IR_MEMPARITY 0x80000000 /* Memory par. err. */
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tcds.c,v 1.2 1995/03/03 01:38:56 cgd Exp $ */
|
||||
/* $NetBSD: tcds.c,v 1.3 1995/03/08 00:39:08 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
@ -61,7 +61,6 @@ int tcds_matchname __P((struct confargs *, char *));
|
||||
int tcds_intr __P((void *));
|
||||
int tcds_intrnull __P((void *));
|
||||
|
||||
#define TCDS_MAX_NSLOTS 2
|
||||
#define TCDS_SLOT_SCSI0 0
|
||||
#define TCDS_SLOT_SCSI1 1
|
||||
|
||||
@ -69,7 +68,7 @@ struct tcds_slot {
|
||||
struct confargs ts_ca;
|
||||
intr_handler_t ts_handler;
|
||||
void *ts_val;
|
||||
} tcds_slots[TCDS_MAX_NSLOTS] = {
|
||||
} tcds_slots[] = {
|
||||
{ { "esp", 0, 0x0, },
|
||||
tcds_intrnull, (void *)(long)TCDS_SLOT_SCSI0, },
|
||||
{ { "esp", 1, 0x0, },
|
||||
@ -105,6 +104,7 @@ tcdsattach(parent, self, aux)
|
||||
struct confargs *nca;
|
||||
volatile u_int32_t *cir, *imer;
|
||||
int i;
|
||||
extern int cputype;
|
||||
|
||||
printf("\n");
|
||||
|
||||
@ -128,12 +128,15 @@ tcdsattach(parent, self, aux)
|
||||
*imer = 0;
|
||||
MB();
|
||||
|
||||
/* Try to configure each CPU-internal device. */
|
||||
for (i = 0; i < TCDS_MAX_NSLOTS; i++) {
|
||||
nca = &tcds_slots[i].ts_ca;
|
||||
nca->ca_bus = &sc->sc_bus;
|
||||
/* find the hardware attached to the TCDS ASIC */
|
||||
nca = &tcds_slots[TCDS_SLOT_SCSI0].ts_ca;
|
||||
nca->ca_bus = &sc->sc_bus;
|
||||
config_found(self, nca, tcdsprint);
|
||||
|
||||
/* Tell the autoconfig machinery we've found the hardware. */
|
||||
/* the second SCSI chip isn't present on the 3000/300 series. */
|
||||
if (cputype != ST_DEC_3000_300) {
|
||||
nca = &tcds_slots[TCDS_SLOT_SCSI1].ts_ca;
|
||||
nca->ca_bus = &sc->sc_bus;
|
||||
config_found(self, nca, tcdsprint);
|
||||
}
|
||||
}
|
||||
@ -167,9 +170,11 @@ tcds_intr_establish(ca, handler, val)
|
||||
case TCDS_SLOT_SCSI0:
|
||||
tcds_scsi_reset(0);
|
||||
break;
|
||||
|
||||
case TCDS_SLOT_SCSI1:
|
||||
tcds_scsi_reset(1);
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_intr_establish: unknown slot number %d",
|
||||
ca->ca_slot);
|
||||
@ -193,10 +198,12 @@ tcds_intr_disestablish(ca)
|
||||
tcds_dma_disable(0);
|
||||
tcds_scsi_disable(0);
|
||||
break;
|
||||
|
||||
case TCDS_SLOT_SCSI1:
|
||||
tcds_dma_disable(1);
|
||||
tcds_scsi_disable(1);
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_intr_disestablish: unknown slot number %d",
|
||||
ca->ca_slot);
|
||||
@ -250,6 +257,7 @@ tcds_scsi_reset(unit)
|
||||
TCDS_CIR_SET(*cir, TCDS_CIR_SCSI0_RESET);
|
||||
MB();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
TCDS_CIR_CLR(*cir, TCDS_CIR_SCSI1_RESET);
|
||||
MB();
|
||||
@ -257,6 +265,7 @@ tcds_scsi_reset(unit)
|
||||
TCDS_CIR_SET(*cir, TCDS_CIR_SCSI1_RESET);
|
||||
MB();
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_scsi_disable: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -286,10 +295,12 @@ tcds_scsi_enable(unit)
|
||||
*imer |= TCDS_IMER_SCSI0_MASK | TCDS_IMER_SCSI0_ENB;
|
||||
MB();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
*imer |= TCDS_IMER_SCSI1_MASK | TCDS_IMER_SCSI1_ENB;
|
||||
MB();
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_scsi_enable: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -310,10 +321,12 @@ tcds_scsi_disable(unit)
|
||||
*imer &= ~(TCDS_IMER_SCSI0_MASK | TCDS_IMER_SCSI0_ENB);
|
||||
MB();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
*imer &= ~(TCDS_IMER_SCSI1_MASK | TCDS_IMER_SCSI1_ENB);
|
||||
MB();
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_scsi_disable: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -334,12 +347,14 @@ tcds_dma_init(dsc, unit)
|
||||
dsc->dud0 = TCDS_REG(sc->sc_base, TCDS_SCSI0_DMA_DUD0);
|
||||
dsc->dud1 = TCDS_REG(sc->sc_base, TCDS_SCSI0_DMA_DUD1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
dsc->sda = TCDS_REG(sc->sc_base, TCDS_SCSI1_DMA_ADDR);
|
||||
dsc->dic = TCDS_REG(sc->sc_base, TCDS_SCSI1_DMA_INTR);
|
||||
dsc->dud0 = TCDS_REG(sc->sc_base, TCDS_SCSI1_DMA_DUD0);
|
||||
dsc->dud1 = TCDS_REG(sc->sc_base, TCDS_SCSI1_DMA_DUD1);
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_dma_init: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -361,10 +376,12 @@ tcds_dma_enable(unit)
|
||||
TCDS_CIR_SET(*cir, TCDS_CIR_SCSI0_DMAENA);
|
||||
MB();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
TCDS_CIR_SET(*cir, TCDS_CIR_SCSI1_DMAENA);
|
||||
MB();
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_dma_enable: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -386,10 +403,12 @@ tcds_dma_disable(unit)
|
||||
TCDS_CIR_CLR(*cir, TCDS_CIR_SCSI0_DMAENA);
|
||||
MB();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
TCDS_CIR_CLR(*cir, TCDS_CIR_SCSI1_DMAENA);
|
||||
MB();
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_dma_disable: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
@ -417,6 +436,7 @@ tcds_scsi_isintr(unit, clear)
|
||||
return (1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (ir & TCDS_CIR_SCSI1_INT) {
|
||||
if (clear) {
|
||||
@ -426,6 +446,7 @@ tcds_scsi_isintr(unit, clear)
|
||||
return (1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("tcds_scsi_isintr: unknown unit number\n", unit);
|
||||
/* NOTREACHED */
|
||||
|
Loading…
x
Reference in New Issue
Block a user