bsd 4.4-lite pmax port as ported to NetBSD
This commit is contained in:
parent
9a2b68b329
commit
6b63c739f3
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
* $Id: ansi.h,v 1.3 1994/05/27 08:40:28 glass Exp $
|
||||
* $Id: ansi.h,v 1.4 1994/05/27 09:00:21 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ANSI_H_
|
||||
|
|
|
@ -31,78 +31,9 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: aout_machdep.h,v 1.3 1994/05/27 08:40:35 glass Exp $
|
||||
* $Id: aout_machdep.h,v 1.4 1994/05/27 09:00:56 glass Exp $
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(X) __LDPGSZ
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
#define N_DATADDR(ex) \
|
||||
(N_TXTADDR(ex) + ((ex).a_magic == OMAGIC ? (ex).a_text \
|
||||
: __LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Text segment offset. */
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).a_magic == ZMAGIC ? 0 : sizeof(struct exec))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + ((ex).a_magic != ZMAGIC ? (ex).a_text : \
|
||||
__LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Symbol table offset. */
|
||||
#define N_SYMOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).a_text + (ex).a_data + (ex).a_trsize + \
|
||||
(ex).a_drsize)
|
||||
|
||||
/* String table offset. */
|
||||
#define N_STROFF(ex) (N_SYMOFF(ex) + (ex).a_syms)
|
||||
|
||||
/* Description of the object file header (a.out format). */
|
||||
struct exec {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
u_short a_mid; /* machine ID */
|
||||
u_short a_magic; /* magic number */
|
||||
#else
|
||||
u_short a_magic; /* magic number */
|
||||
u_short a_mid; /* machine ID */
|
||||
#endif
|
||||
|
||||
u_long a_text; /* text segment size */
|
||||
u_long a_data; /* initialized data size */
|
||||
u_long a_bss; /* uninitialized data size */
|
||||
u_long a_syms; /* symbol table size */
|
||||
u_long a_entry; /* entry point */
|
||||
u_long a_trsize; /* text relocation size */
|
||||
u_long a_drsize; /* data relocation size */
|
||||
};
|
||||
|
||||
#define a_machtype a_mid /* SUN compatibility */
|
||||
|
||||
#define MID_ZERO 0 /* unknown - implementation dependent */
|
||||
#define MID_SUN010 1 /* sun 68010/68020 binary */
|
||||
#define MID_SUN020 2 /* sun 68020-only binary */
|
||||
#define MID_SUN_SPARC 3 /* sparc binary */
|
||||
#define MID_386 100 /* Intel 80386 binary */
|
||||
#define MID_29K 101 /* AMD 29000 binary */
|
||||
#define MID_MIPSI 151 /* MIPS R2000/R3000 binary */
|
||||
#define MID_MIPSII 152 /* MIPS R4000 binary */
|
||||
#define MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||
#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
||||
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
#include <machine/reloc.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machAsmDefs.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: asm.h,v 1.2 1994/05/27 08:40:41 glass Exp $
|
||||
* $Id: asm.h,v 1.3 1994/05/27 09:01:19 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsmDefs.h,
|
||||
* v 1.2 89/08/15 18:28:24 rab Exp SPRITE (DECWRL)
|
||||
* $Id: asm.h,v 1.2 1994/05/27 08:40:41 glass Exp $
|
||||
* $Id: asm.h,v 1.3 1994/05/27 09:01:19 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHASMDEFS
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cpu.h 8.4 (Berkeley) 1/4/94
|
||||
* $Id: cpu.h,v 1.5 1994/05/27 08:40:30 glass Exp $
|
||||
* $Id: cpu.h,v 1.6 1994/05/27 09:00:32 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CPU_H_
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machConst.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: cpuregs.h,v 1.2 1994/05/27 08:40:42 glass Exp $
|
||||
* $Id: cpuregs.h,v 1.3 1994/05/27 09:01:23 glass Exp $
|
||||
*
|
||||
* machConst.h --
|
||||
*
|
||||
|
@ -54,7 +54,7 @@
|
|||
* v 1.2 89/08/15 18:28:21 rab Exp SPRITE (DECWRL)
|
||||
* from: Header: /sprite/src/kernel/vm/ds3100.md/RCS/vmPmaxConst.h,
|
||||
* v 9.1 89/09/18 17:33:00 shirriff Exp SPRITE (DECWRL)
|
||||
* $Id: cpuregs.h,v 1.2 1994/05/27 08:40:42 glass Exp $
|
||||
* $Id: cpuregs.h,v 1.3 1994/05/27 09:01:23 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHCONST
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
* 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 Adam Glass.
|
||||
* 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 Adam Glass ``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 Adam Glass 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.
|
||||
*
|
||||
* $Id: ecoff.h,v 1.1 1994/05/27 09:00:43 glass Exp $
|
||||
*/
|
||||
|
||||
#define ECOFF_PAD
|
||||
|
||||
#define ECOFF_MACHDEP \
|
||||
u_long ea_gprmask; \
|
||||
u_long ea_cprmask[4]; \
|
||||
u_long ea_gp_value
|
||||
|
||||
#define ECOFF_MAGIC_MIPSEL 0x0162
|
||||
#define ECOFF_BADMAG(ex) (ex->ef_magic != ECOFF_MAGIC_MIPSEL)
|
||||
|
||||
#define ECOFF_TXTOFF_ROUND(eap) \
|
||||
(eap->ea_vstamp < 23 ? 7 : 15)
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
* 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 Adam Glass.
|
||||
* 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 Adam Glass ``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 Adam Glass 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.
|
||||
*
|
||||
* $Id: ecoff_machdep.h,v 1.1 1994/05/27 09:00:43 glass Exp $
|
||||
*/
|
||||
|
||||
#define ECOFF_PAD
|
||||
|
||||
#define ECOFF_MACHDEP \
|
||||
u_long ea_gprmask; \
|
||||
u_long ea_cprmask[4]; \
|
||||
u_long ea_gp_value
|
||||
|
||||
#define ECOFF_MAGIC_MIPSEL 0x0162
|
||||
#define ECOFF_BADMAG(ex) (ex->ef_magic != ECOFF_MAGIC_MIPSEL)
|
||||
|
||||
#define ECOFF_TXTOFF_ROUND(eap) \
|
||||
(eap->ea_vstamp < 23 ? 7 : 15)
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)endian.h 8.1 (Berkeley) 6/11/93
|
||||
* $Id: endian.h,v 1.2 1994/05/27 08:40:34 glass Exp $
|
||||
* $Id: endian.h,v 1.3 1994/05/27 09:00:49 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ENDIAN_H_
|
||||
|
|
|
@ -31,78 +31,9 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: exec.h,v 1.3 1994/05/27 08:40:35 glass Exp $
|
||||
* $Id: exec.h,v 1.4 1994/05/27 09:00:56 glass Exp $
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(X) __LDPGSZ
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
#define N_DATADDR(ex) \
|
||||
(N_TXTADDR(ex) + ((ex).a_magic == OMAGIC ? (ex).a_text \
|
||||
: __LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Text segment offset. */
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).a_magic == ZMAGIC ? 0 : sizeof(struct exec))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + ((ex).a_magic != ZMAGIC ? (ex).a_text : \
|
||||
__LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Symbol table offset. */
|
||||
#define N_SYMOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).a_text + (ex).a_data + (ex).a_trsize + \
|
||||
(ex).a_drsize)
|
||||
|
||||
/* String table offset. */
|
||||
#define N_STROFF(ex) (N_SYMOFF(ex) + (ex).a_syms)
|
||||
|
||||
/* Description of the object file header (a.out format). */
|
||||
struct exec {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
u_short a_mid; /* machine ID */
|
||||
u_short a_magic; /* magic number */
|
||||
#else
|
||||
u_short a_magic; /* magic number */
|
||||
u_short a_mid; /* machine ID */
|
||||
#endif
|
||||
|
||||
u_long a_text; /* text segment size */
|
||||
u_long a_data; /* initialized data size */
|
||||
u_long a_bss; /* uninitialized data size */
|
||||
u_long a_syms; /* symbol table size */
|
||||
u_long a_entry; /* entry point */
|
||||
u_long a_trsize; /* text relocation size */
|
||||
u_long a_drsize; /* data relocation size */
|
||||
};
|
||||
|
||||
#define a_machtype a_mid /* SUN compatibility */
|
||||
|
||||
#define MID_ZERO 0 /* unknown - implementation dependent */
|
||||
#define MID_SUN010 1 /* sun 68010/68020 binary */
|
||||
#define MID_SUN020 2 /* sun 68020-only binary */
|
||||
#define MID_SUN_SPARC 3 /* sparc binary */
|
||||
#define MID_386 100 /* Intel 80386 binary */
|
||||
#define MID_29K 101 /* AMD 29000 binary */
|
||||
#define MID_MIPSI 151 /* MIPS R2000/R3000 binary */
|
||||
#define MID_MIPSII 152 /* MIPS R4000 binary */
|
||||
#define MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||
#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
||||
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
#include <machine/reloc.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)float.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: float.h,v 1.2 1994/05/27 08:40:36 glass Exp $
|
||||
* $Id: float.h,v 1.3 1994/05/27 09:01:04 glass Exp $
|
||||
*/
|
||||
|
||||
#define FLT_RADIX 2 /* b */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kdbparam.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: kdbparam.h,v 1.2 1994/05/27 08:40:38 glass Exp $
|
||||
* $Id: kdbparam.h,v 1.3 1994/05/27 09:01:10 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
* $Id: limits.h,v 1.3 1994/05/27 08:40:39 glass Exp $
|
||||
* $Id: limits.h,v 1.4 1994/05/27 09:01:15 glass Exp $
|
||||
*/
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: pte.h 1.11 89/09/03
|
||||
*
|
||||
* from: @(#)pte.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: mips1_pte.h,v 1.2 1994/05/27 08:41:01 glass Exp $
|
||||
* $Id: mips1_pte.h,v 1.3 1994/05/27 09:01:59 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)mips_opcode.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: mips_opcode.h,v 1.2 1994/05/27 08:40:44 glass Exp $
|
||||
* $Id: mips_opcode.h,v 1.3 1994/05/27 09:01:30 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: pcb.h 1.13 89/04/23
|
||||
*
|
||||
* from: @(#)pcb.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: pcb.h,v 1.2 1994/05/27 08:40:48 glass Exp $
|
||||
* $Id: pcb.h,v 1.3 1994/05/27 09:01:37 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: pmap.h,v 1.3 1994/05/27 08:40:50 glass Exp $
|
||||
* $Id: pmap.h,v 1.4 1994/05/27 09:01:41 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _PMAP_MACHINE_
|
||||
|
@ -96,8 +96,9 @@ typedef struct pmap {
|
|||
#ifdef KERNEL
|
||||
extern char *pmap_attributes; /* reference and modify bits */
|
||||
extern struct pmap kernel_pmap_store;
|
||||
#define kernel_pmap (&kernel_pmap_store)
|
||||
extern pmap_t kernel_pmap;
|
||||
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
|
||||
#define pmap_kernel() kernel_pmap
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _PMAP_MACHINE_ */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)proc.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: proc.h,v 1.2 1994/05/27 08:40:53 glass Exp $
|
||||
* $Id: proc.h,v 1.3 1994/05/27 09:01:47 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -50,4 +50,3 @@ struct mdproc {
|
|||
|
||||
/* md_flags */
|
||||
#define MDP_FPUSED 0x0001 /* floating point coprocessor used */
|
||||
#define MDP_ULTRIX 0x0002 /* ULTRIX process (ULTRIXCOMPAT) */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)profile.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: profile.h,v 1.2 1994/05/27 08:40:57 glass Exp $
|
||||
* $Id: profile.h,v 1.3 1994/05/27 09:01:50 glass Exp $
|
||||
*/
|
||||
|
||||
#define _MCOUNT_DECL static void __mcount
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)psl.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: psl.h,v 1.2 1994/05/27 08:41:00 glass Exp $
|
||||
* $Id: psl.h,v 1.3 1994/05/27 09:01:53 glass Exp $
|
||||
*/
|
||||
|
||||
#include <machine/machConst.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ptrace.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: ptrace.h,v 1.2 1994/05/27 08:41:03 glass Exp $
|
||||
* $Id: ptrace.h,v 1.3 1994/05/27 09:02:07 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: reg.h 1.1 90/07/09
|
||||
*
|
||||
* from: @(#)reg.h 8.2 (Berkeley) 1/11/94
|
||||
* $Id: reg.h,v 1.2 1994/05/27 08:41:05 glass Exp $
|
||||
* $Id: reg.h,v 1.3 1994/05/27 09:02:12 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)regdef.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: regdef.h,v 1.2 1994/05/27 08:41:06 glass Exp $
|
||||
* $Id: regdef.h,v 1.3 1994/05/27 09:02:16 glass Exp $
|
||||
*/
|
||||
|
||||
#define zero $0 /* always zero */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)reloc.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: reloc.h,v 1.2 1994/05/27 08:41:09 glass Exp $
|
||||
* $Id: reloc.h,v 1.3 1994/05/27 09:02:19 glass Exp $
|
||||
*
|
||||
* from: Header: reloc.h,v 1.6 92/06/20 09:59:37 torek Exp
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@ enum reloc_type {
|
|||
* The resulting value is then to be stuffed into the appropriate bits
|
||||
* in the object (the low 16, or the low 26 bits).
|
||||
*/
|
||||
struct reloc_info_mips {
|
||||
struct reloc_info_pmax {
|
||||
u_long r_address; /* relocation addr (offset in segment) */
|
||||
u_int r_index:24, /* segment (r_extern==0) or symbol index */
|
||||
r_extern:1, /* if set, r_index is symbol index */
|
||||
|
@ -69,3 +69,5 @@ struct reloc_info_mips {
|
|||
enum reloc_type r_type:5; /* relocation type, from above */
|
||||
long r_addend; /* value to add to symbol value */
|
||||
};
|
||||
|
||||
#define relocation_info reloc_info_pmax
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)signal.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: signal.h,v 1.2 1994/05/27 08:41:11 glass Exp $
|
||||
* $Id: signal.h,v 1.3 1994/05/27 09:02:22 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)stdarg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: stdarg.h,v 1.2 1994/05/27 08:41:12 glass Exp $
|
||||
* $Id: stdarg.h,v 1.3 1994/05/27 09:02:26 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _STDARG_H_
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: trap.h 1.1 90/07/09
|
||||
*
|
||||
* from: @(#)trap.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: trap.h,v 1.2 1994/05/27 08:41:13 glass Exp $
|
||||
* $Id: trap.h,v 1.3 1994/05/27 09:02:30 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
* $Id: types.h,v 1.3 1994/05/27 08:41:16 glass Exp $
|
||||
* $Id: types.h,v 1.4 1994/05/27 09:02:34 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHTYPES_H_
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)varargs.h 8.2 (Berkeley) 3/22/94
|
||||
* $Id: varargs.h,v 1.2 1994/05/27 08:41:18 glass Exp $
|
||||
* $Id: varargs.h,v 1.3 1994/05/27 09:02:36 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _VARARGS_H_
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: vmparam.h 1.16 91/01/18
|
||||
*
|
||||
* from: @(#)vmparam.h 8.2 (Berkeley) 4/22/94
|
||||
* $Id: vmparam.h,v 1.2 1994/05/27 08:41:20 glass Exp $
|
||||
* $Id: vmparam.h,v 1.3 1994/05/27 09:02:39 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fp.s 8.1 (Berkeley) 6/10/93
|
||||
* $Id: fp.S,v 1.2 1994/05/27 08:41:47 glass Exp $
|
||||
* $Id: fp.S,v 1.3 1994/05/27 09:03:12 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id: genassym.c,v 1.3 1994/05/27 08:41:50 glass Exp $
|
||||
* $Id: genassym.c,v 1.4 1994/05/27 09:03:15 glass Exp $
|
||||
*/
|
||||
|
||||
#define KERNEL
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
* v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL)
|
||||
*
|
||||
* from: @(#)locore.s 8.5 (Berkeley) 1/4/94
|
||||
* $Id: locore.S,v 1.2 1994/05/27 08:42:06 glass Exp $
|
||||
* $Id: locore.S,v 1.3 1994/05/27 09:03:36 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3108,7 +3108,7 @@ END(cpu_getregs)
|
|||
* XXX These aren't used yet.
|
||||
*/
|
||||
.data
|
||||
.globl intrcnt, eintrcnt, intrnames, eintrnames
|
||||
.globl intrcnt eintrcnt intrnames eintrnames
|
||||
intrnames:
|
||||
.asciiz "spur"
|
||||
.asciiz "hil"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
* v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL)
|
||||
*
|
||||
* from: @(#)locore.s 8.5 (Berkeley) 1/4/94
|
||||
* $Id: locore_r2000.S,v 1.2 1994/05/27 08:42:06 glass Exp $
|
||||
* $Id: locore_r2000.S,v 1.3 1994/05/27 09:03:36 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3108,7 +3108,7 @@ END(cpu_getregs)
|
|||
* XXX These aren't used yet.
|
||||
*/
|
||||
.data
|
||||
.globl intrcnt, eintrcnt, intrnames, eintrnames
|
||||
.globl intrcnt eintrcnt intrnames eintrnames
|
||||
intrnames:
|
||||
.asciiz "spur"
|
||||
.asciiz "hil"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
* v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL)
|
||||
*
|
||||
* from: @(#)locore.s 8.5 (Berkeley) 1/4/94
|
||||
* $Id: locore_r4000.S,v 1.2 1994/05/27 08:42:06 glass Exp $
|
||||
* $Id: locore_r4000.S,v 1.3 1994/05/27 09:03:36 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3108,7 +3108,7 @@ END(cpu_getregs)
|
|||
* XXX These aren't used yet.
|
||||
*/
|
||||
.data
|
||||
.globl intrcnt, eintrcnt, intrnames, eintrnames
|
||||
.globl intrcnt eintrcnt intrnames eintrnames
|
||||
intrnames:
|
||||
.asciiz "spur"
|
||||
.asciiz "hil"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: mem.c 1.14 90/10/12
|
||||
*
|
||||
* from: @(#)mem.c 8.2 (Berkeley) 3/28/94
|
||||
* $Id: mem.c,v 1.3 1994/05/27 08:42:13 glass Exp $
|
||||
* $Id: mem.c,v 1.4 1994/05/27 09:03:47 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 8.4 (Berkeley) 1/26/94
|
||||
* $Id: pmap.c,v 1.4 1994/05/27 08:42:15 glass Exp $
|
||||
* $Id: pmap.c,v 1.5 1994/05/27 09:03:51 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -145,6 +145,7 @@ int pmapdebug;
|
|||
#endif /* DEBUG */
|
||||
|
||||
struct pmap kernel_pmap_store;
|
||||
pmap_t kernel_pmap;
|
||||
|
||||
vm_offset_t avail_start; /* PA of first available physical page */
|
||||
vm_offset_t avail_end; /* PA of last available physical page */
|
||||
|
@ -215,6 +216,7 @@ pmap_bootstrap(firstaddr)
|
|||
/* XXX need to decide how to set cnt.v_page_size */
|
||||
pmaxpagesperpage = 1;
|
||||
|
||||
kernel_pmap = &kernel_pmap_store;
|
||||
simple_lock_init(&kernel_pmap_store.pm_lock);
|
||||
kernel_pmap_store.pm_count = 1;
|
||||
}
|
||||
|
@ -331,6 +333,7 @@ pmap_pinit(pmap)
|
|||
} else {
|
||||
register struct segtab *stp;
|
||||
vm_page_t mem;
|
||||
void pmap_zero_page();
|
||||
|
||||
mem = vm_page_alloc1();
|
||||
pmap_zero_page(VM_PAGE_TO_PHYS(mem));
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
* Copyright (c) 1993 Jan-Simon Pendry
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Jan-Simon Pendry.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* From:
|
||||
* Id: procfs_i386.c,v 4.1 1993/12/17 10:47:45 jsp Rel
|
||||
*
|
||||
* $Id: process_machdep.c,v 1.1 1994/05/27 09:04:03 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file may seem a bit stylized, but that so that it's easier to port.
|
||||
* Functions to be implemented here are:
|
||||
*
|
||||
* process_read_regs(proc, regs)
|
||||
* Get the current user-visible register set from the process
|
||||
* and copy it into the regs structure (<machine/reg.h>).
|
||||
* The process is stopped at the time read_regs is called.
|
||||
*
|
||||
* process_write_regs(proc, regs)
|
||||
* Update the current register set from the passed in regs
|
||||
* structure. Take care to avoid clobbering special CPU
|
||||
* registers or privileged bits in the PSL.
|
||||
* The process is stopped at the time write_regs is called.
|
||||
*
|
||||
* process_sstep(proc)
|
||||
* Arrange for the process to trap after executing a single instruction.
|
||||
*
|
||||
* process_fix_sstep(proc)
|
||||
* Cleanup process state after executing a single-step instruction.
|
||||
*
|
||||
* process_set_pc(proc)
|
||||
* Set the process's program counter.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
int
|
||||
process_read_regs(p, regs)
|
||||
struct proc *p;
|
||||
struct reg *regs;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(p, regs)
|
||||
struct proc *p;
|
||||
struct reg *regs;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
process_sstep(p, sstep)
|
||||
struct proc *p;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
process_fix_sstep(p)
|
||||
struct proc *p;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
process_set_pc(p, addr)
|
||||
struct proc *p;
|
||||
u_int addr;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sys_machdep.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: sys_machdep.c,v 1.3 1994/05/27 08:42:19 glass Exp $
|
||||
* $Id: sys_machdep.c,v 1.4 1994/05/27 09:04:12 glass Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -104,3 +104,12 @@ vdoualarm(arg)
|
|||
nvualarm--;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sysarch(p, uap, retval)
|
||||
struct proc *p;
|
||||
void *uap;
|
||||
int *retval;
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: trap.c 1.32 91/04/06
|
||||
*
|
||||
* from: @(#)trap.c 8.5 (Berkeley) 1/11/94
|
||||
* $Id: trap.c,v 1.3 1994/05/27 08:42:21 glass Exp $
|
||||
* $Id: trap.c,v 1.4 1994/05/27 09:04:15 glass Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -398,7 +398,7 @@ trap(statusReg, causeReg, vadr, pc, args)
|
|||
int rval[2];
|
||||
struct sysent *systab;
|
||||
extern int nsysent;
|
||||
#ifdef ULTRIXCOMPAT
|
||||
#ifdef COMPAT_ULTRIX
|
||||
extern struct sysent ultrixsysent[];
|
||||
extern int ultrixnsysent;
|
||||
#endif
|
||||
|
@ -409,14 +409,18 @@ trap(statusReg, causeReg, vadr, pc, args)
|
|||
locr0[PC] = MachEmulateBranch(locr0, pc, 0, 0);
|
||||
else
|
||||
locr0[PC] += 4;
|
||||
systab = sysent;
|
||||
numsys = nsysent;
|
||||
#ifdef ULTRIXCOMPAT
|
||||
if (p->p_md.md_flags & MDP_ULTRIX) {
|
||||
switch (p->p_emul) {
|
||||
case EMUL_NETBSD:
|
||||
systab = sysent;
|
||||
numsys = nsysent;
|
||||
break;
|
||||
#ifdef COMPAT_ULTRIX
|
||||
case EMUL_ULTRIX:
|
||||
systab = ultrixsysent;
|
||||
numsys = ultrixnsysent;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
code = locr0[V0];
|
||||
switch (code) {
|
||||
case SYS_syscall:
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* from: Utah Hdr: vm_machdep.c 1.21 91/04/06
|
||||
*
|
||||
* from: @(#)vm_machdep.c 8.3 (Berkeley) 1/4/94
|
||||
* $Id: vm_machdep.c,v 1.3 1994/05/27 08:42:26 glass Exp $
|
||||
* $Id: vm_machdep.c,v 1.4 1994/05/27 09:04:32 glass Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -73,7 +73,7 @@ cpu_fork(p1, p2)
|
|||
extern struct proc *machFPCurProcPtr;
|
||||
|
||||
p2->p_md.md_regs = up->u_pcb.pcb_regs;
|
||||
p2->p_md.md_flags = p1->p_md.md_flags & (MDP_FPUSED | MDP_ULTRIX);
|
||||
p2->p_md.md_flags = p1->p_md.md_flags & MDP_FPUSED;
|
||||
|
||||
/*
|
||||
* Cache the PTEs for the user area in the machine dependent
|
||||
|
@ -153,7 +153,7 @@ cpu_swapin(p)
|
|||
* pcb and stack and never returns. We block memory allocation
|
||||
* until switch_exit has made things safe again.
|
||||
*/
|
||||
cpu_exit(p)
|
||||
void cpu_exit(p)
|
||||
struct proc *p;
|
||||
{
|
||||
extern struct proc *machFPCurProcPtr;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# from: @(#)Makefile 8.1 (Berkeley) 6/16/93
|
||||
# $Id: Makefile,v 1.2 1994/05/27 08:39:00 glass Exp $
|
||||
# $Id: Makefile,v 1.3 1994/05/27 08:57:32 glass Exp $
|
||||
|
||||
# Makefile for pmax links, tags file
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
#
|
||||
# GLUTTON - Adam's test DS3100
|
||||
#
|
||||
# from: @(#)GENERIC.pmax 8.1 (Berkeley) 6/29/93
|
||||
# $Id: ECOFFTEST,v 1.1 1994/05/27 08:57:38 glass Exp $
|
||||
#
|
||||
machine pmax
|
||||
|
||||
cpu "DS3100"
|
||||
ident GENERIC
|
||||
|
||||
# Need to set locally
|
||||
timezone 8 dst
|
||||
maxusers 5
|
||||
maxfdescs 2048
|
||||
|
||||
# Standard system options
|
||||
options SWAPPAGER # swap pager (anonymous and swap space)
|
||||
options VNODEPAGER # vnode pager (mapped files)
|
||||
options DEVPAGER # device pager (mapped devices)
|
||||
options DIAGNOSTIC # extra kernel debugging checks
|
||||
options DEBUG # extra kernel debugging support
|
||||
options "COMPAT_43" # compatibility with 4.3BSD binaries
|
||||
options KTRACE # system call tracing support
|
||||
options "NKMEMCLUSTERS=1024" # 4K pages in kernel malloc pool
|
||||
options COMPAT_ULTRIX
|
||||
#options KGDB # support for kernel gdb
|
||||
#options "KGDBRATE=19200" # kernel gdb port rate (default 9600)
|
||||
#options "KGDBDEV=15*256+0" # device for kernel gdb
|
||||
|
||||
# Filesystem options
|
||||
options FIFO # POSIX fifo support (in all filesystems)
|
||||
options FFS,QUOTA # fast filesystem with user and group quotas
|
||||
options MFS # memory-based filesystem
|
||||
options NFSCLIENT # Sun NFS-compatible filesystem (client)
|
||||
options NFSSERVER # Sun NFS-compatible filesystem (server)
|
||||
options LOFS # Loop-back filesystem
|
||||
options KERNFS # kernel data-structure filesystem
|
||||
#options FDESC # user file descriptor filesystem
|
||||
#options UMAPFS # uid/gid remapping filesystem
|
||||
#options NULLFS # null layer filesystem
|
||||
#options LFS # Log-based filesystem (still experimental)
|
||||
#options PORTAL # portal filesystem (still experimental)
|
||||
|
||||
# Networking options
|
||||
options INET # Internet protocols
|
||||
options "TCP_COMPAT_42" # compatibility with 4.2BSD TCP/IP
|
||||
options GATEWAY # IP packet forwarding
|
||||
#options MULTICAST # Multicast support
|
||||
#options MROUTING # Multicast routing support
|
||||
#options ISO # OSI networking
|
||||
#options TPIP
|
||||
#options EON
|
||||
|
||||
|
||||
config netbsd swap generic
|
||||
#config netbsd root on rz0a swap on rz0b dumps on rz0b
|
||||
|
||||
controller dc0 at nexus0 csr ?
|
||||
controller pm0 at nexus0 csr ?
|
||||
controller le0 at nexus0 csr ?
|
||||
master sii0 at nexus0 csr ?
|
||||
disk rz0 at sii0 drive 0 slave 0
|
||||
disk rz1 at sii0 drive 1 slave 0
|
||||
disk rz2 at sii0 drive 2 slave 0
|
||||
disk rz3 at sii0 drive 3 slave 0
|
||||
disk rz4 at sii0 drive 4 slave 0
|
||||
tape tz0 at sii0 drive 5 slave 0
|
||||
tape tz1 at sii0 drive 6 slave 0
|
||||
|
||||
pseudo-device sl 4 # serial-line IP ports
|
||||
pseudo-device pty 20 # pseudo ptys
|
||||
pseudo-device bpfilter 5 # packet filter ports
|
||||
pseudo-device loop
|
||||
pseudo-device ether
|
|
@ -2,10 +2,11 @@
|
|||
# GENERIC DECstation (3100 or 5000/xxx)
|
||||
#
|
||||
# from: @(#)GENERIC.pmax 8.1 (Berkeley) 6/29/93
|
||||
# $Id: GENERIC.pmax,v 1.1 1994/05/27 08:39:05 glass Exp $
|
||||
# $Id: GENERIC.pmax,v 1.2 1994/05/27 08:57:42 glass Exp $
|
||||
#
|
||||
machine pmax
|
||||
|
||||
cpu "DS3100"
|
||||
cpu "DS5000"
|
||||
ident GENERIC
|
||||
|
||||
|
@ -30,10 +31,11 @@ options "NKMEMCLUSTERS=1024" # 4K pages in kernel malloc pool
|
|||
options FIFO # POSIX fifo support (in all filesystems)
|
||||
options FFS,QUOTA # fast filesystem with user and group quotas
|
||||
options MFS # memory-based filesystem
|
||||
options NFS # Sun NFS-compatible filesystem
|
||||
options NFSCLIENT # Sun NFS-compatible filesystem (client)
|
||||
options NFSSERVER # Sun NFS-compatible filesystem (server)
|
||||
options LOFS # Loop-back filesystem
|
||||
options KERNFS # kernel data-structure filesystem
|
||||
options FDESC # user file descriptor filesystem
|
||||
#options FDESC # user file descriptor filesystem
|
||||
#options UMAPFS # uid/gid remapping filesystem
|
||||
#options NULLFS # null layer filesystem
|
||||
#options LFS # Log-based filesystem (still experimental)
|
||||
|
@ -50,8 +52,8 @@ options GATEWAY # IP packet forwarding
|
|||
#options EON
|
||||
|
||||
|
||||
config vmunix swap generic
|
||||
#config vmunix root on rz0a swap on rz0b dumps on rz0b
|
||||
config netbsd swap generic
|
||||
#config netbsd root on rz0a swap on rz0b dumps on rz0b
|
||||
|
||||
controller dtop0 at nexus0 csr ?
|
||||
controller dc0 at nexus0 csr ?
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
#
|
||||
# GLUTTON - Adam's test DS3100
|
||||
#
|
||||
# from: @(#)GENERIC.pmax 8.1 (Berkeley) 6/29/93
|
||||
# $Id: GLUTTON,v 1.1 1994/05/27 08:57:44 glass Exp $
|
||||
#
|
||||
machine pmax
|
||||
|
||||
cpu "DS3100"
|
||||
ident GENERIC
|
||||
|
||||
# Need to set locally
|
||||
timezone 8 dst
|
||||
maxusers 5
|
||||
|
||||
# Standard system options
|
||||
options SWAPPAGER # swap pager (anonymous and swap space)
|
||||
options VNODEPAGER # vnode pager (mapped files)
|
||||
options DEVPAGER # device pager (mapped devices)
|
||||
options DIAGNOSTIC # extra kernel debugging checks
|
||||
options DEBUG # extra kernel debugging support
|
||||
options "COMPAT_43" # compatibility with 4.3BSD binaries
|
||||
options KTRACE # system call tracing support
|
||||
options "NKMEMCLUSTERS=1024" # 4K pages in kernel malloc pool
|
||||
#options KGDB # support for kernel gdb
|
||||
#options "KGDBRATE=19200" # kernel gdb port rate (default 9600)
|
||||
#options "KGDBDEV=15*256+0" # device for kernel gdb
|
||||
|
||||
# Filesystem options
|
||||
options FIFO # POSIX fifo support (in all filesystems)
|
||||
options FFS,QUOTA # fast filesystem with user and group quotas
|
||||
options MFS # memory-based filesystem
|
||||
options NFSCLIENT # Sun NFS-compatible filesystem (client)
|
||||
options NFSSERVER # Sun NFS-compatible filesystem (server)
|
||||
options LOFS # Loop-back filesystem
|
||||
options KERNFS # kernel data-structure filesystem
|
||||
#options FDESC # user file descriptor filesystem
|
||||
#options UMAPFS # uid/gid remapping filesystem
|
||||
#options NULLFS # null layer filesystem
|
||||
#options LFS # Log-based filesystem (still experimental)
|
||||
#options PORTAL # portal filesystem (still experimental)
|
||||
|
||||
# Networking options
|
||||
options INET # Internet protocols
|
||||
options "TCP_COMPAT_42" # compatibility with 4.2BSD TCP/IP
|
||||
options GATEWAY # IP packet forwarding
|
||||
#options MULTICAST # Multicast support
|
||||
#options MROUTING # Multicast routing support
|
||||
#options ISO # OSI networking
|
||||
#options TPIP
|
||||
#options EON
|
||||
|
||||
|
||||
config netbsd swap generic
|
||||
#config netbsd root on rz0a swap on rz0b dumps on rz0b
|
||||
|
||||
controller dc0 at nexus0 csr ?
|
||||
controller pm0 at nexus0 csr ?
|
||||
controller le0 at nexus0 csr ?
|
||||
master sii0 at nexus0 csr ?
|
||||
disk rz0 at sii0 drive 0 slave 0
|
||||
disk rz1 at sii0 drive 1 slave 0
|
||||
disk rz2 at sii0 drive 2 slave 0
|
||||
disk rz3 at sii0 drive 3 slave 0
|
||||
disk rz4 at sii0 drive 4 slave 0
|
||||
tape tz0 at sii0 drive 5 slave 0
|
||||
tape tz1 at sii0 drive 6 slave 0
|
||||
|
||||
pseudo-device sl 4 # serial-line IP ports
|
||||
pseudo-device pty 20 # pseudo ptys
|
||||
pseudo-device bpfilter 5 # packet filter ports
|
||||
pseudo-device loop
|
||||
pseudo-device ether
|
|
@ -1,16 +1,16 @@
|
|||
# from: @(#)Makefile.pmax 8.2 (Berkeley) 2/16/94
|
||||
# $Id: Makefile.pmax,v 1.4 1994/05/27 08:39:07 glass Exp $
|
||||
# $Id: Makefile.pmax,v 1.5 1994/05/27 08:57:47 glass Exp $
|
||||
#
|
||||
# Makefile for 4.4 BSD
|
||||
#
|
||||
# This makefile is constructed from a machine description:
|
||||
# config machineid
|
||||
# Most changes should be made in the machine description
|
||||
# /sys/conf/``machineid''
|
||||
# /sys/arch/MACHINE/conf/``machineid''
|
||||
# after which you should do
|
||||
# config machineid
|
||||
# Machine generic makefile changes should be made in
|
||||
# /sys/conf/Makefile.``machinetype''
|
||||
# /sys/arch/MACHINE/conf/Makefile.``machinetype''
|
||||
# after which config should be rerun for all machines of that type.
|
||||
#
|
||||
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
|
||||
|
@ -24,18 +24,29 @@
|
|||
# PROF is set to -pg by config if profiling is requested (config -p).
|
||||
AS= as ${DEBUG}
|
||||
CC= gcc ${DEBUG}
|
||||
CPP= cpp
|
||||
CPP= gcpp
|
||||
LD= ld
|
||||
TOUCH= touch -f -c
|
||||
|
||||
# source tree is located via $S relative to the compilation directory
|
||||
S= /sys
|
||||
PMAX= $S/pmax
|
||||
S= ../../../..
|
||||
PMAX= ../..
|
||||
|
||||
INCLUDES= -I. -I$S
|
||||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL
|
||||
CFLAGS= -O ${COPTS}
|
||||
INCLUDES= -I. -I$S/arch -I$S -I$S/sys
|
||||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dpmax -D__NetBSD__
|
||||
CFLAGS= -G 0 -O ${COPTS}
|
||||
|
||||
.if defined(XXX)
|
||||
### find out what to use for libkern
|
||||
.include "$S/lib/libkern/Makefile.inc"
|
||||
.ifndef PROF
|
||||
LIBKERN= ${KERNLIB}
|
||||
.else
|
||||
LIBKERN= ${KERNLIB_PROF}
|
||||
.endif
|
||||
.else
|
||||
LIBKERN = ../libkern.a
|
||||
.endif
|
||||
# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
|
||||
# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
|
||||
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
|
||||
|
@ -49,8 +60,8 @@ DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
|
|||
|
||||
PROFILE_C= ${CC} -p -c ${COPTS} $<
|
||||
|
||||
NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@
|
||||
NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
|
||||
NORMAL_S= ${AS} ${COPTS} $< -o $@
|
||||
NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
|
||||
|
||||
%OBJS
|
||||
|
||||
|
@ -61,18 +72,18 @@ NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
|
|||
# ${SYSTEM_LD_HEAD}
|
||||
# ${SYSTEM_LD} swapxxx.o
|
||||
# ${SYSTEM_LD_TAIL}
|
||||
SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vnode_if.o
|
||||
#SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} libkern.a
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJ} libkern.a
|
||||
SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o $(LIBKERN) #vnode_if.o
|
||||
#SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} $(LIBKERN)
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJ} $(LIBKERN)
|
||||
SYSTEM_LD_HEAD= rm -f $@
|
||||
SYSTEM_LD= -@if [ X${DEBUG} = X-g ]; \
|
||||
then strip=-X; \
|
||||
else strip=-x; \
|
||||
fi; \
|
||||
echo ${LD} $$strip -N -o $@ -e start -Ttext 80030000 \
|
||||
'$${SYSTEM_OBJ}' vers.o libkern.a; \
|
||||
'$${SYSTEM_OBJ}' vers.o $(LIBKERN); \
|
||||
${LD} $$strip -N -o $@ -e start -Ttext 80030000 \
|
||||
${SYSTEM_OBJ} vers.o libkern.a
|
||||
${SYSTEM_OBJ} vers.o $(LIBKERN)
|
||||
#SYSTEM_LD_TAIL= @echo rearranging symbols;\
|
||||
# symorder symbols.sort $@;\
|
||||
#SYSTEM_LD_TAIL= @size $@; chmod 755 $@; \
|
||||
|
@ -83,13 +94,6 @@ SYSTEM_LD_TAIL= chmod 755 $@
|
|||
|
||||
%LOAD
|
||||
|
||||
libkern.a:
|
||||
-@if [ X${PROF} = X ]; \
|
||||
then ln -s $S/libkern/obj/libkern.a libkern.a; \
|
||||
else ln -s $S/libkern/obj/libkern_p.a libkern.a; \
|
||||
fi; \
|
||||
echo ln -s $S/libkern/obj/libkern.a libkern.a
|
||||
|
||||
newvers:
|
||||
sh $S/conf/newvers.sh
|
||||
${CC} $(CFLAGS) -c vers.c
|
||||
|
@ -109,8 +113,7 @@ symbols.sort: ${PMAX}/pmax/symbols.raw
|
|||
|
||||
locore.o: ${PMAX}/pmax/locore.s ${PMAX}/include/machAsmDefs.h \
|
||||
${PMAX}/include/machConst.h ${PMAX}/include/reg.h assym.h
|
||||
${CPP} ${COPTS} ${PARAM} -DLOCORE ${PMAX}/pmax/locore.s | \
|
||||
${AS} -o locore.o
|
||||
${AS} ${COPTS} ${PARAM} -DLOCORE ${PMAX}/pmax/locore.s -o locore.o
|
||||
|
||||
# the following is necessary because autoconf.o depends on #if GENERIC
|
||||
autoconf.o: Makefile
|
||||
|
@ -128,7 +131,7 @@ assym.h: genassym
|
|||
genassym: ${PMAX}/pmax/genassym.c
|
||||
${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${PMAX}/pmax/genassym.c
|
||||
|
||||
depend: assym.h param.c vnode_if.h
|
||||
depend: assym.h param.c #vnode_if.h
|
||||
mkdep ${COPTS} ${CFILES} ioconf.c param.c
|
||||
mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${PMAX}/pmax/genassym.c
|
||||
|
||||
|
@ -153,9 +156,16 @@ param.c: $S/conf/param.c
|
|||
param.o: param.c Makefile
|
||||
${CC} -c ${CFLAGS} ${PARAM} param.c
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
|
||||
sh $S/conf/newvers.sh
|
||||
${CC} ${CFLAGS} -c vers.c
|
||||
|
||||
#vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
# sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
#vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
# sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
|
||||
%RULES
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# $Id: devices.pmax,v 1.2 1994/05/27 08:39:09 glass Exp $
|
||||
# $Id: devices.pmax,v 1.3 1994/05/27 08:57:50 glass Exp $
|
||||
rz 0
|
||||
md 1
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# $Id: devices.pmax.oldconf,v 1.2 1994/05/27 08:39:09 glass Exp $
|
||||
# $Id: devices.pmax.oldconf,v 1.3 1994/05/27 08:57:50 glass Exp $
|
||||
rz 0
|
||||
md 1
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
# $Id: files.pmax,v 1.4 1994/05/27 08:39:10 glass Exp $
|
||||
pmax/pmax/autoconf.c standard
|
||||
pmax/pmax/clock.c standard
|
||||
pmax/pmax/conf.c standard
|
||||
pmax/pmax/cons.c standard
|
||||
pmax/pmax/fp.s standard
|
||||
pmax/pmax/kadb.c optional kadb
|
||||
pmax/pmax/machdep.c standard config-dependent
|
||||
pmax/pmax/mem.c standard
|
||||
pmax/pmax/pmap.c standard
|
||||
pmax/pmax/procfs_machdep.c optional procfs
|
||||
pmax/pmax/sys_machdep.c standard
|
||||
pmax/pmax/trap.c standard
|
||||
pmax/pmax/vm_machdep.c standard
|
||||
pmax/stand/libsa/callvec.c standard
|
||||
pmax/dev/fb.c standard device-driver
|
||||
pmax/dev/scsi.c standard
|
||||
pmax/dev/asc.c optional asc device-driver
|
||||
pmax/dev/dc.c optional dc device-driver
|
||||
pmax/dev/dtop.c optional dtop device-driver
|
||||
pmax/dev/if_le.c optional le
|
||||
pmax/dev/pm.c optional pm device-driver
|
||||
pmax/dev/cfb.c optional cfb device-driver
|
||||
pmax/dev/mfb.c optional mfb device-driver
|
||||
pmax/dev/rz.c optional rz
|
||||
pmax/dev/scc.c optional scc device-driver
|
||||
pmax/dev/sii.c optional sii device-driver
|
||||
pmax/dev/tz.c optional tz
|
||||
pmax/dev/xcfb.c optional xcfb device-driver
|
||||
pmax/ultrix/ultrix_compat.c optional ultrixcompat
|
||||
pmax/ultrix/ultrix_syscalls.c optional ultrixcompat
|
||||
pmax/ultrix/ultrix_sysent.c optional ultrixcompat
|
||||
netinet/in_cksum.c optional inet
|
||||
netns/ns_cksum.c optional ns
|
||||
dev/cd.c optional cd
|
||||
dev/vn.c optional vn
|
||||
thisisfor_in_proto.c optional hy
|
||||
# $Id: files.pmax,v 1.5 1994/05/27 08:57:52 glass Exp $
|
||||
arch/pmax/pmax/autoconf.c standard
|
||||
arch/pmax/pmax/clock.c standard
|
||||
arch/pmax/pmax/conf.c standard
|
||||
arch/pmax/pmax/cons.c standard
|
||||
arch/pmax/pmax/disksubr.c standard
|
||||
arch/pmax/pmax/fp.s standard
|
||||
arch/pmax/pmax/kadb.c optional kadb
|
||||
arch/pmax/pmax/machdep.c standard config-dependent
|
||||
arch/pmax/pmax/mem.c standard
|
||||
arch/pmax/pmax/pmap.c standard
|
||||
arch/pmax/pmax/process_machdep.c standard
|
||||
#arch/pmax/pmax/procfs_machdep.c optional procfs
|
||||
arch/pmax/pmax/sys_machdep.c standard
|
||||
arch/pmax/pmax/trap.c standard
|
||||
arch/pmax/pmax/vm_machdep.c standard
|
||||
arch/pmax/stand/libsa/callvec.c standard
|
||||
arch/pmax/dev/fb.c standard
|
||||
arch/pmax/dev/scsi.c standard
|
||||
arch/pmax/dev/asc.c optional asc device-driver
|
||||
arch/pmax/dev/dc.c optional dc device-driver
|
||||
arch/pmax/dev/dtop.c optional dtop device-driver
|
||||
arch/pmax/dev/if_le.c optional le device-driver
|
||||
arch/pmax/dev/pm.c optional pm device-driver
|
||||
arch/pmax/dev/cfb.c optional cfb device-driver
|
||||
arch/pmax/dev/mfb.c optional mfb device-driver
|
||||
arch/pmax/dev/rz.c optional rz device-driver
|
||||
arch/pmax/dev/scc.c optional scc device-driver
|
||||
arch/pmax/dev/sii.c optional sii device-driver
|
||||
arch/pmax/dev/tz.c optional tz device-driver
|
||||
arch/pmax/dev/xcfb.c optional xcfb device-driver
|
||||
arch/pmax/ultrix/ultrix_compat.c optional compat_ultrix
|
||||
arch/pmax/ultrix/ultrix_syscalls.c optional compat_ultrix
|
||||
arch/pmax/ultrix/ultrix_sysent.c optional compat_ultrix
|
||||
netinet/in_cksum.c optional inet
|
||||
netns/ns_cksum.c optional ns
|
||||
#dev/cd.c optional cd
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
# $Id: files.pmax.oldconf,v 1.4 1994/05/27 08:39:10 glass Exp $
|
||||
pmax/pmax/autoconf.c standard
|
||||
pmax/pmax/clock.c standard
|
||||
pmax/pmax/conf.c standard
|
||||
pmax/pmax/cons.c standard
|
||||
pmax/pmax/fp.s standard
|
||||
pmax/pmax/kadb.c optional kadb
|
||||
pmax/pmax/machdep.c standard config-dependent
|
||||
pmax/pmax/mem.c standard
|
||||
pmax/pmax/pmap.c standard
|
||||
pmax/pmax/procfs_machdep.c optional procfs
|
||||
pmax/pmax/sys_machdep.c standard
|
||||
pmax/pmax/trap.c standard
|
||||
pmax/pmax/vm_machdep.c standard
|
||||
pmax/stand/libsa/callvec.c standard
|
||||
pmax/dev/fb.c standard device-driver
|
||||
pmax/dev/scsi.c standard
|
||||
pmax/dev/asc.c optional asc device-driver
|
||||
pmax/dev/dc.c optional dc device-driver
|
||||
pmax/dev/dtop.c optional dtop device-driver
|
||||
pmax/dev/if_le.c optional le
|
||||
pmax/dev/pm.c optional pm device-driver
|
||||
pmax/dev/cfb.c optional cfb device-driver
|
||||
pmax/dev/mfb.c optional mfb device-driver
|
||||
pmax/dev/rz.c optional rz
|
||||
pmax/dev/scc.c optional scc device-driver
|
||||
pmax/dev/sii.c optional sii device-driver
|
||||
pmax/dev/tz.c optional tz
|
||||
pmax/dev/xcfb.c optional xcfb device-driver
|
||||
pmax/ultrix/ultrix_compat.c optional ultrixcompat
|
||||
pmax/ultrix/ultrix_syscalls.c optional ultrixcompat
|
||||
pmax/ultrix/ultrix_sysent.c optional ultrixcompat
|
||||
netinet/in_cksum.c optional inet
|
||||
netns/ns_cksum.c optional ns
|
||||
dev/cd.c optional cd
|
||||
dev/vn.c optional vn
|
||||
thisisfor_in_proto.c optional hy
|
||||
# $Id: files.pmax.oldconf,v 1.5 1994/05/27 08:57:52 glass Exp $
|
||||
arch/pmax/pmax/autoconf.c standard
|
||||
arch/pmax/pmax/clock.c standard
|
||||
arch/pmax/pmax/conf.c standard
|
||||
arch/pmax/pmax/cons.c standard
|
||||
arch/pmax/pmax/disksubr.c standard
|
||||
arch/pmax/pmax/fp.s standard
|
||||
arch/pmax/pmax/kadb.c optional kadb
|
||||
arch/pmax/pmax/machdep.c standard config-dependent
|
||||
arch/pmax/pmax/mem.c standard
|
||||
arch/pmax/pmax/pmap.c standard
|
||||
arch/pmax/pmax/process_machdep.c standard
|
||||
#arch/pmax/pmax/procfs_machdep.c optional procfs
|
||||
arch/pmax/pmax/sys_machdep.c standard
|
||||
arch/pmax/pmax/trap.c standard
|
||||
arch/pmax/pmax/vm_machdep.c standard
|
||||
arch/pmax/stand/libsa/callvec.c standard
|
||||
arch/pmax/dev/fb.c standard
|
||||
arch/pmax/dev/scsi.c standard
|
||||
arch/pmax/dev/asc.c optional asc device-driver
|
||||
arch/pmax/dev/dc.c optional dc device-driver
|
||||
arch/pmax/dev/dtop.c optional dtop device-driver
|
||||
arch/pmax/dev/if_le.c optional le device-driver
|
||||
arch/pmax/dev/pm.c optional pm device-driver
|
||||
arch/pmax/dev/cfb.c optional cfb device-driver
|
||||
arch/pmax/dev/mfb.c optional mfb device-driver
|
||||
arch/pmax/dev/rz.c optional rz device-driver
|
||||
arch/pmax/dev/scc.c optional scc device-driver
|
||||
arch/pmax/dev/sii.c optional sii device-driver
|
||||
arch/pmax/dev/tz.c optional tz device-driver
|
||||
arch/pmax/dev/xcfb.c optional xcfb device-driver
|
||||
arch/pmax/ultrix/ultrix_compat.c optional compat_ultrix
|
||||
arch/pmax/ultrix/ultrix_syscalls.c optional compat_ultrix
|
||||
arch/pmax/ultrix/ultrix_sysent.c optional compat_ultrix
|
||||
netinet/in_cksum.c optional inet
|
||||
netns/ns_cksum.c optional ns
|
||||
#dev/cd.c optional cd
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)asc.c 8.2 (Berkeley) 1/4/94
|
||||
* $Id: asc.c,v 1.4 1994/05/27 08:39:14 glass Exp $
|
||||
* $Id: asc.c,v 1.5 1994/05/27 08:58:02 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ascreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: ascreg.h,v 1.3 1994/05/27 08:39:17 glass Exp $
|
||||
* $Id: ascreg.h,v 1.4 1994/05/27 08:58:07 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cfb.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: cfb.c,v 1.2 1994/05/27 08:39:19 glass Exp $
|
||||
* $Id: cfb.c,v 1.3 1994/05/27 08:58:14 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/devGraphics.c,
|
||||
* v 9.2 90/02/13 22:16:24 shirriff Exp SPRITE (DECWRL)";
|
||||
* $Id: cfb.c,v 1.2 1994/05/27 08:39:19 glass Exp $
|
||||
* $Id: cfb.c,v 1.3 1994/05/27 08:58:14 glass Exp $
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cfbreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: cfbreg.h,v 1.3 1994/05/27 08:39:20 glass Exp $
|
||||
* $Id: cfbreg.h,v 1.4 1994/05/27 08:58:19 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dc.c 8.2 (Berkeley) 11/30/93
|
||||
* $Id: dc.c,v 1.3 1994/05/27 08:39:22 glass Exp $
|
||||
* $Id: dc.c,v 1.4 1994/05/27 08:58:30 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -105,7 +105,7 @@ extern void ttrstrt __P((void *));
|
|||
int dcGetc __P((dev_t));
|
||||
int dcparam __P((struct tty *, struct termios *));
|
||||
|
||||
struct tty dc_tty[NDCLINE];
|
||||
struct tty *dc_tty[NDCLINE];
|
||||
int dc_cnt = NDCLINE;
|
||||
void (*dcDivertXInput)(); /* X windows keyboard input routine */
|
||||
void (*dcMouseEvent)(); /* X windows mouse motion event routine */
|
||||
|
@ -193,7 +193,9 @@ dcprobe(cp)
|
|||
|
||||
/* init pseudo DMA structures */
|
||||
pdp = &dcpdma[cp->pmax_unit * 4];
|
||||
tp = &dc_tty[cp->pmax_unit * 4];
|
||||
tp = dc_tty[cp->pmax_unit * 4];
|
||||
if (tp == NULL)
|
||||
tp = dc_tty[cp->pmax_unit * 4] = ttymalloc();
|
||||
for (cntr = 0; cntr < 4; cntr++) {
|
||||
pdp->p_addr = (void *)dcaddr;
|
||||
pdp->p_arg = (int)tp;
|
||||
|
@ -250,7 +252,9 @@ dcopen(dev, flag, mode, p)
|
|||
unit = minor(dev);
|
||||
if (unit >= dc_cnt || dcpdma[unit].p_addr == (void *)0)
|
||||
return (ENXIO);
|
||||
tp = &dc_tty[unit];
|
||||
tp = dc_tty[unit];
|
||||
if (tp == NULL)
|
||||
tp = dc_tty[unit] = ttymalloc();
|
||||
tp->t_oproc = dcstart;
|
||||
tp->t_param = dcparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -299,7 +303,7 @@ dcclose(dev, flag, mode, p)
|
|||
register int unit, bit;
|
||||
|
||||
unit = minor(dev);
|
||||
tp = &dc_tty[unit];
|
||||
tp = dc_tty[unit];
|
||||
bit = 1 << ((unit & 03) + 8);
|
||||
if (dc_brk[unit >> 2] & bit) {
|
||||
dc_brk[unit >> 2] &= ~bit;
|
||||
|
@ -318,7 +322,7 @@ dcread(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &dc_tty[minor(dev)];
|
||||
tp = dc_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -328,7 +332,7 @@ dcwrite(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &dc_tty[minor(dev)];
|
||||
tp = dc_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -345,11 +349,11 @@ dcioctl(dev, cmd, data, flag, p)
|
|||
register int dc = unit >> 2;
|
||||
int error;
|
||||
|
||||
tp = &dc_tty[unit];
|
||||
tp = dc_tty[unit];
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
|
@ -475,7 +479,7 @@ dcintr(unit)
|
|||
if (csr & CSR_RDONE)
|
||||
dcrint(unit);
|
||||
if (csr & CSR_TRDY)
|
||||
dcxint(&dc_tty[unit + ((csr >> 8) & 03)]);
|
||||
dcxint(dc_tty[unit + ((csr >> 8) & 03)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -489,7 +493,7 @@ dcrint(unit)
|
|||
int overrun = 0;
|
||||
|
||||
dcaddr = (dcregs *)dcpdma[unit].p_addr;
|
||||
tp0 = &dc_tty[unit];
|
||||
tp0 = dc_tty[unit];
|
||||
while ((c = dcaddr->dc_rbuf) < 0) { /* char present */
|
||||
cc = c & 0xff;
|
||||
tp = tp0 + ((c >> 8) & 03);
|
||||
|
@ -499,7 +503,7 @@ dcrint(unit)
|
|||
overrun = 1;
|
||||
}
|
||||
/* the keyboard requires special translation */
|
||||
if (tp == &dc_tty[DCKBD_PORT] && cn_tab.cn_screen) {
|
||||
if (tp == dc_tty[DCKBD_PORT] && cn_tab.cn_screen) {
|
||||
#ifdef KADB
|
||||
if (cc == LK_DO) {
|
||||
spl0();
|
||||
|
@ -516,7 +520,7 @@ dcrint(unit)
|
|||
}
|
||||
if ((cc = kbdMapChar(cc)) < 0)
|
||||
return;
|
||||
} else if (tp == &dc_tty[DCMOUSE_PORT] && dcMouseButtons) {
|
||||
} else if (tp == dc_tty[DCMOUSE_PORT] && dcMouseButtons) {
|
||||
register MouseReport *mrp;
|
||||
static MouseReport currentRep;
|
||||
|
||||
|
@ -573,11 +577,14 @@ dcxint(tp)
|
|||
{
|
||||
register struct pdma *dp;
|
||||
register dcregs *dcaddr;
|
||||
int unit = minor(tp->t_dev);
|
||||
|
||||
dp = &dcpdma[minor(tp->t_dev)];
|
||||
dp = &dcpdma[unit];
|
||||
if (dp->p_mem < dp->p_end) {
|
||||
dcaddr = (dcregs *)dp->p_addr;
|
||||
dcaddr->dc_tdr = dc_brk[(tp - dc_tty) >> 2] | *dp->p_mem++;
|
||||
/* dcaddr->dc_tdr = dc_brk[(tp - dc_tty) >> 2] |*/
|
||||
dcaddr->dc_tdr = dc_brk[unit >> 2] |
|
||||
*dp->p_mem++; /* XXX i think i broke this */
|
||||
MachEmptyWriteBuffer();
|
||||
DELAY(10);
|
||||
return;
|
||||
|
@ -595,7 +602,7 @@ dcxint(tp)
|
|||
dcstart(tp);
|
||||
if (tp->t_outq.c_cc == 0 || !(tp->t_state & TS_BUSY)) {
|
||||
dcaddr = (dcregs *)dp->p_addr;
|
||||
dcaddr->dc_tcr &= ~(1 << (minor(tp->t_dev) & 03));
|
||||
dcaddr->dc_tcr &= ~(1 << (unit & 03));
|
||||
MachEmptyWriteBuffer();
|
||||
DELAY(10);
|
||||
}
|
||||
|
@ -625,7 +632,7 @@ dcstart(tp)
|
|||
if (tp->t_outq.c_cc == 0)
|
||||
goto out;
|
||||
/* handle console specially */
|
||||
if (tp == &dc_tty[DCKBD_PORT] && cn_tab.cn_screen) {
|
||||
if (tp == dc_tty[DCKBD_PORT] && cn_tab.cn_screen) {
|
||||
while (tp->t_outq.c_cc > 0) {
|
||||
cc = getc(&tp->t_outq) & 0x7f;
|
||||
cnputc(cc);
|
||||
|
@ -760,7 +767,7 @@ dcmctl(dev, bits, how)
|
|||
}
|
||||
}
|
||||
if ((mbits & DML_DTR) && (dcsoftCAR[unit >> 2] & b))
|
||||
dc_tty[unit].t_state |= TS_CARR_ON;
|
||||
dc_tty[unit]->t_state |= TS_CARR_ON;
|
||||
(void) splx(s);
|
||||
return (mbits);
|
||||
}
|
||||
|
@ -781,7 +788,7 @@ dcscan(arg)
|
|||
s = spltty();
|
||||
/* only channel 2 has modem control (what about line 3?) */
|
||||
dcaddr = (dcregs *)dcpdma[i = 2].p_addr;
|
||||
tp = &dc_tty[i];
|
||||
tp = dc_tty[i];
|
||||
bit = TCR_DTR2;
|
||||
if (dcsoftCAR[i >> 2] & bit)
|
||||
car = 1;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)device.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: device.h,v 1.2 1994/05/27 08:39:24 glass Exp $
|
||||
* $Id: device.h,v 1.3 1994/05/27 08:58:37 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dtop.c 8.2 (Berkeley) 11/30/93
|
||||
* $Id: dtop.c,v 1.3 1994/05/27 08:39:27 glass Exp $
|
||||
* $Id: dtop.c,v 1.4 1994/05/27 08:58:40 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -130,7 +130,7 @@ int dtopstop __P((struct tty *, int));
|
|||
void dtopstart __P((struct tty *));
|
||||
void dtopKBDPutc __P((dev_t, int));
|
||||
|
||||
struct tty dtop_tty[NDTOP];
|
||||
struct tty *dtop_tty[NDTOP];
|
||||
void (*dtopDivertXInput)(); /* X windows keyboard input routine */
|
||||
void (*dtopMouseEvent)(); /* X windows mouse motion event routine */
|
||||
void (*dtopMouseButtons)(); /* X windows mouse buttons event routine */
|
||||
|
@ -167,7 +167,7 @@ struct dtop_softc {
|
|||
} dtop_softc[NDTOP];
|
||||
|
||||
typedef struct dtop_softc *dtop_softc_t;
|
||||
struct tty dtop_tty[NDTOP];
|
||||
struct tty *dtop_tty[NDTOP];
|
||||
|
||||
/*
|
||||
* lk201 keyboard divisions and up/down mode key bitmap.
|
||||
|
@ -235,7 +235,9 @@ dtopopen(dev, flag, mode, p)
|
|||
unit = minor(dev);
|
||||
if (unit >= NDTOP)
|
||||
return (ENXIO);
|
||||
tp = &dtop_tty[unit];
|
||||
tp = dtop_tty[unit];
|
||||
if (tp == NULL)
|
||||
tp = dtop_tty[unit] = ttymalloc();
|
||||
tp->t_oproc = dtopstart;
|
||||
tp->t_param = dtopparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -278,7 +280,7 @@ dtopclose(dev, flag, mode, p)
|
|||
register int unit;
|
||||
|
||||
unit = minor(dev);
|
||||
tp = &dtop_tty[unit];
|
||||
tp = dtop_tty[unit];
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
return (ttyclose(tp));
|
||||
}
|
||||
|
@ -289,7 +291,7 @@ dtopread(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &dtop_tty[minor(dev)];
|
||||
tp = dtop_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -299,7 +301,7 @@ dtopwrite(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &dtop_tty[minor(dev)];
|
||||
tp = dtop_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -315,11 +317,11 @@ dtopioctl(dev, cmd, data, flag, p)
|
|||
register int unit = minor(dev);
|
||||
int error;
|
||||
|
||||
tp = &dtop_tty[unit];
|
||||
tp = dtop_tty[unit];
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
|
@ -404,7 +406,7 @@ dtopstart(tp)
|
|||
if (tp->t_outq.c_cc == 0)
|
||||
goto out;
|
||||
/* handle console specially */
|
||||
if (tp == dtop_tty) {
|
||||
if (tp == dtop_tty[0]) {
|
||||
while (tp->t_outq.c_cc > 0) {
|
||||
cc = getc(&tp->t_outq) & 0x7f;
|
||||
cnputc(cc);
|
||||
|
@ -707,7 +709,7 @@ dtop_keyboard_handler(dev, msg, event, outc)
|
|||
register u_char *ls, *le, *ns, *ne;
|
||||
u_char save[11], retc;
|
||||
int msg_len, c, s;
|
||||
struct tty *tp = &dtop_tty[0];
|
||||
struct tty *tp = dtop_tty[0];
|
||||
|
||||
/*
|
||||
* Fiddle about emulating an lk201 keyboard. The lk501
|
||||
|
@ -829,7 +831,7 @@ dtop_keyboard_repeat(arg)
|
|||
{
|
||||
dtop_device_t dev = (dtop_device_t)arg;
|
||||
register int i, c;
|
||||
struct tty *tp = dtop_tty;
|
||||
struct tty *tp = dtop_tty[0];
|
||||
int s = spltty(), gotone = 0;
|
||||
|
||||
for (i = 0; i < dev->keyboard.last_codes_count; i++) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dtopreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dtopreg.h,v 1.3 1994/05/27 08:39:29 glass Exp $
|
||||
* $Id: dtopreg.h,v 1.4 1994/05/27 08:58:42 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fb.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: fb.c,v 1.3 1994/05/27 08:39:30 glass Exp $
|
||||
* $Id: fb.c,v 1.4 1994/05/27 08:58:45 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -973,7 +973,7 @@ done:
|
|||
void
|
||||
KBDReset(kbddev, putc)
|
||||
dev_t kbddev;
|
||||
void (*putc)();
|
||||
void (*putc) __P((dev_t, int));
|
||||
{
|
||||
register int i;
|
||||
static int inKBDReset;
|
||||
|
@ -992,8 +992,8 @@ KBDReset(kbddev, putc)
|
|||
void
|
||||
MouseInit(mdev, putc, getc)
|
||||
dev_t mdev;
|
||||
void (*putc)();
|
||||
int (*getc)();
|
||||
void (*putc) __P((dev_t, int));
|
||||
int (*getc) __P((dev_t));
|
||||
{
|
||||
int id_byte1, id_byte2, id_byte3, id_byte4;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fbreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: fbreg.h,v 1.2 1994/05/27 08:39:32 glass Exp $
|
||||
* $Id: fbreg.h,v 1.3 1994/05/27 08:58:47 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)font.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: font.c,v 1.2 1994/05/27 08:39:34 glass Exp $
|
||||
* $Id: font.c,v 1.3 1994/05/27 08:58:50 glass Exp $
|
||||
*
|
||||
* font.c --
|
||||
*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)if_le.c 8.2 (Berkeley) 11/16/93
|
||||
* $Id: if_le.c,v 1.4 1994/05/27 08:39:36 glass Exp $
|
||||
* $Id: if_le.c,v 1.5 1994/05/27 08:58:54 glass Exp $
|
||||
*/
|
||||
|
||||
#include <le.h>
|
||||
|
@ -250,7 +250,6 @@ leprobe(dp)
|
|||
ifp->if_unit = dp->pmax_unit;
|
||||
ifp->if_name = "le";
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_init = leinit;
|
||||
ifp->if_reset = lereset;
|
||||
ifp->if_ioctl = leioctl;
|
||||
ifp->if_output = ether_output;
|
||||
|
@ -264,6 +263,7 @@ leprobe(dp)
|
|||
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
|
||||
#endif
|
||||
if_attach(ifp);
|
||||
ether_ifattach(ifp);
|
||||
|
||||
printf("le%d at nexus0 csr 0x%x priority %d ethernet address %s\n",
|
||||
dp->pmax_unit, dp->pmax_addr, dp->pmax_pri,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)if_lereg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: if_lereg.h,v 1.2 1994/05/27 08:39:38 glass Exp $
|
||||
* $Id: if_lereg.h,v 1.3 1994/05/27 08:58:58 glass Exp $
|
||||
*/
|
||||
|
||||
#define LEMTU 1518
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)mfb.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: mfb.c,v 1.2 1994/05/27 08:39:40 glass Exp $
|
||||
* $Id: mfb.c,v 1.3 1994/05/27 08:59:01 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)mfbreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: mfbreg.h,v 1.2 1994/05/27 08:39:42 glass Exp $
|
||||
* $Id: mfbreg.h,v 1.3 1994/05/27 08:59:04 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pdma.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: pdma.h,v 1.2 1994/05/27 08:39:44 glass Exp $
|
||||
* $Id: pdma.h,v 1.3 1994/05/27 08:59:06 glass Exp $
|
||||
*/
|
||||
|
||||
struct pdma {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pm.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: pm.c,v 1.2 1994/05/27 08:39:46 glass Exp $
|
||||
* $Id: pm.c,v 1.3 1994/05/27 08:59:08 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/devGraphics.c,
|
||||
* v 9.2 90/02/13 22:16:24 shirriff Exp SPRITE (DECWRL)";
|
||||
* $Id: pm.c,v 1.2 1994/05/27 08:39:46 glass Exp $
|
||||
* $Id: pm.c,v 1.3 1994/05/27 08:59:08 glass Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: pmreg.h,v 1.2 1994/05/27 08:39:48 glass Exp $
|
||||
* $Id: pmreg.h,v 1.3 1994/05/27 08:59:10 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)rz.c 8.1 (Berkeley) 7/29/93
|
||||
* $Id: rz.c,v 1.2 1994/05/27 08:39:50 glass Exp $
|
||||
* $Id: rz.c,v 1.3 1994/05/27 08:59:13 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -59,8 +59,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <ufs/ffs/fs.h>
|
||||
|
||||
#include <pmax/dev/device.h>
|
||||
#include <pmax/dev/scsi.h>
|
||||
|
||||
|
@ -677,6 +675,7 @@ rzgetinfo(dev)
|
|||
char *msg;
|
||||
int part;
|
||||
extern char *readdisklabel();
|
||||
struct cpu_disklabel cd;
|
||||
|
||||
part = rzpart(dev);
|
||||
sc->sc_flags |= RZF_HAVELABEL;
|
||||
|
@ -691,10 +690,10 @@ rzgetinfo(dev)
|
|||
/*
|
||||
* Now try to read the disklabel
|
||||
*/
|
||||
msg = readdisklabel(dev, rzstrategy, lp);
|
||||
msg = readdisklabel(dev, rzstrategy, lp, &cd);
|
||||
if (msg == NULL)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
printf("rz%d: WARNING: %s\n", unit, msg);
|
||||
sc->sc_label.d_magic = DISKMAGIC;
|
||||
sc->sc_label.d_magic2 = DISKMAGIC;
|
||||
|
@ -713,6 +712,7 @@ rzgetinfo(dev)
|
|||
rzdefaultpart[i].strtblk;
|
||||
}
|
||||
sc->sc_label.d_partitions[RAWPART].p_size = sc->sc_blks;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -848,6 +848,7 @@ rzioctl(dev, cmd, data, flag, p)
|
|||
register struct rz_softc *sc = &rz_softc[rzunit(dev)];
|
||||
int error;
|
||||
int flags;
|
||||
struct cpu_disklabel cd;
|
||||
|
||||
switch (cmd) {
|
||||
default:
|
||||
|
@ -901,8 +902,9 @@ rzioctl(dev, cmd, data, flag, p)
|
|||
if (!(flag & FWRITE))
|
||||
return (EBADF);
|
||||
error = setdisklabel(&sc->sc_label,
|
||||
(struct disklabel *)data,
|
||||
(sc->sc_flags & RZF_WLABEL) ? 0 : sc->sc_openpart);
|
||||
(struct disklabel *)data,
|
||||
(sc->sc_flags & RZF_WLABEL) ? 0 :
|
||||
sc->sc_openpart, &cd);
|
||||
return (error);
|
||||
|
||||
case DIOCGPART:
|
||||
|
@ -926,15 +928,17 @@ rzioctl(dev, cmd, data, flag, p)
|
|||
if (!(flag & FWRITE))
|
||||
return (EBADF);
|
||||
error = setdisklabel(&sc->sc_label,
|
||||
(struct disklabel *)data,
|
||||
(sc->sc_flags & RZF_WLABEL) ? 0 : sc->sc_openpart);
|
||||
(struct disklabel *)data,
|
||||
(sc->sc_flags & RZF_WLABEL) ? 0 :
|
||||
sc->sc_openpart,
|
||||
&cd);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
/* simulate opening partition 0 so write succeeds */
|
||||
flags = sc->sc_flags;
|
||||
sc->sc_flags = RZF_ALIVE | RZF_WLABEL;
|
||||
error = writedisklabel(dev, rzstrategy, &sc->sc_label);
|
||||
error = writedisklabel(dev, rzstrategy, &sc->sc_label, &cd);
|
||||
sc->sc_flags = flags;
|
||||
return (error);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)scc.c 8.2 (Berkeley) 11/30/93
|
||||
* $Id: scc.c,v 1.3 1994/05/27 08:39:52 glass Exp $
|
||||
* $Id: scc.c,v 1.4 1994/05/27 08:59:16 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -99,14 +99,14 @@
|
|||
extern int pmax_boardtype;
|
||||
extern struct consdev cn_tab;
|
||||
extern void ttrstrt __P((void *));
|
||||
extern void KBDReset __P((dev_t, void (*)()));
|
||||
extern void MouseInit __P((dev_t, void (*)(), int (*)()));
|
||||
|
||||
/*
|
||||
* Driver information for auto-configuration stuff.
|
||||
*/
|
||||
int sccprobe(), sccopen(), sccparam(), sccGetc();
|
||||
void sccintr(), sccstart(), sccPutc();
|
||||
int sccprobe(), sccopen(), sccparam();
|
||||
void sccintr(), sccstart();
|
||||
int sccGetc __P((dev_t));
|
||||
void sccPutc __P((dev_t, int));
|
||||
struct driver sccdriver = {
|
||||
"scc", sccprobe, 0, 0, sccintr,
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ struct driver sccdriver = {
|
|||
#define SCCUNIT(dev) (minor(dev) >> 1)
|
||||
#define SCCLINE(dev) (minor(dev) & 0x1)
|
||||
|
||||
struct tty scc_tty[NSCCLINE];
|
||||
struct tty *scc_tty[NSCCLINE];
|
||||
void (*sccDivertXInput)(); /* X windows keyboard input routine */
|
||||
void (*sccMouseEvent)(); /* X windows mouse motion event routine */
|
||||
void (*sccMouseButtons)(); /* X windows mouse buttons event routine */
|
||||
|
@ -195,7 +195,9 @@ sccprobe(cp)
|
|||
pdp = &sc->scc_pdma[0];
|
||||
|
||||
/* init pseudo DMA structures */
|
||||
tp = &scc_tty[cp->pmax_unit * 2];
|
||||
tp = scc_tty[cp->pmax_unit * 2];
|
||||
if (tp == NULL)
|
||||
tp = scc_tty[cp->pmax_unit * 2] = ttymalloc();
|
||||
for (cntr = 0; cntr < 2; cntr++) {
|
||||
pdp->p_addr = (void *)cp->pmax_addr;
|
||||
pdp->p_arg = (int)tp;
|
||||
|
@ -336,7 +338,9 @@ sccopen(dev, flag, mode, p)
|
|||
sc = &scc_softc[unit];
|
||||
if (sc->scc_pdma[line].p_addr == (void *)0)
|
||||
return (ENXIO);
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
if (tp == NULL)
|
||||
tp = scc_tty[minor(dev)] = ttymalloc();
|
||||
tp->t_oproc = sccstart;
|
||||
tp->t_param = sccparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -385,7 +389,7 @@ sccclose(dev, flag, mode, p)
|
|||
register struct tty *tp;
|
||||
register int bit, line;
|
||||
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
line = SCCLINE(dev);
|
||||
if (sc->scc_wreg[line].wr5 & SCC_WR5_SEND_BREAK) {
|
||||
sc->scc_wreg[line].wr5 &= ~SCC_WR5_SEND_BREAK;
|
||||
|
@ -404,7 +408,7 @@ sccread(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -414,7 +418,7 @@ sccwrite(dev, uio, flag)
|
|||
{
|
||||
register struct tty *tp;
|
||||
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
|
@ -430,11 +434,11 @@ sccioctl(dev, cmd, data, flag, p)
|
|||
register struct tty *tp;
|
||||
int error, line;
|
||||
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
|
@ -635,7 +639,7 @@ sccintr(unit)
|
|||
if ((rr2 == SCC_RR2_A_XMIT_DONE) || (rr2 == SCC_RR2_B_XMIT_DONE)) {
|
||||
chan = (rr2 == SCC_RR2_A_XMIT_DONE) ?
|
||||
SCC_CHANNEL_A : SCC_CHANNEL_B;
|
||||
tp = &scc_tty[unit | chan];
|
||||
tp = scc_tty[unit | chan];
|
||||
dp = &sc->scc_pdma[chan];
|
||||
if (dp->p_mem < dp->p_end) {
|
||||
SCC_WRITE_DATA(regs, chan, *dp->p_mem++);
|
||||
|
@ -669,7 +673,7 @@ sccintr(unit)
|
|||
chan = SCC_CHANNEL_A;
|
||||
else
|
||||
chan = SCC_CHANNEL_B;
|
||||
tp = &scc_tty[unit | chan];
|
||||
tp = scc_tty[unit | chan];
|
||||
SCC_READ_DATA(regs, chan, cc);
|
||||
if (rr2 == SCC_RR2_A_RECV_SPECIAL ||
|
||||
rr2 == SCC_RR2_B_RECV_SPECIAL) {
|
||||
|
@ -685,7 +689,7 @@ sccintr(unit)
|
|||
/*
|
||||
* Keyboard needs special treatment.
|
||||
*/
|
||||
if (tp == &scc_tty[SCCKBD_PORT] && cn_tab.cn_screen) {
|
||||
if (tp == scc_tty[SCCKBD_PORT] && cn_tab.cn_screen) {
|
||||
#ifdef KADB
|
||||
if (cc == LK_DO) {
|
||||
spl0();
|
||||
|
@ -705,7 +709,7 @@ sccintr(unit)
|
|||
/*
|
||||
* Now for mousey
|
||||
*/
|
||||
} else if (tp == &scc_tty[SCCMOUSE_PORT] && sccMouseButtons) {
|
||||
} else if (tp == scc_tty[SCCMOUSE_PORT] && sccMouseButtons) {
|
||||
register MouseReport *mrp;
|
||||
static MouseReport currentRep;
|
||||
|
||||
|
@ -791,7 +795,7 @@ sccstart(tp)
|
|||
if (tp->t_outq.c_cc == 0)
|
||||
goto out;
|
||||
/* handle console specially */
|
||||
if (tp == &scc_tty[SCCKBD_PORT] && cn_tab.cn_screen) {
|
||||
if (tp == scc_tty[SCCKBD_PORT] && cn_tab.cn_screen) {
|
||||
while (tp->t_outq.c_cc > 0) {
|
||||
cc = getc(&tp->t_outq) & 0x7f;
|
||||
cnputc(cc);
|
||||
|
@ -925,7 +929,7 @@ sccmctl(dev, bits, how)
|
|||
sc->scc_wreg[SCC_CHANNEL_A].wr5);
|
||||
}
|
||||
if ((mbits & DML_DTR) && (sc->scc_softCAR & (1 << line)))
|
||||
scc_tty[minor(dev)].t_state |= TS_CARR_ON;
|
||||
scc_tty[minor(dev)]->t_state |= TS_CARR_ON;
|
||||
(void) splx(s);
|
||||
return (mbits);
|
||||
}
|
||||
|
@ -945,7 +949,7 @@ scc_modem_intr(dev)
|
|||
int s;
|
||||
|
||||
sc = &scc_softc[SCCUNIT(dev)];
|
||||
tp = &scc_tty[minor(dev)];
|
||||
tp = scc_tty[minor(dev)];
|
||||
chan = SCCLINE(dev);
|
||||
regs = (scc_regmap_t *)sc->scc_pdma[chan].p_addr;
|
||||
if (chan == SCC_CHANNEL_A)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sccreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: sccreg.h,v 1.2 1994/05/27 08:39:54 glass Exp $
|
||||
* $Id: sccreg.h,v 1.3 1994/05/27 08:59:19 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)scsi.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: scsi.c,v 1.2 1994/05/27 08:39:58 glass Exp $
|
||||
* $Id: scsi.c,v 1.3 1994/05/27 08:59:22 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)scsi.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: scsi.h,v 1.2 1994/05/27 08:39:59 glass Exp $
|
||||
* $Id: scsi.h,v 1.3 1994/05/27 08:59:28 glass Exp $
|
||||
*
|
||||
* scsi.h --
|
||||
*
|
||||
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/dev/RCS/scsi.h,
|
||||
* v 9.1 90/02/13 23:11:24 jhh Exp SPRITE (Berkeley)
|
||||
* $Id: scsi.h,v 1.2 1994/05/27 08:39:59 glass Exp $
|
||||
* $Id: scsi.h,v 1.3 1994/05/27 08:59:28 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SCSI_H
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sii.c 8.2 (Berkeley) 11/30/93
|
||||
* $Id: sii.c,v 1.2 1994/05/27 08:40:02 glass Exp $
|
||||
* $Id: sii.c,v 1.3 1994/05/27 08:59:32 glass Exp $
|
||||
*
|
||||
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/devSII.c,
|
||||
* v 9.2 89/09/14 13:37:41 jhh Exp $ SPRITE (DECWRL)";
|
||||
|
@ -89,6 +89,7 @@ typedef struct scsi_state {
|
|||
|
||||
/* state flags */
|
||||
#define FIRST_DMA 0x01 /* true if no data DMA started yet */
|
||||
#define PARITY_ERR 0x02 /* true if parity error seen */
|
||||
|
||||
#define SII_NCMD 7
|
||||
struct siisoftc {
|
||||
|
@ -99,7 +100,7 @@ struct siisoftc {
|
|||
State sc_st[SII_NCMD]; /* state info for each active command */
|
||||
} sii_softc[NSII];
|
||||
|
||||
/*
|
||||
/*
|
||||
* MACROS for timing out spin loops.
|
||||
*
|
||||
* Wait until expression is true.
|
||||
|
@ -116,7 +117,7 @@ struct siisoftc {
|
|||
* cntr - variable for number of tries
|
||||
*/
|
||||
#define SII_WAIT_UNTIL(var, reg, expr, spincount, cntr) { \
|
||||
register unsigned tmp = reg; \
|
||||
register u_int tmp = reg; \
|
||||
for (cntr = 0; cntr < spincount; cntr++) { \
|
||||
while (tmp != (var = reg)) \
|
||||
tmp = var; \
|
||||
|
@ -138,6 +139,8 @@ struct sii_log {
|
|||
u_short dstat;
|
||||
u_short comm;
|
||||
u_short msg;
|
||||
int rlen;
|
||||
int dlen;
|
||||
int target;
|
||||
} sii_log[NLOG], *sii_logp = sii_log;
|
||||
#endif
|
||||
|
@ -236,7 +239,7 @@ siiintr(unit)
|
|||
int unit;
|
||||
{
|
||||
register struct siisoftc *sc = &sii_softc[unit];
|
||||
unsigned dstat;
|
||||
u_int dstat;
|
||||
|
||||
/*
|
||||
* Find which controller caused the interrupt.
|
||||
|
@ -283,7 +286,7 @@ sii_Reset(regs, reset)
|
|||
register int i;
|
||||
|
||||
/*
|
||||
* Assert SCSI bus reset for at least 25 Usec to clear the
|
||||
* Assert SCSI bus reset for at least 25 Usec to clear the
|
||||
* world. SII_DO_RST is self clearing.
|
||||
* Delay 250 ms before doing any commands.
|
||||
*/
|
||||
|
@ -323,7 +326,7 @@ sii_StartCmd(sc, target)
|
|||
register SIIRegs *regs;
|
||||
register ScsiCmd *scsicmd;
|
||||
register State *state;
|
||||
register unsigned status;
|
||||
register u_int status;
|
||||
int error, retval;
|
||||
|
||||
/* if another command is currently in progress, just wait */
|
||||
|
@ -359,12 +362,16 @@ sii_StartCmd(sc, target)
|
|||
state->dmaDataPhase);
|
||||
}
|
||||
sii_debug_cmd = scsicmd->cmd[0];
|
||||
if (scsicmd->cmd[0] == SCSI_READ_EXT) {
|
||||
if (scsicmd->cmd[0] == SCSI_READ_EXT ||
|
||||
scsicmd->cmd[0] == SCSI_WRITE_EXT) {
|
||||
sii_debug_bn = (scsicmd->cmd[2] << 24) |
|
||||
(scsicmd->cmd[3] << 16) |
|
||||
(scsicmd->cmd[4] << 8) |
|
||||
scsicmd->cmd[5];
|
||||
sii_debug_sz = (scsicmd->cmd[7] << 8) | scsicmd->cmd[8];
|
||||
} else {
|
||||
sii_debug_bn = 0;
|
||||
sii_debug_sz = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -381,6 +388,8 @@ sii_StartCmd(sc, target)
|
|||
}
|
||||
|
||||
sc->sc_target = target;
|
||||
#if 0
|
||||
/* seem to have problems with synchronous transfers */
|
||||
if (scsicmd->flags & SCSICMD_USE_SYNC) {
|
||||
printf("sii_StartCmd: doing extended msg\n"); /* XXX */
|
||||
/*
|
||||
|
@ -399,17 +408,19 @@ sii_StartCmd(sc, target)
|
|||
CopyToBuffer((u_short *)sii_buf,
|
||||
(volatile u_short *)SII_BUF_ADDR, 6);
|
||||
regs->slcsr = target;
|
||||
regs->dmctrl = 0;
|
||||
regs->dmaddrl = ((u_short)SII_BUF_ADDR >> 1);
|
||||
regs->dmaddrh = ((u_short)SII_BUF_ADDR >> 17) & 03;
|
||||
regs->dmctrl = state->dmaReqAck;
|
||||
regs->dmaddrl = (u_short)(SII_BUF_ADDR >> 1);
|
||||
regs->dmaddrh = (u_short)(SII_BUF_ADDR >> 17) & 03;
|
||||
regs->dmlotc = 6;
|
||||
regs->comm = SII_DMA | SII_INXFER | SII_SELECT | SII_ATN |
|
||||
SII_CON | SII_MSG_OUT_PHASE;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/* do a chained, select with ATN and programmed I/O command */
|
||||
regs->data = SCSI_DIS_REC_IDENTIFY;
|
||||
regs->slcsr = target;
|
||||
regs->dmctrl = 0;
|
||||
regs->dmctrl = state->dmaReqAck;
|
||||
regs->comm = SII_INXFER | SII_SELECT | SII_ATN | SII_CON |
|
||||
SII_MSG_OUT_PHASE;
|
||||
}
|
||||
|
@ -434,6 +445,8 @@ sii_StartCmd(sc, target)
|
|||
sii_logp->dstat = 0;
|
||||
sii_logp->comm = regs->comm;
|
||||
sii_logp->msg = -1;
|
||||
sii_logp->rlen = state->buflen;
|
||||
sii_logp->dlen = state->dmalen;
|
||||
if (++sii_logp >= &sii_log[NLOG])
|
||||
sii_logp = sii_log;
|
||||
#endif
|
||||
|
@ -518,13 +531,13 @@ sii_StartCmd(sc, target)
|
|||
static void
|
||||
sii_DoIntr(sc, dstat)
|
||||
register struct siisoftc *sc;
|
||||
register unsigned dstat;
|
||||
register u_int dstat;
|
||||
{
|
||||
register SIIRegs *regs = sc->sc_regs;
|
||||
register State *state;
|
||||
register unsigned cstat;
|
||||
register int i;
|
||||
unsigned comm, msg;
|
||||
register u_int cstat;
|
||||
int i, msg;
|
||||
u_int comm;
|
||||
|
||||
again:
|
||||
comm = regs->comm;
|
||||
|
@ -538,6 +551,13 @@ again:
|
|||
sii_logp->dstat = dstat;
|
||||
sii_logp->comm = comm;
|
||||
sii_logp->msg = -1;
|
||||
if (sc->sc_target >= 0) {
|
||||
sii_logp->rlen = sc->sc_st[sc->sc_target].buflen;
|
||||
sii_logp->dlen = sc->sc_st[sc->sc_target].dmalen;
|
||||
} else {
|
||||
sii_logp->rlen = 0;
|
||||
sii_logp->dlen = 0;
|
||||
}
|
||||
if (++sii_logp >= &sii_log[NLOG])
|
||||
sii_logp = sii_log;
|
||||
#endif
|
||||
|
@ -597,14 +617,9 @@ again:
|
|||
u_short *dma;
|
||||
char *buf;
|
||||
|
||||
/* check for a PARITY ERROR */
|
||||
if (dstat & SII_IPE) {
|
||||
printf("sii%d: Parity error!!\n", sc - sii_softc);
|
||||
goto abort;
|
||||
}
|
||||
/*
|
||||
* There is a race condition with SII_SCH. There is a short
|
||||
* window between the time a SII_SCH is seen after a disconnect
|
||||
* window between the time a SII_SCH is seen after a disconnect
|
||||
* and when the SII_SCH is cleared. A reselect can happen
|
||||
* in this window and we will clear the SII_SCH without
|
||||
* processing the reconnect.
|
||||
|
@ -622,6 +637,12 @@ again:
|
|||
panic("sc_target 1");
|
||||
}
|
||||
state = &sc->sc_st[sc->sc_target];
|
||||
/* check for a PARITY ERROR */
|
||||
if (dstat & SII_IPE) {
|
||||
state->flags |= PARITY_ERR;
|
||||
printf("sii%d: Parity error!!\n", sc - sii_softc);
|
||||
goto abort;
|
||||
}
|
||||
/* dmalen = amount left to transfer, i = amount transfered */
|
||||
i = state->dmalen;
|
||||
state->dmalen = 0;
|
||||
|
@ -698,14 +719,6 @@ again:
|
|||
state->dmalen = i);
|
||||
}
|
||||
dstat &= ~(SII_IBF | SII_TBE);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("sii%d: device %d: unexpected DNE\n",
|
||||
sc - sii_softc, sc->sc_target);
|
||||
#ifdef DEBUG
|
||||
sii_DumpLog();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -713,7 +726,7 @@ again:
|
|||
if (dstat & (SII_MIS | SII_IBF | SII_TBE)) {
|
||||
/*
|
||||
* There is a race condition with SII_SCH. There is a short
|
||||
* window between the time a SII_SCH is seen after a disconnect
|
||||
* window between the time a SII_SCH is seen after a disconnect
|
||||
* and when the SII_SCH is cleared. A reselect can happen
|
||||
* in this window and we will clear the SII_SCH without
|
||||
* processing the reconnect.
|
||||
|
@ -727,8 +740,10 @@ again:
|
|||
if (cstat & SII_DST) {
|
||||
sc->sc_target = regs->destat;
|
||||
state->prevComm = 0;
|
||||
} else
|
||||
} else {
|
||||
sii_DumpLog();
|
||||
panic("sc_target 2");
|
||||
}
|
||||
}
|
||||
state = &sc->sc_st[sc->sc_target];
|
||||
switch (dstat & SII_PHASE_MSK) {
|
||||
|
@ -789,7 +804,6 @@ again:
|
|||
|
||||
case SII_DATA_IN_PHASE:
|
||||
case SII_DATA_OUT_PHASE:
|
||||
regs->dmctrl = state->dmaReqAck;
|
||||
if (state->cmdlen > 0) {
|
||||
printf("sii%d: device %d: cmd %x: command data not all sent (%d) 1\n",
|
||||
sc - sii_softc, sc->sc_target,
|
||||
|
@ -922,7 +936,7 @@ again:
|
|||
|
||||
/* read a one byte status message */
|
||||
state->statusByte = msg =
|
||||
sii_GetByte(regs, SII_STATUS_PHASE);
|
||||
sii_GetByte(regs, SII_STATUS_PHASE, 1);
|
||||
if (msg < 0) {
|
||||
dstat = regs->dstat;
|
||||
goto again;
|
||||
|
@ -995,7 +1009,7 @@ again:
|
|||
}
|
||||
|
||||
/* read a one byte message */
|
||||
msg = sii_GetByte(regs, SII_MSG_IN_PHASE);
|
||||
msg = sii_GetByte(regs, SII_MSG_IN_PHASE, 0);
|
||||
if (msg < 0) {
|
||||
dstat = regs->dstat;
|
||||
goto again;
|
||||
|
@ -1012,6 +1026,13 @@ again:
|
|||
/* process message */
|
||||
switch (msg) {
|
||||
case SCSI_COMMAND_COMPLETE:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
msg = sc->sc_target;
|
||||
sc->sc_target = -1;
|
||||
/*
|
||||
|
@ -1046,45 +1067,48 @@ again:
|
|||
break;
|
||||
|
||||
case SCSI_EXTENDED_MSG:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
/* read the message length */
|
||||
msg = sii_GetByte(regs, SII_MSG_IN_PHASE);
|
||||
msg = sii_GetByte(regs, SII_MSG_IN_PHASE, 1);
|
||||
if (msg < 0) {
|
||||
dstat = regs->dstat;
|
||||
goto again;
|
||||
}
|
||||
sii_buf[1] = msg; /* message length */
|
||||
if (msg == 0)
|
||||
msg = 256;
|
||||
sii_StartDMA(regs, SII_MSG_IN_PHASE,
|
||||
(u_short *)SII_BUF_ADDR, msg);
|
||||
/* wait a short time for XFER complete */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
(dstat & (SII_DNE | SII_TCZ)) ==
|
||||
(SII_DNE | SII_TCZ),
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
if ((dstat & (SII_DNE | SII_TCZ | SII_IPE)) !=
|
||||
(SII_DNE | SII_TCZ)) {
|
||||
#ifdef DEBUG
|
||||
if (sii_debug > 4)
|
||||
printf("cnt0 %d\n", i);
|
||||
else if (sii_debug > 0)
|
||||
printf("sii_DoIntr: emsg in ds %x cnt %d\n",
|
||||
dstat, i);
|
||||
#endif
|
||||
printf("sii: ds %x cm %x i %d lotc %d\n",
|
||||
dstat, comm, i, regs->dmlotc); /* XXX */
|
||||
sii_DumpLog(); /* XXX */
|
||||
goto again;
|
||||
/*
|
||||
* We read and acknowlege all the bytes
|
||||
* except the last so we can assert ATN
|
||||
* if needed before acknowledging the last.
|
||||
*/
|
||||
for (i = 0; i < msg; i++) {
|
||||
dstat = sii_GetByte(regs,
|
||||
SII_MSG_IN_PHASE, i < msg - 1);
|
||||
if ((int)dstat < 0) {
|
||||
dstat = regs->dstat;
|
||||
goto again;
|
||||
}
|
||||
sii_buf[i + 2] = dstat;
|
||||
}
|
||||
|
||||
/* clear the DNE, other errors handled later */
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
CopyFromBuffer((volatile u_short *)SII_BUF_ADDR,
|
||||
sii_buf + 2, msg);
|
||||
switch (sii_buf[2]) {
|
||||
case SCSI_MODIFY_DATA_PTR:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER |
|
||||
SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
i = (sii_buf[3] << 24) |
|
||||
(sii_buf[4] << 16) |
|
||||
(sii_buf[5] << 8) |
|
||||
|
@ -1096,30 +1120,49 @@ again:
|
|||
break;
|
||||
|
||||
case SCSI_SYNCHRONOUS_XFER:
|
||||
/*
|
||||
* Acknowledge last byte and
|
||||
* signal a request for MSG_OUT.
|
||||
*/
|
||||
regs->comm = SII_INXFER | SII_ATN |
|
||||
SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
sii_DoSync(regs, state);
|
||||
break;
|
||||
|
||||
case SCSI_EXTENDED_IDENTIFY:
|
||||
case SCSI_WIDE_XFER:
|
||||
default:
|
||||
reject:
|
||||
/* send a reject message */
|
||||
regs->data = SCSI_MESSAGE_REJECT;
|
||||
/*
|
||||
* Acknowledge last byte and
|
||||
* signal a request for MSG_OUT.
|
||||
*/
|
||||
regs->comm = SII_INXFER | SII_ATN |
|
||||
(regs->cstat & SII_STATE_MSK) |
|
||||
SII_MSG_OUT_PHASE;
|
||||
MachEmptyWriteBuffer();
|
||||
/* wait for XFER complete */
|
||||
SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
(dstat &
|
||||
(SII_DNE | SII_PHASE_MSK)) ==
|
||||
(SII_DNE | SII_MSG_OUT_PHASE),
|
||||
dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* wait for MSG_OUT phase */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_TBE,
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
if ((dstat &
|
||||
(SII_DNE | SII_PHASE_MSK)) !=
|
||||
(SII_DNE | SII_MSG_OUT_PHASE))
|
||||
break;
|
||||
/* send a reject message */
|
||||
regs->data = SCSI_MESSAGE_REJECT;
|
||||
regs->comm = SII_INXFER |
|
||||
(regs->cstat & SII_STATE_MSK) |
|
||||
SII_MSG_OUT_PHASE;
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
}
|
||||
|
@ -1127,6 +1170,13 @@ again:
|
|||
|
||||
case SCSI_SAVE_DATA_POINTER:
|
||||
case SCSI_RESTORE_POINTERS:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
/* wait a short time for another msg */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & (SII_CI | SII_DI),
|
||||
|
@ -1141,6 +1191,13 @@ again:
|
|||
break;
|
||||
|
||||
case SCSI_DISCONNECT:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
state->prevComm = comm;
|
||||
#ifdef DEBUG
|
||||
if (sii_debug > 4)
|
||||
|
@ -1179,20 +1236,34 @@ again:
|
|||
break;
|
||||
|
||||
case SCSI_MESSAGE_REJECT:
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
printf("sii%d: device %d: message reject.\n",
|
||||
sc - sii_softc, sc->sc_target);
|
||||
goto abort;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!(msg & SCSI_IDENTIFY)) {
|
||||
printf("sii%d: device %d: couldn't handle message 0x%x... ignoring.\n",
|
||||
printf("sii%d: device %d: couldn't handle message 0x%x... rejecting.\n",
|
||||
sc - sii_softc, sc->sc_target,
|
||||
msg);
|
||||
#ifdef DEBUG
|
||||
sii_DumpLog();
|
||||
#endif
|
||||
break;
|
||||
goto reject;
|
||||
}
|
||||
/* acknowledge last byte */
|
||||
regs->comm = SII_INXFER | SII_MSG_IN_PHASE |
|
||||
(comm & SII_STATE_MSK);
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
dstat & SII_DNE, SII_WAIT_COUNT, i);
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
/* may want to check LUN some day */
|
||||
/* wait a short time for another msg */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
|
@ -1213,8 +1284,18 @@ again:
|
|||
if (sii_debug > 4)
|
||||
printf("MsgOut\n");
|
||||
#endif
|
||||
printf("MsgOut %x\n", state->flags); /* XXX */
|
||||
|
||||
regs->data = SCSI_NO_OP;
|
||||
/*
|
||||
* Check for parity error.
|
||||
* Hardware will automatically set ATN
|
||||
* to request the device for a MSG_OUT phase.
|
||||
*/
|
||||
if (state->flags & PARITY_ERR) {
|
||||
state->flags &= ~PARITY_ERR;
|
||||
regs->data = SCSI_MESSAGE_PARITY_ERROR;
|
||||
} else
|
||||
regs->data = SCSI_NO_OP;
|
||||
regs->comm = SII_INXFER | (comm & SII_STATE_MSK) |
|
||||
SII_MSG_OUT_PHASE;
|
||||
MachEmptyWriteBuffer();
|
||||
|
@ -1319,7 +1400,7 @@ abort:
|
|||
static void
|
||||
sii_StateChg(sc, cstat)
|
||||
register struct siisoftc *sc;
|
||||
register unsigned cstat;
|
||||
register u_int cstat;
|
||||
{
|
||||
register SIIRegs *regs = sc->sc_regs;
|
||||
register State *state;
|
||||
|
@ -1378,9 +1459,10 @@ sii_StateChg(sc, cstat)
|
|||
* command finished.
|
||||
*/
|
||||
sc->sc_target = i = regs->destat;
|
||||
regs->comm = SII_CON | SII_DST | SII_MSG_IN_PHASE;
|
||||
MachEmptyWriteBuffer();
|
||||
state = &sc->sc_st[i];
|
||||
regs->comm = SII_CON | SII_DST | SII_MSG_IN_PHASE;
|
||||
regs->dmctrl = state->dmaReqAck;
|
||||
MachEmptyWriteBuffer();
|
||||
if (!state->prevComm) {
|
||||
printf("sii%d: device %d: spurrious reselection\n",
|
||||
sc - sii_softc, i);
|
||||
|
@ -1420,20 +1502,20 @@ sii_StateChg(sc, cstat)
|
|||
|
||||
/*
|
||||
* Read one byte of data.
|
||||
* If 'ack' is true, acknowledge the byte.
|
||||
*/
|
||||
static int
|
||||
sii_GetByte(regs, phase)
|
||||
sii_GetByte(regs, phase, ack)
|
||||
register SIIRegs *regs;
|
||||
int phase;
|
||||
int phase, ack;
|
||||
{
|
||||
register unsigned dstat;
|
||||
register unsigned state;
|
||||
#ifdef PROGXFER
|
||||
register unsigned data;
|
||||
register u_int dstat;
|
||||
register u_int state;
|
||||
register int i;
|
||||
register int data;
|
||||
|
||||
dstat = regs->dstat;
|
||||
state = regs->cstat & SII_STATE_MSK;
|
||||
regs->dmctrl = 0;
|
||||
if (!(dstat & SII_IBF) || (dstat & SII_MIS)) {
|
||||
regs->comm = state | phase;
|
||||
MachEmptyWriteBuffer();
|
||||
|
@ -1445,72 +1527,40 @@ sii_GetByte(regs, phase)
|
|||
printf("status no IBF\n");
|
||||
#endif
|
||||
}
|
||||
data = regs->data;
|
||||
if (regs->dstat & SII_DNE) { /* XXX */
|
||||
if (dstat & SII_DNE) { /* XXX */
|
||||
printf("sii_GetByte: DNE set 5\n");
|
||||
sii_DumpLog();
|
||||
regs->dstat = SII_DNE;
|
||||
}
|
||||
regs->comm = SII_INXFER | state | phase;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* wait a short time for XFER complete */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat, dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
if ((dstat & (SII_DNE | SII_IPE)) != SII_DNE) {
|
||||
data = regs->data;
|
||||
/* check for parity error */
|
||||
if (dstat & SII_IPE) {
|
||||
#ifdef DEBUG
|
||||
if (sii_debug > 4)
|
||||
printf("cnt0 %d\n", i);
|
||||
#endif
|
||||
printf("MsgIn %x ?? ds %x cm %x i %d\n",
|
||||
data, dstat, comm, i); /* XXX */
|
||||
sii_DumpLog(); /* XXX */
|
||||
panic("status"); /* XXX */
|
||||
goto again;
|
||||
printf("sii_GetByte: data %x ?? ds %x cm %x i %d\n",
|
||||
data, dstat, regs->comm, i); /* XXX */
|
||||
data = -1;
|
||||
ack = 1;
|
||||
}
|
||||
|
||||
if (ack) {
|
||||
regs->comm = SII_INXFER | state | phase;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* wait a short time for XFER complete */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat, dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
/* clear the DNE */
|
||||
if (dstat & SII_DNE) {
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
/* clear the DNE, other errors handled later */
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
return (data);
|
||||
|
||||
#else /* PROGXFER */
|
||||
register int i;
|
||||
|
||||
state = regs->cstat & SII_STATE_MSK;
|
||||
regs->dmctrl = 0;
|
||||
if (regs->dstat & SII_DNE) {
|
||||
printf("sii_GetByte: DNE cs %x ds %x cm %x\n",
|
||||
regs->cstat, regs->dstat, regs->comm); /* XXX */
|
||||
regs->dstat = SII_DNE;
|
||||
}
|
||||
regs->dmaddrl = ((u_short)SII_BUF_ADDR >> 1);
|
||||
regs->dmaddrh = ((u_short)SII_BUF_ADDR >> 17) & 03;
|
||||
regs->dmlotc = 1;
|
||||
regs->comm = SII_DMA | SII_INXFER | state | phase;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* wait a short time for XFER complete */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat,
|
||||
(dstat & (SII_DNE | SII_TCZ)) == (SII_DNE | SII_TCZ),
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
if ((dstat & (SII_DNE | SII_TCZ | SII_IPE)) != (SII_DNE | SII_TCZ)) {
|
||||
printf("sii_GetByte: cs %x ds %x cm %x i %d lotc %d\n",
|
||||
regs->cstat, dstat, regs->comm, i,
|
||||
regs->dmlotc); /* XXX */
|
||||
sii_DumpLog(); /* XXX */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* clear the DNE, other errors handled later */
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* return one byte of data (optimized CopyFromBuffer()) */
|
||||
return (*(volatile u_short *)SII_BUF_ADDR & 0xFF);
|
||||
#endif /* PROGXFER */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1521,23 +1571,74 @@ sii_DoSync(regs, state)
|
|||
register SIIRegs *regs;
|
||||
register State *state;
|
||||
{
|
||||
register unsigned dstat;
|
||||
register int i;
|
||||
unsigned len;
|
||||
register u_int dstat, comm;
|
||||
register int i, j;
|
||||
u_int len;
|
||||
|
||||
printf("sii_DoSync: per %d req/ack %d\n",
|
||||
sii_buf[3], sii_buf[4]); /* XXX */
|
||||
#ifdef DEBUG
|
||||
if (sii_debug)
|
||||
printf("sii_DoSync: len %d per %d req/ack %d\n",
|
||||
sii_buf[1], sii_buf[3], sii_buf[4]);
|
||||
#endif
|
||||
|
||||
/* SII chip can only handle a minimum transfer period of ??? */
|
||||
if (sii_buf[3] < 64)
|
||||
sii_buf[3] = 64;
|
||||
/* SII chip can only handle a maximum REQ/ACK offset of 3 */
|
||||
len = sii_buf[4];
|
||||
if (len > 3)
|
||||
len = 3; /* SII chip can only handle 3 max */
|
||||
len = 3;
|
||||
|
||||
sii_buf[0] = SCSI_EXTENDED_MSG;
|
||||
sii_buf[1] = 3; /* message length */
|
||||
sii_buf[2] = SCSI_SYNCHRONOUS_XFER;
|
||||
sii_buf[4] = len;
|
||||
#if 1
|
||||
comm = SII_INXFER | SII_ATN | SII_MSG_OUT_PHASE |
|
||||
(regs->cstat & SII_STATE_MSK);
|
||||
regs->comm = comm & ~SII_INXFER;
|
||||
for (j = 0; j < 5; j++) {
|
||||
/* wait for target to request the next byte */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat, dstat & SII_TBE,
|
||||
SII_WAIT_COUNT, i);
|
||||
if (!(dstat & SII_TBE) ||
|
||||
(dstat & SII_PHASE_MSK) != SII_MSG_OUT_PHASE) {
|
||||
printf("sii_DoSync: TBE? ds %x cm %x i %d\n",
|
||||
dstat, comm, i); /* XXX */
|
||||
return;
|
||||
}
|
||||
|
||||
/* the last message byte should have ATN off */
|
||||
if (j == 4)
|
||||
comm &= ~SII_ATN;
|
||||
|
||||
regs->data = sii_buf[j];
|
||||
regs->comm = comm;
|
||||
MachEmptyWriteBuffer();
|
||||
|
||||
/* wait a short time for XFER complete */
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat, dstat & SII_DNE,
|
||||
SII_WAIT_COUNT, i);
|
||||
|
||||
if (!(dstat & SII_DNE)) {
|
||||
printf("sii_DoSync: DNE? ds %x cm %x i %d\n",
|
||||
dstat, comm, i); /* XXX */
|
||||
return;
|
||||
}
|
||||
|
||||
/* clear the DNE, other errors handled later */
|
||||
regs->dstat = SII_DNE;
|
||||
MachEmptyWriteBuffer();
|
||||
}
|
||||
#else
|
||||
CopyToBuffer((u_short *)sii_buf, (volatile u_short *)SII_BUF_ADDR, 5);
|
||||
regs->dmaddrl = ((u_short)SII_BUF_ADDR >> 1);
|
||||
regs->dmaddrh = ((u_short)SII_BUF_ADDR >> 17) & 03;
|
||||
printf("sii_DoSync: %x %x %x ds %x\n",
|
||||
((volatile u_short *)SII_BUF_ADDR)[0],
|
||||
((volatile u_short *)SII_BUF_ADDR)[2],
|
||||
((volatile u_short *)SII_BUF_ADDR)[4],
|
||||
regs->dstat); /* XXX */
|
||||
regs->dmaddrl = (u_short)(SII_BUF_ADDR >> 1);
|
||||
regs->dmaddrh = (u_short)(SII_BUF_ADDR >> 17) & 03;
|
||||
regs->dmlotc = 5;
|
||||
regs->comm = SII_DMA | SII_INXFER | SII_ATN |
|
||||
(regs->cstat & SII_STATE_MSK) | SII_MSG_OUT_PHASE;
|
||||
|
@ -1554,11 +1655,17 @@ sii_DoSync(regs, state)
|
|||
sii_DumpLog(); /* XXX */
|
||||
return;
|
||||
}
|
||||
|
||||
/* clear the DNE, other errors handled later */
|
||||
regs->dstat = SII_DNE;
|
||||
regs->comm = regs->comm & SII_STATE_MSK;
|
||||
MachEmptyWriteBuffer();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
SII_WAIT_UNTIL(dstat, regs->dstat, dstat & (SII_CI | SII_DI),
|
||||
SII_WAIT_COUNT, i);
|
||||
printf("sii_DoSync: ds %x cm %x i %d lotc %d\n",
|
||||
dstat, regs->comm, i, regs->dmlotc); /* XXX */
|
||||
#endif
|
||||
|
||||
state->dmaReqAck = len;
|
||||
}
|
||||
|
@ -1576,12 +1683,12 @@ sii_StartDMA(regs, phase, dmaAddr, size)
|
|||
{
|
||||
|
||||
if (regs->dstat & SII_DNE) { /* XXX */
|
||||
regs->dstat = SII_DNE;
|
||||
printf("sii_StartDMA: DNE set\n");
|
||||
sii_DumpLog();
|
||||
regs->dstat = SII_DNE;
|
||||
}
|
||||
regs->dmaddrl = ((unsigned)dmaAddr >> 1);
|
||||
regs->dmaddrh = ((unsigned)dmaAddr >> 17) & 03;
|
||||
regs->dmaddrl = ((u_long)dmaAddr >> 1);
|
||||
regs->dmaddrh = ((u_long)dmaAddr >> 17) & 03;
|
||||
regs->dmlotc = size;
|
||||
regs->comm = SII_DMA | SII_INXFER | (regs->cstat & SII_STATE_MSK) |
|
||||
phase;
|
||||
|
@ -1589,7 +1696,7 @@ sii_StartDMA(regs, phase, dmaAddr, size)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (sii_debug > 5) {
|
||||
printf("sii_StartDMA: cs 0x%x, ds 0x%x, cm 0x%x, size %d\n",
|
||||
printf("sii_StartDMA: cs 0x%x, ds 0x%x, cm 0x%x, size %d\n",
|
||||
regs->cstat, regs->dstat, regs->comm, size);
|
||||
}
|
||||
#endif
|
||||
|
@ -1646,11 +1753,13 @@ sii_DumpLog()
|
|||
sii_debug_sz);
|
||||
lp = sii_logp;
|
||||
do {
|
||||
printf("target %d cs %x ds %x cm %x msg %x\n",
|
||||
lp->target, lp->cstat, lp->dstat, lp->comm, lp->msg);
|
||||
printf("target %d cs %x ds %x cm %x msg %x rlen %x dlen %x\n",
|
||||
lp->target, lp->cstat, lp->dstat, lp->comm, lp->msg,
|
||||
lp->rlen, lp->dlen);
|
||||
if (++lp >= &sii_log[NLOG])
|
||||
lp = sii_log;
|
||||
} while (lp != sii_logp);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)siireg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: siireg.h,v 1.2 1994/05/27 08:40:06 glass Exp $
|
||||
* $Id: siireg.h,v 1.3 1994/05/27 08:59:36 glass Exp $
|
||||
*
|
||||
* sii.h --
|
||||
*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)tz.c 8.4 (Berkeley) 1/11/94
|
||||
* $Id: tz.c,v 1.2 1994/05/27 08:40:08 glass Exp $
|
||||
* $Id: tz.c,v 1.3 1994/05/27 08:59:40 glass Exp $
|
||||
*
|
||||
* from: Header: /sprite/src/kernel/dev/RCS/devSCSITape.c,
|
||||
* v 8.14 89/07/31 17:26:13 mendel Exp SPRITE (Berkeley)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)xcfb.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: xcfb.c,v 1.2 1994/05/27 08:40:11 glass Exp $
|
||||
* $Id: xcfb.c,v 1.3 1994/05/27 08:59:43 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -77,7 +77,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/devGraphics.c,
|
||||
* v 9.2 90/02/13 22:16:24 shirriff Exp SPRITE (DECWRL)";
|
||||
* $Id: xcfb.c,v 1.2 1994/05/27 08:40:11 glass Exp $
|
||||
* $Id: xcfb.c,v 1.3 1994/05/27 08:59:43 glass Exp $
|
||||
*/
|
||||
|
||||
#include <xcfb.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)xcfbreg.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: xcfbreg.h,v 1.2 1994/05/27 08:40:13 glass Exp $
|
||||
* $Id: xcfbreg.h,v 1.3 1994/05/27 08:59:45 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# from: @(#)README 8.1 (Berkeley) 6/10/93
|
||||
# $Id: README,v 1.2 1994/05/27 08:40:16 glass Exp $
|
||||
# $Id: README,v 1.3 1994/05/27 08:59:49 glass Exp $
|
||||
|
||||
The scripts needed to build a boot tape for 4.2 and beyond
|
||||
live here. Before trying anything look at the scripts
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# from: @(#)README_TOO 8.1 (Berkeley) 6/29/93
|
||||
# $Id: README_TOO,v 1.2 1994/05/27 08:40:18 glass Exp $
|
||||
# $Id: README_TOO,v 1.3 1994/05/27 08:59:52 glass Exp $
|
||||
|
||||
Sun Mar 29 22:19:51 PST 1992
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# SUCH DAMAGE.
|
||||
#
|
||||
# from: @(#)buildmini 7.3 (Berkeley) 6/10/93
|
||||
# $Id: buildmini,v 1.2 1994/05/27 08:40:20 glass Exp $
|
||||
# $Id: buildmini,v 1.3 1994/05/27 08:59:54 glass Exp $
|
||||
#
|
||||
|
||||
dist=/sys/pmax/dist
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# SUCH DAMAGE.
|
||||
#
|
||||
# from: @(#)get 8.2 (Berkeley) 11/30/93
|
||||
# $Id: get,v 1.2 1994/05/27 08:40:21 glass Exp $
|
||||
# $Id: get,v 1.3 1994/05/27 08:59:59 glass Exp $
|
||||
#
|
||||
|
||||
# Shell script to build a mini-root file system in preparation for building
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# SUCH DAMAGE.
|
||||
#
|
||||
# from: @(#)maketape 8.1 (Berkeley) 6/10/93
|
||||
# $Id: maketape,v 1.2 1994/05/27 08:40:23 glass Exp $
|
||||
# $Id: maketape,v 1.3 1994/05/27 09:00:05 glass Exp $
|
||||
#
|
||||
|
||||
# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
* $Id: ansi.h,v 1.3 1994/05/27 08:40:28 glass Exp $
|
||||
* $Id: ansi.h,v 1.4 1994/05/27 09:00:21 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ANSI_H_
|
||||
|
|
|
@ -31,78 +31,9 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: aout_machdep.h,v 1.3 1994/05/27 08:40:35 glass Exp $
|
||||
* $Id: aout_machdep.h,v 1.4 1994/05/27 09:00:56 glass Exp $
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(X) __LDPGSZ
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
#define N_DATADDR(ex) \
|
||||
(N_TXTADDR(ex) + ((ex).a_magic == OMAGIC ? (ex).a_text \
|
||||
: __LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Text segment offset. */
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).a_magic == ZMAGIC ? 0 : sizeof(struct exec))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + ((ex).a_magic != ZMAGIC ? (ex).a_text : \
|
||||
__LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Symbol table offset. */
|
||||
#define N_SYMOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).a_text + (ex).a_data + (ex).a_trsize + \
|
||||
(ex).a_drsize)
|
||||
|
||||
/* String table offset. */
|
||||
#define N_STROFF(ex) (N_SYMOFF(ex) + (ex).a_syms)
|
||||
|
||||
/* Description of the object file header (a.out format). */
|
||||
struct exec {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
u_short a_mid; /* machine ID */
|
||||
u_short a_magic; /* magic number */
|
||||
#else
|
||||
u_short a_magic; /* magic number */
|
||||
u_short a_mid; /* machine ID */
|
||||
#endif
|
||||
|
||||
u_long a_text; /* text segment size */
|
||||
u_long a_data; /* initialized data size */
|
||||
u_long a_bss; /* uninitialized data size */
|
||||
u_long a_syms; /* symbol table size */
|
||||
u_long a_entry; /* entry point */
|
||||
u_long a_trsize; /* text relocation size */
|
||||
u_long a_drsize; /* data relocation size */
|
||||
};
|
||||
|
||||
#define a_machtype a_mid /* SUN compatibility */
|
||||
|
||||
#define MID_ZERO 0 /* unknown - implementation dependent */
|
||||
#define MID_SUN010 1 /* sun 68010/68020 binary */
|
||||
#define MID_SUN020 2 /* sun 68020-only binary */
|
||||
#define MID_SUN_SPARC 3 /* sparc binary */
|
||||
#define MID_386 100 /* Intel 80386 binary */
|
||||
#define MID_29K 101 /* AMD 29000 binary */
|
||||
#define MID_MIPSI 151 /* MIPS R2000/R3000 binary */
|
||||
#define MID_MIPSII 152 /* MIPS R4000 binary */
|
||||
#define MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||
#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
||||
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
#include <machine/reloc.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cpu.h 8.4 (Berkeley) 1/4/94
|
||||
* $Id: cpu.h,v 1.5 1994/05/27 08:40:30 glass Exp $
|
||||
* $Id: cpu.h,v 1.6 1994/05/27 09:00:32 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CPU_H_
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dc7085cons.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dc7085cons.h,v 1.2 1994/05/27 08:40:32 glass Exp $
|
||||
* $Id: dc7085cons.h,v 1.3 1994/05/27 09:00:37 glass Exp $
|
||||
*
|
||||
* dc7085.h --
|
||||
*
|
||||
|
@ -51,7 +51,7 @@
|
|||
* from: Header: /sprite/src/kernel/dev/ds3100.md/RCS/dc7085.h,
|
||||
*
|
||||
* v 1.4 89/08/15 19:52:46 rab Exp SPRITE (DECWRL)
|
||||
* $Id: dc7085cons.h,v 1.2 1994/05/27 08:40:32 glass Exp $
|
||||
* $Id: dc7085cons.h,v 1.3 1994/05/27 09:00:37 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DC7085
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dec_boot.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dec_boot.h,v 1.2 1994/05/27 08:42:34 glass Exp $
|
||||
* $Id: dec_boot.h,v 1.3 1994/05/27 09:05:01 glass Exp $
|
||||
*
|
||||
* devDiskLabel.h --
|
||||
*
|
||||
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/dev/RCS/devDiskLabel.h,
|
||||
* v 9.4 90/03/01 12:22:36 jhh Exp SPRITE (Berkeley)
|
||||
* $Id: dec_boot.h,v 1.2 1994/05/27 08:42:34 glass Exp $
|
||||
* $Id: dec_boot.h,v 1.3 1994/05/27 09:05:01 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dec_exec.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dec_exec.h,v 1.2 1994/05/27 08:42:35 glass Exp $
|
||||
* $Id: dec_exec.h,v 1.3 1994/05/27 09:05:06 glass Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dec_prom.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dec_prom.h,v 1.2 1994/05/27 08:42:38 glass Exp $
|
||||
* $Id: dec_prom.h,v 1.3 1994/05/27 09:05:13 glass Exp $
|
||||
*
|
||||
* machMon.h --
|
||||
*
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
* 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 Adam Glass.
|
||||
* 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 Adam Glass ``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 Adam Glass 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.
|
||||
*
|
||||
* $Id: ecoff.h,v 1.1 1994/05/27 09:00:43 glass Exp $
|
||||
*/
|
||||
|
||||
#define ECOFF_PAD
|
||||
|
||||
#define ECOFF_MACHDEP \
|
||||
u_long ea_gprmask; \
|
||||
u_long ea_cprmask[4]; \
|
||||
u_long ea_gp_value
|
||||
|
||||
#define ECOFF_MAGIC_MIPSEL 0x0162
|
||||
#define ECOFF_BADMAG(ex) (ex->ef_magic != ECOFF_MAGIC_MIPSEL)
|
||||
|
||||
#define ECOFF_TXTOFF_ROUND(eap) \
|
||||
(eap->ea_vstamp < 23 ? 7 : 15)
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Adam Glass
|
||||
* 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 Adam Glass.
|
||||
* 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 Adam Glass ``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 Adam Glass 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.
|
||||
*
|
||||
* $Id: ecoff_machdep.h,v 1.1 1994/05/27 09:00:43 glass Exp $
|
||||
*/
|
||||
|
||||
#define ECOFF_PAD
|
||||
|
||||
#define ECOFF_MACHDEP \
|
||||
u_long ea_gprmask; \
|
||||
u_long ea_cprmask[4]; \
|
||||
u_long ea_gp_value
|
||||
|
||||
#define ECOFF_MAGIC_MIPSEL 0x0162
|
||||
#define ECOFF_BADMAG(ex) (ex->ef_magic != ECOFF_MAGIC_MIPSEL)
|
||||
|
||||
#define ECOFF_TXTOFF_ROUND(eap) \
|
||||
(eap->ea_vstamp < 23 ? 7 : 15)
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)endian.h 8.1 (Berkeley) 6/11/93
|
||||
* $Id: endian.h,v 1.2 1994/05/27 08:40:34 glass Exp $
|
||||
* $Id: endian.h,v 1.3 1994/05/27 09:00:49 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ENDIAN_H_
|
||||
|
|
|
@ -31,78 +31,9 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)exec.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: exec.h,v 1.3 1994/05/27 08:40:35 glass Exp $
|
||||
* $Id: exec.h,v 1.4 1994/05/27 09:00:56 glass Exp $
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
/* Size of a page in an object file. */
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
/* Valid magic number check. */
|
||||
#define N_BADMAG(ex) \
|
||||
((ex).a_magic != NMAGIC && (ex).a_magic != OMAGIC && \
|
||||
(ex).a_magic != ZMAGIC)
|
||||
|
||||
/* Address of the bottom of the text segment. */
|
||||
#define N_TXTADDR(X) __LDPGSZ
|
||||
|
||||
/* Address of the bottom of the data segment. */
|
||||
#define N_DATADDR(ex) \
|
||||
(N_TXTADDR(ex) + ((ex).a_magic == OMAGIC ? (ex).a_text \
|
||||
: __LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Text segment offset. */
|
||||
#define N_TXTOFF(ex) \
|
||||
((ex).a_magic == ZMAGIC ? 0 : sizeof(struct exec))
|
||||
|
||||
/* Data segment offset. */
|
||||
#define N_DATOFF(ex) \
|
||||
(N_TXTOFF(ex) + ((ex).a_magic != ZMAGIC ? (ex).a_text : \
|
||||
__LDPGSZ + ((ex).a_text - 1 & ~(__LDPGSZ - 1))))
|
||||
|
||||
/* Symbol table offset. */
|
||||
#define N_SYMOFF(ex) \
|
||||
(N_TXTOFF(ex) + (ex).a_text + (ex).a_data + (ex).a_trsize + \
|
||||
(ex).a_drsize)
|
||||
|
||||
/* String table offset. */
|
||||
#define N_STROFF(ex) (N_SYMOFF(ex) + (ex).a_syms)
|
||||
|
||||
/* Description of the object file header (a.out format). */
|
||||
struct exec {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
u_short a_mid; /* machine ID */
|
||||
u_short a_magic; /* magic number */
|
||||
#else
|
||||
u_short a_magic; /* magic number */
|
||||
u_short a_mid; /* machine ID */
|
||||
#endif
|
||||
|
||||
u_long a_text; /* text segment size */
|
||||
u_long a_data; /* initialized data size */
|
||||
u_long a_bss; /* uninitialized data size */
|
||||
u_long a_syms; /* symbol table size */
|
||||
u_long a_entry; /* entry point */
|
||||
u_long a_trsize; /* text relocation size */
|
||||
u_long a_drsize; /* data relocation size */
|
||||
};
|
||||
|
||||
#define a_machtype a_mid /* SUN compatibility */
|
||||
|
||||
#define MID_ZERO 0 /* unknown - implementation dependent */
|
||||
#define MID_SUN010 1 /* sun 68010/68020 binary */
|
||||
#define MID_SUN020 2 /* sun 68020-only binary */
|
||||
#define MID_SUN_SPARC 3 /* sparc binary */
|
||||
#define MID_386 100 /* Intel 80386 binary */
|
||||
#define MID_29K 101 /* AMD 29000 binary */
|
||||
#define MID_MIPSI 151 /* MIPS R2000/R3000 binary */
|
||||
#define MID_MIPSII 152 /* MIPS R4000 binary */
|
||||
#define MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||
#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
||||
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
#include <machine/reloc.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)float.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: float.h,v 1.2 1994/05/27 08:40:36 glass Exp $
|
||||
* $Id: float.h,v 1.3 1994/05/27 09:01:04 glass Exp $
|
||||
*/
|
||||
|
||||
#define FLT_RADIX 2 /* b */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kdbparam.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: kdbparam.h,v 1.2 1994/05/27 08:40:38 glass Exp $
|
||||
* $Id: kdbparam.h,v 1.3 1994/05/27 09:01:10 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
* $Id: limits.h,v 1.3 1994/05/27 08:40:39 glass Exp $
|
||||
* $Id: limits.h,v 1.4 1994/05/27 09:01:15 glass Exp $
|
||||
*/
|
||||
|
||||
#define CHAR_BIT 8 /* number of bits in a char */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machAsmDefs.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: machAsmDefs.h,v 1.2 1994/05/27 08:40:41 glass Exp $
|
||||
* $Id: machAsmDefs.h,v 1.3 1994/05/27 09:01:19 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsmDefs.h,
|
||||
* v 1.2 89/08/15 18:28:24 rab Exp SPRITE (DECWRL)
|
||||
* $Id: machAsmDefs.h,v 1.2 1994/05/27 08:40:41 glass Exp $
|
||||
* $Id: machAsmDefs.h,v 1.3 1994/05/27 09:01:19 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHASMDEFS
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machConst.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: machConst.h,v 1.2 1994/05/27 08:40:42 glass Exp $
|
||||
* $Id: machConst.h,v 1.3 1994/05/27 09:01:23 glass Exp $
|
||||
*
|
||||
* machConst.h --
|
||||
*
|
||||
|
@ -54,7 +54,7 @@
|
|||
* v 1.2 89/08/15 18:28:21 rab Exp SPRITE (DECWRL)
|
||||
* from: Header: /sprite/src/kernel/vm/ds3100.md/RCS/vmPmaxConst.h,
|
||||
* v 9.1 89/09/18 17:33:00 shirriff Exp SPRITE (DECWRL)
|
||||
* $Id: machConst.h,v 1.2 1994/05/27 08:40:42 glass Exp $
|
||||
* $Id: machConst.h,v 1.3 1994/05/27 09:01:23 glass Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHCONST
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)mips_opcode.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: mips_opcode.h,v 1.2 1994/05/27 08:40:44 glass Exp $
|
||||
* $Id: mips_opcode.h,v 1.3 1994/05/27 09:01:30 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,14 +37,17 @@
|
|||
*
|
||||
* from: Utah Hdr: machparam.h 1.11 89/08/14
|
||||
*
|
||||
*
|
||||
* from: @(#)param.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: param.h,v 1.3 1994/05/27 08:40:45 glass Exp $
|
||||
* $Id: param.h,v 1.4 1994/05/27 09:01:33 glass Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Machine dependent constants for DEC Station 3100.
|
||||
*/
|
||||
#define MACHINE "mips"
|
||||
#define MACHINE "pmax"
|
||||
#define MACHINE_ARCH "mips"
|
||||
#define MID_MACHINE MID_PMAX
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue