harcoding defines, and add rpb device type #39 (sii) boot information.
-/* $OpenBSD: autoconf.c,v 1.12 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.13 2008/08/18 23:20:43 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
#include <lib/libsa/stand.h>
-#include "../../include/mtpr.h"
-#include "../../include/sid.h"
-#include "../../include/intr.h"
-#include "../../include/rpb.h"
-#include "../../include/scb.h"
+#include <machine/mtpr.h>
+#include <machine/sid.h>
+#include <machine/intr.h>
+#include <machine/rpb.h>
+#include <machine/scb.h>
+#include <arch/vax/mbus/mbusreg.h>
+#include <arch/vax/mbus/fwioreg.h>
#include "vaxstand.h"
void autoconf(void);
void clkstart(void);
int getsecs(void);
void scb_stray(void *);
+void scb_silent(void *);
void longjmp(int *);
void rtimer(void *);
scb_vec[i].ev = NULL;
}
scb_vec[4/4].hoppaddr = mcheck;
+ if (vax_boardtype == VAX_BTYP_60)
+ scb_vec[0x60/4].hoppaddr = scb_silent;
}
void
extern int ka60_ioslot;
/* enable M-Bus clock in IOCSR */
- *(unsigned int *)(0x30800000 + (ka60_ioslot << 25)) |=
- 0x20000000; /* CLKIEN */
+ *(unsigned int *)(MBUS_SLOT_BASE(ka60_ioslot) +
+ FWIO_IOCSR_OFFSET) |= FWIO_IOCSR_CLKIEN;
}
mtpr(20, PR_IPL);
vector = (int) arg;
printf("stray interrupt: vector 0x%x, ipl %d\n", vector, ipl);
}
+
+void
+scb_silent(void *arg)
+{
+ /* nothing */
+}
-/* $OpenBSD: conf.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: conf.c,v 1.4 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: conf.c,v 1.10 2000/06/15 19:53:23 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
SADEV("hd",mfmstrategy, mfmopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl), /* SDN */
+ SADEV("sd",romstrategy, romopen, nullsys, noioctl), /* SDS */
SADEV("st",nullsys, nullsys, nullsys, noioctl),
SADEV("le",nostrategy, leopen, leclose, noioctl), /* LANCE */
SADEV("ze",nostrategy, zeopen, zeclose, noioctl), /* SGEC */
BDEV_RD,
BDEV_SD,
BDEV_SDN,
+ BDEV_SDS,
BDEV_ST,
BDEV_LE,
BDEV_ZE,
-/* $OpenBSD: consio.c,v 1.9 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: consio.c,v 1.10 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: consio.c,v 1.13 2002/05/24 21:40:59 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
#include "data.h"
+#include <machine/cvax.h>
+#include <arch/vax/mbus/mbusreg.h>
+
void setup(void);
static void (*put_fp)(int) = NULL;
extern int mcheck_silent;
extern int setjmp(int *);
- int mid, modaddr, modtype;
+ int mid, fbicaddr;
+ uint32_t modtype, fbicrange;
+
+ for (mid = 0; mid < MBUS_SLOT_MAX; mid++) {
+ fbicaddr = MBUS_SLOT_BASE(mid) + FBIC_BASE;
- mcheck_silent = 1;
- for (mid = 0; mid < 8; mid++) {
- modaddr = 0x31fffffc + (mid << 25);
if (setjmp(jbuf)) {
/* this slot is empty */
continue;
}
- modtype = *(int *)modaddr;
- if ((modtype & 0xff) == 0x04) {
- ka60_ioslot = mid;
+ mcheck_silent = 1;
+ modtype = *(uint32_t *)(fbicaddr + FBIC_MODTYPE);
+ mcheck_silent = 0;
+
+ if ((modtype & MODTYPE_CLASS_MASK) >> MODTYPE_CLASS_SHIFT !=
+ CLASS_IO)
+ continue;
+
+ ka60_ioslot = mid;
+
+ fbicrange = *(uint32_t *)(fbicaddr + FBIC_RANGE);
+ if (fbicrange ==
+ ((HOST_TO_MBUS(CVAX_SSC) & RANGE_MATCH) | RANGE_ENABLE))
break;
- }
}
mcheck_silent = 0;
if (ka60_ioslot < 0) {
/*
- * This shouldn't happen. Try mid #5 (slot #4) as a
+ * This shouldn't happen. Try mid #5 (enclosure slot #4) as a
* supposedly sane default.
*/
ka60_ioslot = 5;
-/* $OpenBSD: if_le.c,v 1.5 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.6 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: if_le.c,v 1.6 2000/05/20 13:30:03 ragge Exp $ */
/*
* Copyright (c) 1997, 1999 Ludd, University of Lule}, Sweden.
#include <netinet/in_systm.h>
#include <netinet/if_ether.h>
-#include <../include/sid.h>
-#include <../include/rpb.h>
+#include <machine/sid.h>
+#include <machine/rpb.h>
#include <lib/libsa/netif.h>
#include <lib/libsa/stand.h>
+#include <arch/vax/mbus/mbusreg.h>
+#include <arch/vax/mbus/fwioreg.h>
+
#include <dev/ic/am7990reg.h>
#include "vaxstand.h"
nireg = (void *)0x20084400;
} else if (vax_boardtype == VAX_BTYP_60) {
extern int ka60_ioslot;
- lebufaddr = 0x30a00000 + (ka60_ioslot << 25);
- ea = (int *)(0x30800000 + (ka60_ioslot << 25));
+ lebufaddr = MBUS_SLOT_BASE(ka60_ioslot) + FWIO_LANCE_BUF_OFFSET;
+ ea = (int *)(MBUS_SLOT_BASE(ka60_ioslot) + FWIO_ESAR_OFFSET);
for (i = 0; i < 6; i++) {
eaddr[i] = *(u_char *)((int)ea + 2);
ea++;
}
ea = NULL;
- nireg = (void *)(0x30200000 + (ka60_ioslot << 25));
+ nireg = (void *)(MBUS_SLOT_BASE(ka60_ioslot) +
+ FWIO_LANCE_REG_OFFSET);
} else {
*(int *)0x20080014 = 0; /* Be sure we do DMA in low 16MB */
ea = (void *)0x20090000; /* XXX Ethernet address */
-/* $OpenBSD: autoconf.c,v 1.12 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.13 2008/08/18 23:20:43 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
#include <lib/libsa/stand.h>
-#include "../../include/mtpr.h"
-#include "../../include/sid.h"
-#include "../../include/intr.h"
-#include "../../include/rpb.h"
-#include "../../include/scb.h"
+#include <machine/mtpr.h>
+#include <machine/sid.h>
+#include <machine/intr.h>
+#include <machine/rpb.h>
+#include <machine/scb.h>
+#include <arch/vax/mbus/mbusreg.h>
+#include <arch/vax/mbus/fwioreg.h>
#include "vaxstand.h"
void autoconf(void);
void clkstart(void);
int getsecs(void);
void scb_stray(void *);
+void scb_silent(void *);
void longjmp(int *);
void rtimer(void *);
scb_vec[i].ev = NULL;
}
scb_vec[4/4].hoppaddr = mcheck;
+ if (vax_boardtype == VAX_BTYP_60)
+ scb_vec[0x60/4].hoppaddr = scb_silent;
}
void
extern int ka60_ioslot;
/* enable M-Bus clock in IOCSR */
- *(unsigned int *)(0x30800000 + (ka60_ioslot << 25)) |=
- 0x20000000; /* CLKIEN */
+ *(unsigned int *)(MBUS_SLOT_BASE(ka60_ioslot) +
+ FWIO_IOCSR_OFFSET) |= FWIO_IOCSR_CLKIEN;
}
mtpr(20, PR_IPL);
vector = (int) arg;
printf("stray interrupt: vector 0x%x, ipl %d\n", vector, ipl);
}
+
+void
+scb_silent(void *arg)
+{
+ /* nothing */
+}
-/* $OpenBSD: conf.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: conf.c,v 1.4 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: conf.c,v 1.10 2000/06/15 19:53:23 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
SADEV("hd",mfmstrategy, mfmopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl), /* SDN */
+ SADEV("sd",romstrategy, romopen, nullsys, noioctl), /* SDS */
SADEV("st",nullsys, nullsys, nullsys, noioctl),
SADEV("le",nostrategy, leopen, leclose, noioctl), /* LANCE */
SADEV("ze",nostrategy, zeopen, zeclose, noioctl), /* SGEC */
BDEV_RD,
BDEV_SD,
BDEV_SDN,
+ BDEV_SDS,
BDEV_ST,
BDEV_LE,
BDEV_ZE,
-/* $OpenBSD: consio.c,v 1.9 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: consio.c,v 1.10 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: consio.c,v 1.13 2002/05/24 21:40:59 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
#include "data.h"
+#include <machine/cvax.h>
+#include <arch/vax/mbus/mbusreg.h>
+
void setup(void);
static void (*put_fp)(int) = NULL;
extern int mcheck_silent;
extern int setjmp(int *);
- int mid, modaddr, modtype;
+ int mid, fbicaddr;
+ uint32_t modtype, fbicrange;
+
+ for (mid = 0; mid < MBUS_SLOT_MAX; mid++) {
+ fbicaddr = MBUS_SLOT_BASE(mid) + FBIC_BASE;
- mcheck_silent = 1;
- for (mid = 0; mid < 8; mid++) {
- modaddr = 0x31fffffc + (mid << 25);
if (setjmp(jbuf)) {
/* this slot is empty */
continue;
}
- modtype = *(int *)modaddr;
- if ((modtype & 0xff) == 0x04) {
- ka60_ioslot = mid;
+ mcheck_silent = 1;
+ modtype = *(uint32_t *)(fbicaddr + FBIC_MODTYPE);
+ mcheck_silent = 0;
+
+ if ((modtype & MODTYPE_CLASS_MASK) >> MODTYPE_CLASS_SHIFT !=
+ CLASS_IO)
+ continue;
+
+ ka60_ioslot = mid;
+
+ fbicrange = *(uint32_t *)(fbicaddr + FBIC_RANGE);
+ if (fbicrange ==
+ ((HOST_TO_MBUS(CVAX_SSC) & RANGE_MATCH) | RANGE_ENABLE))
break;
- }
}
mcheck_silent = 0;
if (ka60_ioslot < 0) {
/*
- * This shouldn't happen. Try mid #5 (slot #4) as a
+ * This shouldn't happen. Try mid #5 (enclosure slot #4) as a
* supposedly sane default.
*/
ka60_ioslot = 5;
-/* $OpenBSD: if_le.c,v 1.5 2008/08/12 17:23:21 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.6 2008/08/18 23:20:44 miod Exp $ */
/* $NetBSD: if_le.c,v 1.6 2000/05/20 13:30:03 ragge Exp $ */
/*
* Copyright (c) 1997, 1999 Ludd, University of Lule}, Sweden.
#include <netinet/in_systm.h>
#include <netinet/if_ether.h>
-#include <../include/sid.h>
-#include <../include/rpb.h>
+#include <machine/sid.h>
+#include <machine/rpb.h>
#include <lib/libsa/netif.h>
#include <lib/libsa/stand.h>
+#include <arch/vax/mbus/mbusreg.h>
+#include <arch/vax/mbus/fwioreg.h>
+
#include <dev/ic/am7990reg.h>
#include "vaxstand.h"
nireg = (void *)0x20084400;
} else if (vax_boardtype == VAX_BTYP_60) {
extern int ka60_ioslot;
- lebufaddr = 0x30a00000 + (ka60_ioslot << 25);
- ea = (int *)(0x30800000 + (ka60_ioslot << 25));
+ lebufaddr = MBUS_SLOT_BASE(ka60_ioslot) + FWIO_LANCE_BUF_OFFSET;
+ ea = (int *)(MBUS_SLOT_BASE(ka60_ioslot) + FWIO_ESAR_OFFSET);
for (i = 0; i < 6; i++) {
eaddr[i] = *(u_char *)((int)ea + 2);
ea++;
}
ea = NULL;
- nireg = (void *)(0x30200000 + (ka60_ioslot << 25));
+ nireg = (void *)(MBUS_SLOT_BASE(ka60_ioslot) +
+ FWIO_LANCE_REG_OFFSET);
} else {
*(int *)0x20080014 = 0; /* Be sure we do DMA in low 16MB */
ea = (void *)0x20090000; /* XXX Ethernet address */