From 4dedbc0b80ebead227be6b6fd2bb12fd8ba7933c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 17 May 2013 22:52:00 +0000 Subject: Preliminary support for MVME180 and MVME181 boards. On-board serial ports and VME controller are supported; tod chip isn't supported yet (coming soon). MVME236 memory boards are not supported and won't likely be (unless I get my hands on one). MVME181-1 boots multiuser (slowly) with MVME328 SCSI and MVME376 Ethernet despite only having 8MB of memory onboard. MVME180 untested; might need tweaking to get MVME SCSI and Ethernet boards supported. Many thanks to Matti Nummi for lending me an MVME181 board. --- sys/arch/mvme88k/include/autoconf.h | 15 +++++----- sys/arch/mvme88k/include/intr.h | 6 ++-- sys/arch/mvme88k/include/mvme181.h | 59 +++++++++++++++++++++++++++++++++++++ sys/arch/mvme88k/include/param.h | 4 ++- 4 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 sys/arch/mvme88k/include/mvme181.h (limited to 'sys/arch/mvme88k/include') diff --git a/sys/arch/mvme88k/include/autoconf.h b/sys/arch/mvme88k/include/autoconf.h index dfc8e6cabb7..88a84b3b21c 100644 --- a/sys/arch/mvme88k/include/autoconf.h +++ b/sys/arch/mvme88k/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.18 2011/03/23 16:54:36 pirofti Exp $ */ +/* $OpenBSD: autoconf.h,v 1.19 2013/05/17 22:51:59 miod Exp $ */ /* * Copyright (c) 1999, Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -50,12 +50,13 @@ struct confargs { const char *ca_name; /* device name */ }; -#define BUS_MAIN 0 -#define BUS_PCCTWO 3 -#define BUS_VMES 4 -#define BUS_VMEL 5 -#define BUS_SYSCON 6 -#define BUS_BUSSWITCH 7 +#define BUS_MAIN 0 +#define BUS_ANGELFIRE 1 +#define BUS_SYSCON 2 +#define BUS_PCCTWO 3 +#define BUS_VMES 4 +#define BUS_VMEL 5 +#define BUS_BUSSWITCH 6 /* the following are from the prom/bootblocks */ extern paddr_t bootaddr; /* PA of boot device */ diff --git a/sys/arch/mvme88k/include/intr.h b/sys/arch/mvme88k/include/intr.h index 0b82ad607ab..6e51e522368 100644 --- a/sys/arch/mvme88k/include/intr.h +++ b/sys/arch/mvme88k/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.22 2013/05/17 22:40:01 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.23 2013/05/17 22:51:59 miod Exp $ */ /* * Copyright (C) 2000 Steve Murphree, Jr. * All rights reserved. @@ -78,8 +78,8 @@ #define IPL_SOFTINT 1 #define IPL_BIO 2 #define IPL_NET 3 -#define IPL_TTY 3 -#define IPL_VM 3 +#define IPL_TTY 5 +#define IPL_VM 5 #define IPL_CLOCK 5 #define IPL_STATCLOCK 5 #define IPL_SCHED 5 diff --git a/sys/arch/mvme88k/include/mvme181.h b/sys/arch/mvme88k/include/mvme181.h new file mode 100644 index 00000000000..ec980abc4af --- /dev/null +++ b/sys/arch/mvme88k/include/mvme181.h @@ -0,0 +1,59 @@ +/* $OpenBSD: mvme181.h,v 1.1 2013/05/17 22:51:59 miod Exp $ */ + +/* + * Copyright (c) 2013 Miodrag Vallat. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _MACHINE_MVME181_H_ +#define _MACHINE_MVME181_H_ + +#define M181_OBIO_START 0xffe00000 + +#define M181_CMMU_I 0xfff7e000 /* Instruction CMMU address */ +#define M181_CMMU_D 0xfff7f000 /* Data CMMU address */ + +#define M181_SSR 0xffe10000 /* system status register */ +#define M181_SCR 0xffe20000 /* system control register */ +#define M181_CPEI 0xffe30000 /* clear parity error interrupt */ +#define M181_VMEVEC 0xffe80000 /* VME vector register */ +#define M181_CLRABRT 0xffee0000 /* clear abort interrupt */ + +#define M181_DUART 0xffe40000 /* base address of DUART chip */ +#define M181_DSRTC 0xff800000 /* base address of TODclock */ + +/* + * Control and Status Register interrupt bits - 180 only has the lower 8 bits + */ + +#define M181_IRQ_VME4_180 0x0010 +#define M181_IRQ_PARITY 0x0020 /* 181 only */ +#define M181_IRQ_DUART 0x0040 +#define M181_IRQ_ABORT 0x0080 +#define M181_IRQ_VME1 0x0200 +#define M181_IRQ_VME2 0x0400 +#define M181_IRQ_VME3 0x0800 +#define M181_IRQ_VME4 0x1000 +#define M181_IRQ_VME5 0x2000 +#define M181_IRQ_VME6 0x4000 +#define M181_IRQ_VME7 0x8000 + +/* + * System Status register bits (not interrupt bits) + */ + +#define M181_SYSCON 0x0004 /* S3-1 switch closed */ +#define M181_BOARDMODE 0x0100 /* S3-6 switch closed */ + +#endif /* _MACHINE_MVME181_H_ */ diff --git a/sys/arch/mvme88k/include/param.h b/sys/arch/mvme88k/include/param.h index 7cda9b12992..fb7be221ec9 100644 --- a/sys/arch/mvme88k/include/param.h +++ b/sys/arch/mvme88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.41 2013/03/23 16:12:25 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.42 2013/05/17 22:51:59 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. @@ -58,6 +58,8 @@ extern int brdtyp; /* * Values for the brdtyp variable. */ +#define BRD_180 0x180 +#define BRD_181 0x181 #define BRD_187 0x187 #define BRD_188 0x188 #define BRD_197 0x197 -- cgit v1.2.3