Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax A big bunch of bugfixes from Johnny Billquist. ...
details: https://anonhg.NetBSD.org/src/rev/c6e7034003a9
branches: trunk
changeset: 755990:c6e7034003a9
user: ragge <ragge%NetBSD.org@localhost>
date: Thu Jul 01 19:50:11 2010 +0000
description:
A big bunch of bugfixes from Johnny Billquist. Highlights:
- Makes the VAX8600 work as expected (500kg of hardware :-)
- Fix a hard-tracked bug causing VAXen to hang at splhigh.
diffstat:
sys/arch/vax/conf/GENERIC | 18 ++++--
sys/arch/vax/conf/files.vax | 13 +++-
sys/arch/vax/include/cpu.h | 3 +-
sys/arch/vax/include/ioa.h | 15 +++-
sys/arch/vax/include/nexus.h | 32 +++++++-----
sys/arch/vax/uba/uba_sbi.c | 18 ++++--
sys/arch/vax/vax/autoconf.c | 22 ++++---
sys/arch/vax/vax/clock.c | 9 ++-
sys/arch/vax/vax/cmi.c | 6 +-
sys/arch/vax/vax/crl.c | 13 +++-
sys/arch/vax/vax/intvec.S | 9 ++-
sys/arch/vax/vax/ka860.c | 107 +++++++++++++++++++++++++++++------------
sys/arch/vax/vax/lock_stubs.S | 14 +++-
sys/arch/vax/vax/pmap.c | 6 +-
sys/arch/vax/vax/sbi.c | 95 ++++++++++++++++++++++++++++++------
sys/arch/vax/vax/ubi.c | 6 +-
16 files changed, 269 insertions(+), 117 deletions(-)
diffs (truncated from 937 to 300 lines):
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/conf/GENERIC
--- a/sys/arch/vax/conf/GENERIC Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/conf/GENERIC Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.173 2010/05/08 22:16:30 mrg Exp $
+# $NetBSD: GENERIC,v 1.174 2010/07/01 19:50:11 ragge Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.173 $"
+#ident "GENERIC-$Revision: 1.174 $"
# Here are all different supported CPU types listed.
#options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800
@@ -176,7 +176,8 @@
cpu* at mainbus0
# All buses; from the beginning attached to mainbus.
-sbi0 at mainbus0 # SBI, master bus on 11/780, 8600.
+abus0 at mainbus0 # Master bus on VAX 86x0
+sbi0 at mainbus0 # SBI, master bus on 11/78x.
cmi0 at mainbus0 # 11/750 internal bus.
bi0 at mainbus0 # VAX 8200
vsbus0 at mainbus0 # All VAXstations
@@ -232,6 +233,9 @@
uba* at cmi? tr? # Unibus adapters
mba* at cmi? tr? # Massbus adapters
+# ABUS (VAX 86x0)
+sbi* at abus0 # VAX 86x0 can have up to 2 SBI's.
+
# SBI (VAX 11/780, VAX 8600)
mem* at sbi? tr? # Memory subsystems
uba* at sbi? tr? # Unibus adapters
@@ -301,10 +305,10 @@
pseudo-device bpfilter
#pseudo-device carp # Common Address Redundancy Protocol
pseudo-device ipfilter # IP filter (firewall) and NAT
-#pseudo-device sl
-pseudo-device ppp
+#pseudo-device sl
+pseudo-device ppp
#pseudo-device pppoe # PPP over Ethernet (RFC 2516)
-pseudo-device tun
+pseudo-device tun
pseudo-device tap # virtual Ethernet
#pseudo-device gre # generic L3 over IP tunnel
pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933)
@@ -314,7 +318,7 @@
pseudo-device bridge # simple inter-network bridging
#options BRIDGE_IPF # bridge uses IP/IPv6 pfil hooks too
pseudo-device agr # IEEE 802.3ad link aggregation
-pseudo-device vnd
+pseudo-device vnd
#options VND_COMPRESSION # compressed vnd(4)
pseudo-device ccd 4
#pseudo-device cgd 4 # cryptographic disk devices
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/conf/files.vax
--- a/sys/arch/vax/conf/files.vax Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/conf/files.vax Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.vax,v 1.116 2009/02/16 23:55:31 christos Exp $
+# $NetBSD: files.vax,v 1.117 2010/07/01 19:50:11 ragge Exp $
#
# new style config file for vax architecture
#
@@ -35,19 +35,22 @@
attach nmi at mainbus with nmi_mainbus
file arch/vax/vax/nmi_mainbus.c nmi
+# Abus and related devices
+device abus {}: bus
+attach abus at mainbus with abus_mainbus
+file arch/vax/vax/ka860.c vax8600
+file arch/vax/vax/crl.c vax8600
+
# SBI and related devices
device sbi { tr=-1 }: bus
attach sbi at mainbus with sbi_mainbus
+attach sbi at abus with sbi_abus
file arch/vax/vax/sbi.c sbi
attach mem at sbi with mem_sbi
file arch/vax/vax/ka780.c vax780 | mem_sbi | vaxany
file arch/vax/vax/cfl.c vax780 | mem_sbi | vaxany
-# Abus and related devices
-file arch/vax/vax/ka860.c vax8600
-file arch/vax/vax/crl.c vax8600
-
# CMI and related devices
device cmi { tr=-1 }: bus
attach cmi at mainbus
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/include/cpu.h Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.88 2010/06/22 18:29:02 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.89 2010/07/01 19:50:12 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -79,7 +79,6 @@
void (*cpu_clrf)(void); /* Clear cold/warm start flags */
const char * const *cpu_devs; /* mainbus devices */
void (*cpu_attach_cpu)(device_t); /* print CPU info */
- void (*cpu_subconf)(device_t, void *, cfprint_t); /* attach dep. dev */
int cpu_flags;
void (*cpu_badaddr)(void); /* cpu-specific badaddr() */
};
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/include/ioa.h
--- a/sys/arch/vax/include/ioa.h Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/include/ioa.h Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioa.h,v 1.12 2007/03/04 06:00:57 christos Exp $ */
+/* $NetBSD: ioa.h,v 1.13 2010/07/01 19:50:12 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -30,6 +30,10 @@
* @(#)ioa.h 7.3 (Berkeley) 5/9/91
*/
+/*
+ * ABus support added by Johnny Billquist 2010
+ */
+
/****************************************************************
* *
* Licensed from Digital Equipment Corporation *
@@ -57,9 +61,10 @@
#include "opt_cputype.h"
#if VAX8600 || VAXANY
#define NIOA8600 2 /* Number of SBI possible on a VAX86x0 */
-#define IOASIZE 0x2000000
+#define IOASIZE 0x2000000 /* Size of one SBI memory area */
#define IOAMAPSIZ 512 /* Map one page to get at SBIA regs */
-#define IOA8600(i) ((void *)(0x20080000+IOASIZE*i))
+#define SBIA8600(i) ((void *)(0x20000000+IOASIZE*i)) /* Base address for SBI */
+#define IOA8600(i) ((void *)((bus_addr_t)(SBIA8600(i))+0x80000)) /* Address of SBIA registers */
struct sbia_regs
{
@@ -102,7 +107,7 @@
int sbi_unused2[17];
};
-#define IOA_TYPMSK 0xf0
-#define IOA_SBIA 0x10
+#define IOA_TYPMSK 0xf0 /* Mask for type information in sbi_cfg */
+#define IOA_SBIA 0x10 /* Value for SBIA type on ABus */
#endif /* VAX8600 */
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/include/nexus.h
--- a/sys/arch/vax/include/nexus.h Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/include/nexus.h Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nexus.h,v 1.25 2008/03/11 05:34:02 matt Exp $ */
+/* $NetBSD: nexus.h,v 1.26 2010/07/01 19:50:12 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -31,6 +31,10 @@
* @(#)nexus.h 7.3 (Berkeley) 5/9/91
*/
+/*
+ * ABus support added by Johnny Billquist 2010.
+ */
+
#ifndef _VAX_NEXUS_H_
#define _VAX_NEXUS_H_
@@ -46,7 +50,7 @@
VAX_SBIBUS, /* SBI parent (780) */
VAX_CMIBUS, /* CMI backplane (750) */
VAX_UNIBUS, /* Direct backplane (730) */
- VAX_ABUS, /* SBI placeholder (8600) */
+ VAX_ABUS, /* ABus (8600) */
VAX_BIBUS, /* BI bus (8200) */
VAX_NMIBUS, /* NMI backplane (8800) */
VAX_VSBUS, /* Virtual vaxstation bus */
@@ -61,16 +65,13 @@
* byte of the first word of the adapter address space.
* At boot time the system looks through the array of available
* slots and finds the interconnects for the machine.
+ *
+ * VAX8600 nexus information is located in ioa.h
*/
#define IO_CMI750 2
#define MAXNMCR 1
#define NNEXSBI 16
-#if VAX8600 || VAXANY
-#define NNEX8600 NNEXSBI
-#define NEXA8600 ((struct nexus *)(0x20000000))
-#define NEXB8600 ((struct nexus *)(0x22000000))
-#endif
#if VAX780 || VAXANY
#define NNEX780 NNEXSBI
#define NEX780 ((struct nexus *)0x20000000)
@@ -81,12 +82,6 @@
#endif
#define NEXSIZE 0x2000
-#if VAX8600 || VAXANY
-#define MAXNNEXUS (2 * NNEXSBI)
-#else
-#define MAXNNEXUS NNEXSBI
-#endif
-
#ifdef _KERNEL
struct nexus {
@@ -97,6 +92,16 @@
long nex_pad[NEXSIZE / sizeof (long) - 1];
};
+struct abus_attach_args {
+ const char *aa_name;
+ int aa_type;
+ bus_addr_t aa_base;
+ int aa_num;
+ bus_space_tag_t aa_iot;
+ bus_space_handle_t aa_ioh;
+ bus_dma_tag_t aa_dmat;
+};
+
struct sbi_attach_args {
int sa_nexnum; /* This nexus TR number */
int sa_type; /* This nexus type */
@@ -104,6 +109,7 @@
bus_space_tag_t sa_iot;
bus_space_handle_t sa_ioh;
bus_dma_tag_t sa_dmat;
+ bus_addr_t sa_base;
};
/* Memory device struct. This should be somewhere else */
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/uba/uba_sbi.c
--- a/sys/arch/vax/uba/uba_sbi.c Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/uba/uba_sbi.c Thu Jul 01 19:50:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uba_sbi.c,v 1.27 2009/03/14 15:36:14 dsl Exp $ */
+/* $NetBSD: uba_sbi.c,v 1.28 2010/07/01 19:50:12 ragge Exp $ */
/*
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -67,8 +67,15 @@
* @(#)autoconf.c 7.20 (Berkeley) 5/9/91
*/
+/*
+ * Abus support added by Johnny Billquist 2010
+ * Changed UBA code to need to know less of the innards of the
+ * actual machine at the same time. Information passed down from
+ * the SBI bus instead.
+ */
+
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uba_sbi.c,v 1.27 2009/03/14 15:36:14 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uba_sbi.c,v 1.28 2010/07/01 19:50:12 ragge Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -92,8 +99,7 @@
/* Some SBI-specific defines */
#define UBASIZE (UBAPAGES * VAX_NBPG)
-#define UMEMA8600(i) (0x20100000+(i)*0x40000)
-#define UMEMB8600(i) (0x22100000+(i)*0x40000)
+#define UMEM(sa,i) ((sa->sa_base)+0x100000+(i)*0x40000)
/*
* Some status registers.
@@ -169,6 +175,7 @@
struct sbi_attach_args * const sa = aux;
int ubaddr = sa->sa_type & 3;
+ aprint_naive(": DW780\n");
aprint_normal(": DW780\n");
/*
@@ -214,8 +221,7 @@
sc->uv_size = UBASIZE; /* Size in bytes of Unibus space */
uba_dma_init(sc);
- uba_attach(&sc->uv_sc, (sa->sa_sbinum ? UMEMB8600(ubaddr) :
- UMEMA8600(ubaddr)) + (UBAPAGES * VAX_NBPG));
+ uba_attach(&sc->uv_sc, UMEM(sa,ubaddr) + (UBAPAGES * VAX_NBPG));
}
void
diff -r af25cc7d99d0 -r c6e7034003a9 sys/arch/vax/vax/autoconf.c
--- a/sys/arch/vax/vax/autoconf.c Thu Jul 01 17:35:14 2010 +0000
+++ b/sys/arch/vax/vax/autoconf.c Thu Jul 01 19:50:11 2010 +0000
Home |
Main Index |
Thread Index |
Old Index