diff options
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r-- | sys/arch/vax/include/ansi.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/include/cpu.h | 33 | ||||
-rw-r--r-- | sys/arch/vax/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/endian.h | 10 | ||||
-rw-r--r-- | sys/arch/vax/include/ioa.h | 118 | ||||
-rw-r--r-- | sys/arch/vax/include/ka650.h | 11 | ||||
-rw-r--r-- | sys/arch/vax/include/ka750.h | 11 | ||||
-rw-r--r-- | sys/arch/vax/include/macros.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/mtpr.h | 24 | ||||
-rw-r--r-- | sys/arch/vax/include/nexus.h | 25 | ||||
-rw-r--r-- | sys/arch/vax/include/param.h | 20 | ||||
-rw-r--r-- | sys/arch/vax/include/pcb.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 16 | ||||
-rw-r--r-- | sys/arch/vax/include/pte.h | 12 | ||||
-rw-r--r-- | sys/arch/vax/include/rsp.h | 89 | ||||
-rw-r--r-- | sys/arch/vax/include/trap.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/types.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/include/uvaxII.h | 15 | ||||
-rw-r--r-- | sys/arch/vax/include/vmparam.h | 4 |
19 files changed, 353 insertions, 67 deletions
diff --git a/sys/arch/vax/include/ansi.h b/sys/arch/vax/include/ansi.h index 5af1f55f91a..088f4a3dbec 100644 --- a/sys/arch/vax/include/ansi.h +++ b/sys/arch/vax/include/ansi.h @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.3 1994/10/26 08:01:59 cgd Exp $ */ +/* $NetBSD: ansi.h,v 1.4 1996/03/16 01:32:03 jtc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -56,5 +56,6 @@ #define _BSD_TIME_T_ long /* time() */ #define _BSD_VA_LIST_ char * /* va_list */ #define _BSD_WCHAR_T_ int /* wchar_t */ +#define _BSD_WINT_T_ int /* wint_t */ #endif /* _ANSI_H_ */ diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h index 12ce8363e99..684bafd2e04 100644 --- a/sys/arch/vax/include/cpu.h +++ b/sys/arch/vax/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.13 1995/12/13 18:57:57 ragge Exp $ */ +/* $NetBSD: cpu.h,v 1.16 1996/04/08 18:35:46 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden @@ -32,9 +32,9 @@ /* All bugs are subject to removal without further notice */ -#include "sys/cdefs.h" -#include "machine/mtpr.h" -#include "machine/pcb.h" +#include <sys/cdefs.h> +#include <machine/mtpr.h> +#include <machine/pcb.h> #define enablertclock() #define cpu_wait(p) @@ -45,12 +45,11 @@ extern int cpunumber, cpu_type; extern struct cpu_dep cpu_calls[]; struct cpu_dep { - int (*cpu_steal_pages)(); /* Pmap init before mm is on */ - int (*cpu_clock)(); /* CPU dependent clock handling */ - int (*cpu_mchk)(); /* Machine check handling */ - int (*cpu_memerr)(); /* Memory subsystem errors */ - int (*cpu_conf)(); /* Autoconfiguration */ -/* int (*cpu_cmrerr)(); /* Memory parity errors */ + void (*cpu_steal_pages) __P((void)); /* pmap init before mm is on */ + int (*cpu_clock) __P((void)); /* CPU dependent clock handling */ + int (*cpu_mchk) __P((caddr_t)); /* Machine check handling */ + void (*cpu_memerr) __P((void)); /* Memory subsystem errors */ + void (*cpu_conf) __P((void *, void *, void *)); /* Autoconfiguration */ }; struct clockframe { @@ -87,3 +86,17 @@ extern int want_resched; /* resched() was called */ */ #define need_proftick(p) {(p)->p_flag |= P_OWEUPC; mtpr(AST_OK,PR_ASTLVL); } +/* Some low-level prototypes */ +int badaddr __P((caddr_t, int)); +void cpu_set_kpc __P((struct proc *, void (*)(struct proc *))); +void cpu_swapin __P((struct proc *)); +int hp_getdev __P((int, int)); +void configure __P((void)); +void dumpconf __P((void)); +void dumpsys __P((void)); +void setroot __P((void)); +void setconf __P((void)); +void swapconf __P((void)); +#ifdef DDB +int kdbrint __P((int)); +#endif diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h index b2a9fd68642..1cbaa2c5d43 100644 --- a/sys/arch/vax/include/db_machdep.h +++ b/sys/arch/vax/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.1 1995/06/16 15:17:27 ragge Exp $ */ +/* $NetBSD: db_machdep.h,v 1.2 1996/04/08 18:35:47 ragge Exp $ */ /* * Mach Operating System @@ -70,4 +70,6 @@ db_regs_t ddb_regs; /* register state */ #define inst_load(ins) 0 #define inst_store(ins) 0 +/* Prototypes */ +void kdb_trap __P((struct trapframe *)); #endif /* _VAX_DB_MACHDEP_H_ */ diff --git a/sys/arch/vax/include/endian.h b/sys/arch/vax/include/endian.h index 05e1526909c..b43df880e93 100644 --- a/sys/arch/vax/include/endian.h +++ b/sys/arch/vax/include/endian.h @@ -1,4 +1,4 @@ -/* $NetBSD: endian.h,v 1.6 1995/08/21 16:36:32 ragge Exp $ */ +/* $NetBSD: endian.h,v 1.7 1996/04/08 18:35:48 ragge Exp $ */ /* * Copyright (c) 1987, 1991 Regents of the University of California. @@ -102,10 +102,10 @@ __END_DECLS /* * Macros for network/external number representation conversion. */ -#define NTOHL(x) (x) = ntohl((unsigned long)(x)) -#define NTOHS(x) (x) = ntohs((unsigned long)(x)) -#define HTONL(x) (x) = htonl((unsigned long)(x)) -#define HTONS(x) (x) = htons((unsigned long)(x)) +#define NTOHL(x) (x) = ntohl((unsigned long)(x)) +#define NTOHS(x) (x) = ntohs((unsigned long)(x)) +#define HTONL(x) (x) = htonl((unsigned long)(x)) +#define HTONS(x) (x) = htons((unsigned long)(x)) #endif /* _POSIX_SOURCE */ diff --git a/sys/arch/vax/include/ioa.h b/sys/arch/vax/include/ioa.h new file mode 100644 index 00000000000..86df5510434 --- /dev/null +++ b/sys/arch/vax/include/ioa.h @@ -0,0 +1,118 @@ +/* $NetBSD: ioa.h,v 1.4 1996/03/07 23:23:58 ragge Exp $ */ +/*- + * Copyright (c) 1982, 1986 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ioa.h 7.3 (Berkeley) 5/9/91 + */ + +/**************************************************************** + * * + * Licensed from Digital Equipment Corporation * + * Copyright (c) * + * Digital Equipment Corporation * + * Maynard, Massachusetts * + * 1985, 1986 * + * All rights reserved. * + * * + * The Information in this software is subject to change * + * without notice and should not be construed as a commitment * + * by Digital Equipment Corporation. Digital makes no * + * representations about the suitability of this software for * + * any purpose. It is supplied "As Is" without expressed or * + * implied warranty. * + * * + * If the Regents of the University of California or its * + * licensees modify the software in a manner creating * + * diriviative copyright rights, appropriate copyright * + * legends may be placed on the drivative work in addition * + * to that set forth above. * + * * + ****************************************************************/ + +#if VAX8600 +#define MAXNIOA 4 +#define NIOA8600 2 +#define IOASIZE 0x2000000 +#define IOAMAPSIZ 512 /* Map one page to get at SBIA regs */ +#define IOA8600(i) ((caddr_t)(0x20080000+IOASIZE*i)) + +struct sbia_regs +{ + int sbi_cfg; + int sbi_csr; + int sbi_errsum; + int sbi_dctl; + int sbi_dmaica; + int sbi_dmaiid; + int sbi_dmaaca; + int sbi_dmaaid; + int sbi_dmabcs; + int sbi_dmabid; + int sbi_dmaccs; + int sbi_dmacid; + int sbi_silo; + int sbi_error; + int sbi_timo; + int sbi_fltsts; + int sbi_silcmp; + int sbi_maint; + int sbi_unjam; + int sbi_qclr; + int sbi_unused[12]; + int sbi_iv10; + int sbi_iv11; + int sbi_iv12; + int sbi_iv13; + int sbi_iv14; + int sbi_iv15; + int sbi_iv16; + int sbi_iv17; + int sbi_iv18; + int sbi_iv19; + int sbi_iv1a; + int sbi_iv1b; + int sbi_iv1c; + int sbi_iv1d; + int sbi_iv1e; +}; +struct ioa { + union ioacsr { + long ioa_csr; + u_char ioa_type; + } ioacsr; + long ioa_pad[IOAMAPSIZ / sizeof (long) - 1]; +}; + +#define IOA_TYPMSK 0xf0 +#define IOA_SBIA 0x10 + +#endif VAX8600 diff --git a/sys/arch/vax/include/ka650.h b/sys/arch/vax/include/ka650.h index 237402cac5c..63d9f42d93f 100644 --- a/sys/arch/vax/include/ka650.h +++ b/sys/arch/vax/include/ka650.h @@ -233,3 +233,14 @@ struct ka650_ipcr { #define KA650ROM_PUTS 0x2006000c /* (jsb) put string to console */ #define KA650ROM_GETS 0x20060010 /* (jsb) read string with prompt */ #define KA650_CONSTYPE 0x20140401 /* byte at which console type resides */ + +/* prototypes */ +struct sbi_attach_args; + +void uvaxIII_conf __P((void *, void *, void *)); +int uvaxIII_clock __P((void)); +void uvaxIII_memenable __P((struct sbi_attach_args *, struct device *)); +void uvaxIII_memerr __P((void)); +int uvaxIII_mchk __P((caddr_t)); +void uvaxIII_steal_pages __P((void)); + diff --git a/sys/arch/vax/include/ka750.h b/sys/arch/vax/include/ka750.h index 9b5f71b0745..cb6ff375a18 100644 --- a/sys/arch/vax/include/ka750.h +++ b/sys/arch/vax/include/ka750.h @@ -1,4 +1,4 @@ -/* $NetBSD: ka750.h,v 1.3 1995/11/12 14:37:20 ragge Exp $ */ +/* $NetBSD: ka750.h,v 1.5 1996/04/08 18:35:50 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "machine/nexus.h" +#include <machine/nexus.h> #define V750UCODE(x) ((x>>8)&255) #define V750HARDW(x) (x&255) @@ -42,3 +42,10 @@ /* 11/750 specific pages needed to be stolen when bootstrapping */ #define V750PGS 4 +/* 11/750 specific prototypes */ +void ka750_conf __P((void *, void *, void *)); +int ka750_clock __P((void)); +void ka750_memenable __P((struct sbi_attach_args *, struct device *)); +void ka750_memerr __P((void)); +int ka750_mchk __P((caddr_t)); +void ka750_steal_pages __P((void)); diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h index 969735a6640..b08881f0791 100644 --- a/sys/arch/vax/include/macros.h +++ b/sys/arch/vax/include/macros.h @@ -1,4 +1,4 @@ -/* $NetBSD: macros.h,v 1.6 1995/12/13 18:56:01 ragge Exp $ */ +/* $NetBSD: macros.h,v 1.8 1996/03/17 22:44:50 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -33,7 +33,7 @@ /* All bugs are subject to removal without further notice */ #if !defined(_VAX_MACROS_H_) && (defined(STANDALONE) || \ - (!defined(ASSEMBLER) && defined(_VAX_INLINE_))) + (!defined(_LOCORE) && defined(_VAX_INLINE_))) #define _VAX_MACROS_H_ /* Here general macros are supposed to be stored */ @@ -137,7 +137,7 @@ static __inline__ int scanc(u_int size, u_char *cp,u_char *table, int mask){ return ret; } -static __inline__ int skpc(int mask, int size, char *cp){ +static __inline__ int skpc(int mask, size_t size, u_char *cp){ register ret; asm __volatile("skpc %1,%2,(%3);movl r0,%0" diff --git a/sys/arch/vax/include/mtpr.h b/sys/arch/vax/include/mtpr.h index 6da155b2f69..0ee73aa8575 100644 --- a/sys/arch/vax/include/mtpr.h +++ b/sys/arch/vax/include/mtpr.h @@ -1,4 +1,4 @@ -/* $NetBSD: mtpr.h,v 1.5 1995/05/03 19:53:45 ragge Exp $ */ +/* $NetBSD: mtpr.h,v 1.8 1996/03/07 23:23:59 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -35,7 +35,7 @@ #ifndef _VAX_MTPR_H_ #define _VAX_MTPR_H_ -#include "machine/macros.h" +#include <machine/macros.h> /****************************************************************************** @@ -103,11 +103,27 @@ #define PR_SID 62 /* System ID Register */ #define PR_TBCHK 63 /* Translation Buffer Check */ +#define PR_PAMACC 64 /* Physical Address Memory Map Access (KA86) */ +#define PR_PAMLOC 65 /* Physical Address Memory Map Location (KA86) */ +#define PR_CSWP 66 /* Cache Sweep (KA86) */ +#define PR_MDECC 67 /* MBOX Data Ecc Register (KA86) */ +#define PR_MENA 68 /* MBOX Error Enable Register (KA86) */ +#define PR_MDCTL 69 /* MBOX Data Control Register (KA86) */ +#define PR_MCCTL 70 /* MBOX Mcc Control Register (KA86) */ +#define PR_MERG 71 /* MBOX Error Generator Register (KA86) */ +#define PR_CRBT 72 /* Console Reboot (KA86) */ +#define PR_DFI 73 /* Diagnostic Fault Insertion Register (KA86) */ +#define PR_EHSR 74 /* Error Handling Status Register (KA86) */ +#define PR_STXCS 76 /* Console Storage C/S (KA86) */ +#define PR_STXDB 77 /* Console Storage D/B (KA86) */ +#define PR_ESPA 78 /* EBOX Scratchpad Address (KA86) */ +#define PR_ESPD 79 /* EBOX Scratchpad Data (KA86) */ + /* Definitions for AST */ #define AST_NO 4 #define AST_OK 3 -#ifndef ASSEMBLER +#ifndef _LOCORE #define mtpr(val,reg) \ { \ @@ -124,6 +140,6 @@ : "g" (reg)); \ val; \ }) -#endif /* ASSEMBLER */ +#endif /* _LOCORE */ #endif /* _VAX_MTPR_H_ */ diff --git a/sys/arch/vax/include/nexus.h b/sys/arch/vax/include/nexus.h index 7f65fcae77d..60343f3df2c 100644 --- a/sys/arch/vax/include/nexus.h +++ b/sys/arch/vax/include/nexus.h @@ -1,4 +1,4 @@ -/* $NetBSD: nexus.h,v 1.6 1995/12/13 18:55:27 ragge Exp $ */ +/* $NetBSD: nexus.h,v 1.10 1996/03/02 14:27:53 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -75,9 +75,9 @@ #define MAXNNEXUS NNEXSBI #endif -#ifndef ASSEMBLER +#ifndef _LOCORE -#include "sys/types.h" +#include <sys/types.h> struct nexus { union nexcsr { @@ -94,6 +94,14 @@ struct sbi_attach_args { void *nexaddr; /* Virtual address of this nexus */ }; +/* Memory device struct. This should be somewhere else */ +struct mem_softc { + struct device sc_dev; + caddr_t sc_memaddr; + int sc_memtype; + int sc_memnr; +}; + struct iobus { int io_type; int io_addr; @@ -173,7 +181,16 @@ extern caddr_t *nex_vec; #define NEX_MEM256UI 0x73 /* 256K chips, ext-interleaved, upper */ #define NEX_MEM256I 0x74 /* 256K chips, interleaved */ -#ifndef ASSEMBLER +/* Memory classes */ +#define M780C 0 +#define M780EL 1 +#define M780EU 2 + +/* Memory recover defines */ +#define MCHK_PANIC -1 +#define MCHK_RECOVERED 0 + +#ifndef _LOCORE struct nexus *nexus; #endif diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h index c9be598e85d..ef969e37240 100644 --- a/sys/arch/vax/include/param.h +++ b/sys/arch/vax/include/param.h @@ -1,5 +1,4 @@ -/* $NetBSD: param.h,v 1.14 1995/12/30 21:37:31 ragge Exp $ */ - +/* $NetBSD: param.h,v 1.19 1996/03/04 05:04:43 cgd Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -41,16 +40,18 @@ #ifndef _VAX_PARAM_H_ #define _VAX_PARAM_H_ -#include "machine/macros.h" -#include "machine/psl.h" +#include <machine/macros.h> +#include <machine/psl.h> /* * Machine dependent constants for VAX. */ -#define MACHINE "vax" +#define _MACHINE vax +#define MACHINE "vax" +#define _MACHINE_ARCH vax #define MACHINE_ARCH "vax" -#define MID_MACHINE MID_VAX +#define MID_MACHINE MID_VAX /* * Round p (pointer or byte index) up to a correctly-aligned value @@ -163,7 +164,7 @@ #define splbio() splx(0x15) /* IPL15 */ #define splnet() splx(0x15) /* IPL15 */ #define spltty() splx(0x15) /* IPL15 */ -#define splimp() splx(0x16) /* IPL16 */ +#define splimp() splx(0x17) /* IPL17 */ #define splclock() splx(0x18) /* IPL18 */ #define splhigh() splx(0x1f) /* IPL1F */ #define splstatclock() splclock() @@ -173,6 +174,11 @@ #define vmapbuf(p,q) #define vunmapbuf(p,q) +/* Prototype needed for delay() */ +#ifndef _LOCORE +void delay __P((int)); +#endif + #define DELAY(x) delay(x) #endif /* _VAX_PARAM_H_ */ diff --git a/sys/arch/vax/include/pcb.h b/sys/arch/vax/include/pcb.h index 14f952dadc9..532a643480b 100644 --- a/sys/arch/vax/include/pcb.h +++ b/sys/arch/vax/include/pcb.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.9 1996/01/28 12:27:19 ragge Exp $ */ +/* $NetBSD: pcb.h,v 1.10 1996/02/02 18:08:26 mycroft Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -35,7 +35,7 @@ #ifndef _VAX_PCB_H_ #define _VAX_PCB_H_ -#include "machine/trap.h" +#include <machine/trap.h> struct pcb { diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index bfc1996e920..870776d4a5e 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.11 1995/11/12 14:41:41 ragge Exp $ */ +/* $NetBSD: pmap.h,v 1.16 1996/04/08 18:35:51 ragge Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -46,7 +46,7 @@ #ifndef PMAP_H #define PMAP_H -#include "machine/mtpr.h" +#include <machine/mtpr.h> #define VAX_PAGE_SIZE NBPG @@ -99,13 +99,11 @@ typedef struct pv_entry { avail_start += (count) * NBPG; #ifdef _KERNEL -pv_entry_t pv_table; /* array of entries, - one per LOGICAL page */ -struct pmap kernel_pmap_store; - #define pa_index(pa) atop(pa) #define pa_to_pvh(pa) (&pv_table[atop(pa)]) +extern struct pmap kernel_pmap_store; + #define pmap_kernel() (&kernel_pmap_store) #endif /* _KERNEL */ @@ -117,6 +115,10 @@ struct pmap kernel_pmap_store; #define pmap_collect(pmap) /* No need so far */ #define pmap_reference(pmap) if(pmap) (pmap)->ref_count++ #define pmap_pinit(pmap) (pmap)->ref_count=1; -#define pmap_phys_address(phys) ((u_int)(phys)<<PAGE_SIZE) +#define pmap_phys_address(phys) ((u_int)(phys)<<PAGE_SHIFT) +/* Prototypes */ +void pmap_bootstrap __P((void)); +void pmap_expandp0 __P((struct pmap *, int)); +void pmap_expandp1 __P((struct pmap *)); #endif PMAP_H diff --git a/sys/arch/vax/include/pte.h b/sys/arch/vax/include/pte.h index 1251b7fc61a..3b2adb9dd5b 100644 --- a/sys/arch/vax/include/pte.h +++ b/sys/arch/vax/include/pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.7 1996/01/28 12:31:24 ragge Exp $ */ +/* $NetBSD: pte.h,v 1.10 1996/02/23 17:54:33 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -30,9 +30,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "machine/param.h" +#include <machine/param.h> -#ifndef ASSEMBLER +#ifndef _LOCORE /* * VAX page table entries @@ -52,7 +52,7 @@ struct pte { typedef struct pte pt_entry_t; /* Mach page table entry */ -#endif ASSEMBLER +#endif _LOCORE #define PT_ENTRY_NULL ((pt_entry_t *) 0) @@ -73,7 +73,7 @@ typedef struct pte pt_entry_t; /* Mach page table entry */ #define PG_FRAME 0x001fffff #define PG_PFNUM(x) ((x) >> PGSHIFT) -#ifndef ASSEMBLER +#ifndef _LOCORE extern pt_entry_t *Sysmap; /* * Kernel virtual address to page table entry and to physical address. @@ -87,6 +87,6 @@ extern pt_entry_t *Sysmap; #define kvtophys(va) \ (((kvtopte(va))->pg_pfn << PGSHIFT) | ((int)(va) & PGOFSET)) #define uvtopte(va, pcb) \ - (((unsigned)va < 0x40000000) || ((unsigned)va > 0x40000000) ? \ + (((unsigned)va < 0x40000000) || ((unsigned)va > 0x80000000) ? \ &((pcb->P0BR)[(unsigned)va >> PGSHIFT]) : \ &((pcb->P1BR)[((unsigned)va & 0x3fffffff) >> PGSHIFT])) diff --git a/sys/arch/vax/include/rsp.h b/sys/arch/vax/include/rsp.h new file mode 100644 index 00000000000..5822f4bf780 --- /dev/null +++ b/sys/arch/vax/include/rsp.h @@ -0,0 +1,89 @@ +/* $NetBSD: rsp.h,v 1.1 1996/02/17 18:14:50 ragge Exp $ */ +/* + * Copyright (c) 1995 Ludd, University of Lule}, Sweden. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed at Ludd, University of + * Lule}, Sweden and its contributors. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +/* + * The Radial Serial Protocol (RSP) that TU58 (DECtape II) uses + * is a strange animal that is sent over serial lines. + * Most packet types can match the struct rsp, but some can't (i.e. + * data packets). + * More about RSP can be read in Digital Peripherals Handbook, p. 92. + */ + +struct rsp { + char rsp_typ; /* Packet type */ + char rsp_sz; /* Packet size */ + char rsp_op; /* Operation */ + char rsp_mod; /* Modifier */ + char rsp_drv; /* Tape drive number */ + char rsp_sw; /* Switches */ + char rsp_xx1; /* Unused, always zero */ + char rsp_xx2; /* Unused, always zero */ + short rsp_cnt; /* Byte count to transfer */ + short rsp_blk; /* Block number */ + short rsp_sum; /* Checksum of packet */ +}; + +/* Types of packets */ +#define RSP_TYP_DATA 001 /* DATA packet */ +#define RSP_TYP_COMMAND 002 /* COMMAND packet */ +#define RSP_TYP_INIT 004 /* INITIALIZE packet */ +#define RSP_TYP_BOOT 010 /* BOOTSTRAP packet (PDP11) */ +#define RSP_TYP_CONTINUE 020 /* CONTINUE packet */ +#define RSP_TYP_XOFF 023 /* XOFF packet */ + +/* Operation types */ +#define RSP_OP_NOP 000 /* No operation */ +#define RSP_OP_RESET 001 /* Reset */ +#define RSP_OP_READ 002 /* Read data */ +#define RSP_OP_WRITE 003 /* Write data */ +#define RSP_OP_POS 005 /* Position tape */ +#define RSP_OP_DIAG 007 /* internal diagnose */ +#define RSP_OP_GSTAT 010 /* Get status */ +#define RSP_OP_SSTAT 011 /* Set status */ +#define RSP_OP_END 100 /* End packet */ + +/* Modifier */ +#define RSP_MOD_VERIFY 001 /* Verify read data */ +#define RSP_MOD_OK 000 /* Success */ +#define RSP_MOD_RETR 001 /* Success w/ retries */ +#define RSP_MOD_FAIL -1 /* Failed self-test */ +#define RSP_MOD_PART -2 /* Partial operation */ +#define RSP_MOD_NET -8 /* Non-existent tape drive */ +#define RSP_MOD_NOC -9 /* No cartridge */ +#define RSP_MOD_WP -11 /* Write protected */ +#define RSP_MOD_DERR -17 /* Data error */ +#define RSP_MOD_SERR -32 /* Seek error */ +#define RSP_MOD_STOP -33 /* Motor stopped */ +#define RSP_MOD_INVAL -48 /* Invalid opcode */ +#define RSP_MOD_INVBLK -55 /* Invalid bloch number */ + diff --git a/sys/arch/vax/include/trap.h b/sys/arch/vax/include/trap.h index 6ce8f0aa6aa..ff7f89cf3b1 100644 --- a/sys/arch/vax/include/trap.h +++ b/sys/arch/vax/include/trap.h @@ -1,4 +1,4 @@ -/* $NetBSD: trap.h,v 1.11 1996/01/28 12:30:13 ragge Exp $ */ +/* $NetBSD: trap.h,v 1.13 1996/04/08 18:35:52 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -67,7 +67,7 @@ /* Trap's coming from user mode */ #define T_USER 0x100 -#ifndef ASSEMBLER +#ifndef _LOCORE struct trapframe { unsigned fp; /* Stack frame pointer */ unsigned ap; /* Argument pointer on user stack */ @@ -103,13 +103,13 @@ struct ivec_dsp { char pushlarg; /* $? */ char nop; /* nop, for foolish gcc */ char calls[3]; /* calls $1,? */ - void (*hoppaddr)(); /* jump for calls */ + void (*hoppaddr) __P((int)); /* jump for calls */ char popr; /* popr $0x3f */ char poprarg; char rei; /* rei */ char pad; /* sizeof(struct ivec_dsp) == 16 */ }; -#endif /* ASSEMBLER */ +#endif /* _LOCORE */ #endif _VAX_TRAP_H_ diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h index b37de79c8e7..7248b4711a3 100644 --- a/sys/arch/vax/include/types.h +++ b/sys/arch/vax/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.6 1995/12/09 04:41:57 mycroft Exp $ */ +/* $NetBSD: types.h,v 1.9 1996/04/08 18:35:53 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -41,7 +41,6 @@ #include <sys/cdefs.h> #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -#if 0 typedef struct _physadr { int r[1]; } *physadr; @@ -50,7 +49,6 @@ typedef struct _physadr { typedef struct label_t { int val[6]; } label_t; -#endif /* 0 */ #endif typedef unsigned long vm_offset_t; @@ -74,7 +72,4 @@ typedef unsigned long long u_int64_t; typedef int32_t register_t; -#define __BDEVSW_DUMP_OLD_TYPE -#define __FORK_BRAINDAMAGE - #endif /* _MACHTYPES_H_ */ diff --git a/sys/arch/vax/include/uvaxII.h b/sys/arch/vax/include/uvaxII.h index c5376d0ee80..7612b7abb35 100644 --- a/sys/arch/vax/include/uvaxII.h +++ b/sys/arch/vax/include/uvaxII.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvaxII.h,v 1.1 1995/02/23 17:51:45 ragge Exp $ */ +/* $NetBSD: uvaxII.h,v 1.3 1996/04/08 18:35:54 ragge Exp $ */ /*- * Copyright (c) 1986, 1988 The Regents of the University of California. * All rights reserved. @@ -62,8 +62,8 @@ struct uvaxIIcpu { #define UVAXIICEAR_PG 0x00007fff #define UVAXIIDEAR_PG 0x00007fff -u_long uvaxII_gettodr(); -void uvaxII_settodr(); +u_long uvaxII_gettodr __P((int *)); +void uvaxII_settodr __P((time_t)); #endif /* @@ -122,4 +122,13 @@ struct ka630clock { }; #endif +struct sbi_attach_args; + +/* Prototypes */ +void uvaxII_conf __P((void *, void *, void *)); +int uvaxII_clock __P((void)); +void uvaxII_memenable __P((struct sbi_attach_args *, struct device *)); +void uvaxII_memerr __P((void)); +int uvaxII_mchk __P((caddr_t)); +void uvaxII_steal_pages __P((void)); #endif diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h index 8f449eabbd3..36d52b2b10a 100644 --- a/sys/arch/vax/include/vmparam.h +++ b/sys/arch/vax/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.10 1995/12/13 18:53:15 ragge Exp $ */ +/* $NetBSD: vmparam.h,v 1.11 1996/02/02 19:08:43 mycroft Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,7 +39,7 @@ * * @(#)vmparam.h 5.9 (Berkeley) 5/12/91 */ -#ifndef ASSEMBLER +#ifndef _LOCORE #include <vm/vm_param.h> #endif |