summaryrefslogtreecommitdiff
path: root/sys/arch/vax/mba
diff options
context:
space:
mode:
authorHugh Graham <hugh@cvs.openbsd.org>2002-06-11 09:36:25 +0000
committerHugh Graham <hugh@cvs.openbsd.org>2002-06-11 09:36:25 +0000
commit10ca5e5818bb80e596db244327a2663b6703bb18 (patch)
treec7ac330b34d73ea4e0c78d17a9eed0a3b6df63aa /sys/arch/vax/mba
parent180b34af9885b092bee0f67c5b2ac8577d972cfe (diff)
New boot code, mostly from ragge's work in NetBSD.
Some header syncing and a couple network drivers came along for the ride. Assembly files have been renamed from .s to .S to facilitate diffs. Kernel is backwards compat - with manual interaction. OpenBSD features have been preserved.
Diffstat (limited to 'sys/arch/vax/mba')
-rw-r--r--sys/arch/vax/mba/hpreg.h23
-rw-r--r--sys/arch/vax/mba/mbareg.h22
-rw-r--r--sys/arch/vax/mba/mbavar.h21
3 files changed, 52 insertions, 14 deletions
diff --git a/sys/arch/vax/mba/hpreg.h b/sys/arch/vax/mba/hpreg.h
index f0255d329ca..76f6459923c 100644
--- a/sys/arch/vax/mba/hpreg.h
+++ b/sys/arch/vax/mba/hpreg.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: hpreg.h,v 1.4 1997/05/29 00:04:59 niklas Exp $ */
-/* $NetBSD: hpreg.h,v 1.4 1996/02/11 13:19:35 ragge Exp $ */
+/* $OpenBSD: hpreg.h,v 1.5 2002/06/11 09:36:24 hugh Exp $ */
+/* $NetBSD: hpreg.h,v 1.5 2000/06/04 18:04:39 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -30,6 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef notdef
struct hp_regs {
int hp_cs1;
int hp_ds;
@@ -49,8 +50,24 @@ struct hp_regs {
int hp_ec2;
int utrymme[16];
};
+#endif
-#define hp_drv hp_regs
+#define HP_CS1 0
+#define HP_DS 4
+#define HP_ER1 8
+#define HP_MR1 12
+#define HP_AS 16
+#define HP_DA 20
+#define HP_DT 24
+#define HP_LA 28
+#define HP_SN 32
+#define HP_OF 36
+#define HP_DC 40
+#define HP_HR 44
+#define HP_MR2 48
+#define HP_ER2 52
+#define HP_EC1 56
+#define HP_EC2 60
#define HPCS_DVA 4000 /* Drive avail, in dual-port config */
#define HPCS_WRITE 061 /* Write data */
diff --git a/sys/arch/vax/mba/mbareg.h b/sys/arch/vax/mba/mbareg.h
index e7a3fa6e4b3..427a7185edb 100644
--- a/sys/arch/vax/mba/mbareg.h
+++ b/sys/arch/vax/mba/mbareg.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: mbareg.h,v 1.4 1997/05/29 00:05:00 niklas Exp $ */
-/* $NetBSD: mbareg.h,v 1.3 1996/02/11 13:19:38 ragge Exp $ */
+/* $OpenBSD: mbareg.h,v 1.5 2002/06/11 09:36:24 hugh Exp $ */
+/* $NetBSD: mbareg.h,v 1.4 2000/06/04 18:04:39 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
* All rights reserved.
@@ -30,6 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef notdef
struct mba_hack {
u_int pad1;
u_int md_ds; /* unit status */
@@ -53,6 +54,23 @@ struct mba_regs {
struct mba_hack mba_md[8]; /* unit specific regs */
struct pte mba_map[256];
};
+#endif
+
+#define MBA_CSR 0
+#define MBA_CR 4
+#define MBA_SR 8
+#define MBA_VAR 12
+#define MBA_BC 16
+#define MBA_DR 20
+#define MBA_SMR 24
+#define MBA_CAR 28
+
+#define MUREG(dev,reg) (1024+(dev)*128+(reg))
+#define MAPREG(nr) (2048+(nr)*4)
+
+#define MU_DS 4 /* unit status */
+#define MU_AS 16 /* attention summary */
+#define MU_DT 24 /* drive type */
/*
* Different states which can be on massbus.
diff --git a/sys/arch/vax/mba/mbavar.h b/sys/arch/vax/mba/mbavar.h
index d1b51450027..0dca256e5c2 100644
--- a/sys/arch/vax/mba/mbavar.h
+++ b/sys/arch/vax/mba/mbavar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: mbavar.h,v 1.5 2002/03/14 01:26:48 millert Exp $ */
-/* $NetBSD: mbavar.h,v 1.5 2000/01/21 23:39:56 thorpej Exp $ */
+/* $OpenBSD: mbavar.h,v 1.6 2002/06/11 09:36:24 hugh Exp $ */
+/* $NetBSD: mbavar.h,v 1.7 2000/06/04 18:04:39 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
* All rights reserved.
@@ -31,6 +31,7 @@
*/
#include <sys/device.h>
+#include <machine/scb.h>
#define MBCR_INIT 1
#define MBCR_IE (1<<2)
@@ -78,10 +79,12 @@ enum xfer_action {
* Info passed do unit device driver during autoconfig.
*/
struct mba_attach_args {
- int unit;
- int type;
- char *name;
- enum mb_devices devtyp;
+ int ma_unit;
+ int ma_type;
+ char *ma_name;
+ enum mb_devices ma_devtyp;
+ bus_space_tag_t ma_iot;
+ bus_space_handle_t ma_ioh;
};
/*
@@ -103,11 +106,11 @@ struct mba_device {
struct mba_softc {
struct device sc_dev;
- struct ivec_dsp sc_dsp; /* Interrupt catch routine */
- struct mba_regs *sc_mbareg;
+ bus_space_tag_t sc_iot;
+ bus_space_handle_t sc_ioh;
+ struct evcnt sc_intrcnt;
struct mba_device *sc_first, *sc_last;
enum sc_state sc_state;
- int sc_physnr; /* Physical number of this mba */
struct mba_device *sc_md[MAXMBADEV];
};