summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 09:45:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 09:45:47 +0000
commit41ae123ec2d77615cd0b0476ff62564bd7a4865f (patch)
treeba6a57d3a8d7d725a5e0ae64e8401ed3bea0efb9 /sys/arch/alpha/include
parent7a0b7f798c45842a34a4c6413f45e1b3824154a5 (diff)
sync to 0616, retaining local diffs
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/ansi.h3
-rw-r--r--sys/arch/alpha/include/asm.h6
-rw-r--r--sys/arch/alpha/include/autoconf.h19
-rw-r--r--sys/arch/alpha/include/bus.h218
-rw-r--r--sys/arch/alpha/include/cdefs.h4
-rw-r--r--sys/arch/alpha/include/cfbreg.h59
-rw-r--r--sys/arch/alpha/include/coff.h109
-rw-r--r--sys/arch/alpha/include/cpu.h6
-rw-r--r--sys/arch/alpha/include/ecoff.h72
-rw-r--r--sys/arch/alpha/include/eisa_machdep.h0
-rw-r--r--sys/arch/alpha/include/fbio.h173
-rw-r--r--sys/arch/alpha/include/intr.h (renamed from sys/arch/alpha/include/pci_machdep.h)22
-rw-r--r--sys/arch/alpha/include/intrcnt.h70
-rw-r--r--sys/arch/alpha/include/kbio.h117
-rw-r--r--sys/arch/alpha/include/limits.h61
-rw-r--r--sys/arch/alpha/include/param.h6
-rw-r--r--sys/arch/alpha/include/prom.h3
-rw-r--r--sys/arch/alpha/include/psl.h7
-rw-r--r--sys/arch/alpha/include/pte.h4
-rw-r--r--sys/arch/alpha/include/rpb.h5
-rw-r--r--sys/arch/alpha/include/sfbreg.h96
-rw-r--r--sys/arch/alpha/include/sysarch.h (renamed from sys/arch/alpha/include/isa_machdep.h)29
-rw-r--r--sys/arch/alpha/include/tc_machdep.h92
-rw-r--r--sys/arch/alpha/include/tgareg.h159
-rw-r--r--sys/arch/alpha/include/vuid_event.h87
-rw-r--r--sys/arch/alpha/include/wsconsio.h61
26 files changed, 1180 insertions, 308 deletions
diff --git a/sys/arch/alpha/include/ansi.h b/sys/arch/alpha/include/ansi.h
index 7502ca628f9..77ee9bbf2bb 100644
--- a/sys/arch/alpha/include/ansi.h
+++ b/sys/arch/alpha/include/ansi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ansi.h,v 1.3 1995/11/23 02:35:41 cgd Exp $ */
+/* $NetBSD: ansi.h,v 1.4 1996/03/16 01:31:45 jtc Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -73,6 +73,7 @@ typedef struct {
* defined for ctype.h.
*/
#define _BSD_WCHAR_T_ int /* wchar_t */
+#define _BSD_WINT_T_ int /* wint_t */
#define _BSD_RUNE_T_ int /* rune_t */
#endif /* _ANSI_H_ */
diff --git a/sys/arch/alpha/include/asm.h b/sys/arch/alpha/include/asm.h
index e76b4c586a1..8b54d605f69 100644
--- a/sys/arch/alpha/include/asm.h
+++ b/sys/arch/alpha/include/asm.h
@@ -1,7 +1,7 @@
-/* $NetBSD: asm.h,v 1.2 1995/11/23 02:35:45 cgd Exp $ */
+/* $NetBSD: asm.h,v 1.4 1996/04/12 01:36:51 cgd Exp $ */
/*
- * Copyright (c) 1991,1990,1989,1994,1995 Carnegie Mellon University
+ * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
@@ -600,6 +600,6 @@ _name_:; \
#define MF_FPCR(x) mf_fpcr x
#define MT_FPCR(x) mt_fpcr x
-#define JMP(loc) br zero,loc
+#define JMP(loc) jmp zero,loc
#define CONST(c,reg) ldiq reg, c
diff --git a/sys/arch/alpha/include/autoconf.h b/sys/arch/alpha/include/autoconf.h
index d4a10dd402f..78e62bc8a22 100644
--- a/sys/arch/alpha/include/autoconf.h
+++ b/sys/arch/alpha/include/autoconf.h
@@ -1,7 +1,7 @@
-/* $NetBSD: autoconf.h,v 1.2 1995/11/23 02:35:50 cgd Exp $ */
+/* $NetBSD: autoconf.h,v 1.2.4.2 1996/06/13 18:35:23 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
@@ -69,6 +69,17 @@ struct confargs {
struct abus *ca_bus; /* bus device resides on. */
};
+struct bootdev_data {
+ char *protocol;
+ int bus;
+ int slot;
+ int channel;
+ char *remote_address;
+ int unit;
+ int boot_dev_type;
+ char *ctrl_dev_type;
+};
+
void set_clockintr __P((void));
void set_iointr __P((void (*)(void *, int)));
int badaddr __P((void *, u_int64_t));
@@ -76,3 +87,7 @@ int badaddr __P((void *, u_int64_t));
#ifdef EVCNT_COUNTERS
extern struct evcnt clock_intr_evcnt;
#endif
+
+extern struct device *booted_device;
+extern int booted_partition;
+extern struct bootdev_data *bootdev_data;
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h
new file mode 100644
index 00000000000..5f3e8334261
--- /dev/null
+++ b/sys/arch/alpha/include/bus.h
@@ -0,0 +1,218 @@
+/* $NetBSD: bus.h,v 1.2.4.2 1996/06/13 17:44:45 cgd Exp $ */
+
+/*
+ * Copyright (c) 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _ALPHA_BUS_H_
+#define _ALPHA_BUS_H_
+
+/*
+ * I/O addresses (in bus space)
+ */
+typedef u_long bus_io_addr_t;
+typedef u_long bus_io_size_t;
+
+/*
+ * Memory addresses (in bus space)
+ */
+typedef u_long bus_mem_addr_t;
+typedef u_long bus_mem_size_t;
+
+/*
+ * Access methods for bus resources, I/O space, and memory space.
+ */
+typedef struct alpha_bus_chipset *bus_chipset_tag_t;
+typedef u_long bus_io_handle_t;
+typedef u_long bus_mem_handle_t;
+
+struct alpha_bus_chipset {
+ /* I/O-space cookie */
+ void *bc_i_v;
+
+ /* I/O-space control functions */
+ int (*bc_i_map) __P((void *v, bus_io_addr_t port,
+ bus_io_size_t size, bus_io_handle_t *iohp));
+ void (*bc_i_unmap) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t size));
+ int (*bc_i_subregion) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t offset, bus_io_size_t size,
+ bus_io_handle_t *nioh));
+
+ /* I/O-space read functions */
+ u_int8_t (*bc_ir1) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off));
+ u_int16_t (*bc_ir2) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off));
+ u_int32_t (*bc_ir4) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off));
+ u_int64_t (*bc_ir8) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off));
+
+ /* I/O-space read-multiple functions */
+ void (*bc_irm1) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int8_t *addr,
+ bus_io_size_t count));
+ void (*bc_irm2) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int16_t *addr,
+ bus_io_size_t count));
+ void (*bc_irm4) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int32_t *addr,
+ bus_io_size_t count));
+ void (*bc_irm8) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int64_t *addr,
+ bus_io_size_t count));
+
+ /* I/O-space write functions */
+ void (*bc_iw1) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int8_t val));
+ void (*bc_iw2) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int16_t val));
+ void (*bc_iw4) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int32_t val));
+ void (*bc_iw8) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, u_int64_t val));
+
+ /* I/O-space write-multiple functions */
+ void (*bc_iwm1) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, const u_int8_t *addr,
+ bus_io_size_t count));
+ void (*bc_iwm2) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, const u_int16_t *addr,
+ bus_io_size_t count));
+ void (*bc_iwm4) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, const u_int32_t *addr,
+ bus_io_size_t count));
+ void (*bc_iwm8) __P((void *v, bus_io_handle_t ioh,
+ bus_io_size_t off, const u_int64_t *addr,
+ bus_io_size_t count));
+
+ /* Mem-space cookie */
+ void *bc_m_v;
+
+ /* Mem-space control functions */
+ int (*bc_m_map) __P((void *v, bus_mem_addr_t buspa,
+ bus_mem_size_t size, int cacheable,
+ bus_mem_handle_t *mhp));
+ void (*bc_m_unmap) __P((void *v, bus_mem_handle_t mh,
+ bus_mem_size_t size));
+ int (*bc_m_subregion) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t offset, bus_mem_size_t size,
+ bus_mem_handle_t *nmemh));
+
+ /* Mem-space read functions */
+ u_int8_t (*bc_mr1) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off));
+ u_int16_t (*bc_mr2) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off));
+ u_int32_t (*bc_mr4) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off));
+ u_int64_t (*bc_mr8) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off));
+
+ /* Mem-space write functions */
+ void (*bc_mw1) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off, u_int8_t val));
+ void (*bc_mw2) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off, u_int16_t val));
+ void (*bc_mw4) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off, u_int32_t val));
+ void (*bc_mw8) __P((void *v, bus_mem_handle_t memh,
+ bus_mem_size_t off, u_int64_t val));
+
+ /* XXX THIS DOES NOT YET BELONG HERE */
+ vm_offset_t (*bc_XXX_dmamap) __P((void *addr));
+};
+
+#define __bc_CONCAT(A,B) __CONCAT(A,B)
+#define __bc_ABC(A,B,C) __bc_CONCAT(A,__bc_CONCAT(B,C))
+#define __bc_ABCD(A,B,C,D) __bc_CONCAT(__bc_ABC(A,B,C),D)
+
+#define __bc_rd(t, h, o, sz, sp) \
+ (*(t)->__bc_ABCD(bc_,sp,r,sz))((t)->__bc_ABC(bc_,sp,_v), h, o)
+
+#define __bc_wr(t, h, o, v, sz, sp) \
+ (*(t)->__bc_ABCD(bc_,sp,w,sz))((t)->__bc_ABC(bc_,sp,_v), h, o, v)
+
+#define bus_io_map(t, port, size, iohp) \
+ (*(t)->bc_i_map)((t)->bc_i_v, (port), (size), (iohp))
+#define bus_io_unmap(t, ioh, size) \
+ (*(t)->bc_i_unmap)((t)->bc_i_v, (ioh), (size))
+#define bus_io_subregion(t, ioh, offset, size, nioh) \
+ (*(t)->bc_i_unmap)((t)->bc_i_v, (ioh), (offset), (size), (nioh))
+
+#define __bc_io_multi(t, h, o, a, s, dir, sz) \
+ (*(t)->__bc_ABCD(bc_i,dir,m,sz))((t)->bc_i_v, h, o, a, s)
+
+#define bus_io_read_1(t, h, o) __bc_rd((t),(h),(o),1,i)
+#define bus_io_read_2(t, h, o) __bc_rd((t),(h),(o),2,i)
+#define bus_io_read_4(t, h, o) __bc_rd((t),(h),(o),4,i)
+#define bus_io_read_8(t, h, o) __bc_rd((t),(h),(o),8,i)
+
+#define bus_io_read_multi_1(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),r,1)
+#define bus_io_read_multi_2(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),r,2)
+#define bus_io_read_multi_4(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),r,4)
+#define bus_io_read_multi_8(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),r,8)
+
+#define bus_io_write_1(t, h, o, v) __bc_wr((t),(h),(o),(v),1,i)
+#define bus_io_write_2(t, h, o, v) __bc_wr((t),(h),(o),(v),2,i)
+#define bus_io_write_4(t, h, o, v) __bc_wr((t),(h),(o),(v),4,i)
+#define bus_io_write_8(t, h, o, v) __bc_wr((t),(h),(o),(v),8,i)
+
+#define bus_io_write_multi_1(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),w,1)
+#define bus_io_write_multi_2(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),w,2)
+#define bus_io_write_multi_4(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),w,4)
+#define bus_io_write_multi_8(t, h, o, a, s) \
+ __bc_io_multi((t),(h),(o),(a),(s),w,8)
+
+#define bus_mem_map(t, bpa, size, cacheable, mhp) \
+ (*(t)->bc_m_map)((t)->bc_m_v, (bpa), (size), (cacheable), (mhp))
+#define bus_mem_unmap(t, memh, size) \
+ (*(t)->bc_m_unmap)((t)->bc_m_v, (memh), (size))
+#define bus_mem_subregion(t, memh, offset, size, nmemh) \
+ (*(t)->bc_m_unmap)((t)->bc_i_v, (memh), (offset), (size), (nmemh))
+
+#define bus_mem_read_1(t, h, o) __bc_rd((t),(h),(o),1,m)
+#define bus_mem_read_2(t, h, o) __bc_rd((t),(h),(o),2,m)
+#define bus_mem_read_4(t, h, o) __bc_rd((t),(h),(o),4,m)
+#define bus_mem_read_8(t, h, o) __bc_rd((t),(h),(o),8,m)
+
+#define bus_mem_write_1(t, h, o, v) __bc_wr((t),(h),(o),(v),1,m)
+#define bus_mem_write_2(t, h, o, v) __bc_wr((t),(h),(o),(v),2,m)
+#define bus_mem_write_4(t, h, o, v) __bc_wr((t),(h),(o),(v),4,m)
+#define bus_mem_write_8(t, h, o, v) __bc_wr((t),(h),(o),(v),8,m)
+
+/* XXX THIS DOES NOT BELONG HERE YET. */
+#define __alpha_bus_XXX_dmamap(t, va) (*(t)->bc_XXX_dmamap)((va))
+
+#endif /* _ALPHA_BUS_H_ */
diff --git a/sys/arch/alpha/include/cdefs.h b/sys/arch/alpha/include/cdefs.h
index d848e59f663..cd705e0db7d 100644
--- a/sys/arch/alpha/include/cdefs.h
+++ b/sys/arch/alpha/include/cdefs.h
@@ -32,9 +32,7 @@
#define _C_LABEL(x) _STRING(x)
-#ifndef lint
-#define __indr_reference(sym,msg) /* nothing */
-#endif
+#define __indr_references(sym,msg) /* nothing */
#define __warn_references(sym,msg) /* nothing */
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/alpha/include/cfbreg.h b/sys/arch/alpha/include/cfbreg.h
new file mode 100644
index 00000000000..3d5c21fb98d
--- /dev/null
+++ b/sys/arch/alpha/include/cfbreg.h
@@ -0,0 +1,59 @@
+/* $NetBSD: cfbreg.h,v 1.1 1996/05/01 23:25:00 cgd Exp $ */
+
+/*
+ * Copyright (c) 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * Color Frame Buffer definitions, from:
+ * ``PMAG-BA TURBOchannel Color Frame Buffer Functional Specification
+ * (Revision 1.2)'', availalable via anonymous FTP from gatekeeper.dec.com.
+ *
+ * All definitions are in "dense" TurboChannel space.
+ */
+
+/*
+ * Size of the CFB address space.
+ */
+#define CFB_SIZE 0x400000
+
+/*
+ * Offsets into slot space of each functional unit.
+ */
+#define CFB_FB_OFFSET 0x000000 /* Frame buffer */
+#define CFB_FB_SIZE 0x100000
+#define CFB_RAMDAC_OFFSET 0x200000 /* Bt495 RAMDAC Registers */
+#define CFB_RAMDAC_SIZE 0x100000
+#define CFB_IREQCTRL_OFFSET 0x300000 /* IReq Control region */
+#define CFB_IREQCTRL_SIZE 0x080000
+
+/*
+ * Bt459 RAMDAC registers (offsets from CFB_RAMDAC_OFFSET)
+ */
+#define CFB_RAMDAC_ADDRLOW 0x0000 /* Address register low byte */
+#define CFB_RAMDAC_ADDRHIGH 0x0004 /* Address register high byte */
+#define CFB_RAMDAC_REGDATA 0x0008 /* Register addressed by addr reg */
+#define CFB_RAMDAC_CMAPDATA 0x000c /* Colormap loc addressed by addr reg */
diff --git a/sys/arch/alpha/include/coff.h b/sys/arch/alpha/include/coff.h
deleted file mode 100644
index 7516cb7e72a..00000000000
--- a/sys/arch/alpha/include/coff.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1992,1993,1994,1995 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/*
- * HISTORY
- * Revision 1.1 1994/06/30 16:29:52 bostic
- * coff.h
- *
- * Revision 2.3 93/01/19 08:59:12 danner
- * Fix TXTOFF to cope with assembler/linker incoherence viz
- * rounding in OMAGIC files.
- * [93/01/15 af]
- *
- * Revision 2.2 93/01/14 17:12:13 danner
- * Adapted for Alpha.
- * [92/05/31 af]
- *
- */
-/*
- * File: coff.h
- * Author: Alessandro Forin, Carnegie Mellon University
- * Date: 10/89
- *
- * Structure definitions for COFF headers
- */
-
-struct filehdr {
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- int f_timdat; /* time & date stamp */
- vm_offset_t f_symptr; /* file pointer to symtab */
- int f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
-};
-
-#define F_EXEC 0000002
-
-#define ALPHAMAGIC 0603
-
-struct scnhdr {
- char s_name[8]; /* section name */
- vm_offset_t s_paddr; /* physical address */
- vm_offset_t s_vaddr; /* virtual address */
- vm_offset_t s_size; /* section size */
- vm_offset_t s_scnptr; /* file ptr to raw data for section */
- vm_offset_t s_relptr; /* file ptr to relocation */
- vm_offset_t s_lnnoptr; /* file ptr to line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries */
- int s_flags; /* flags */
-};
-
-struct aouthdr {
- short magic; /* see magic.h */
- short vstamp; /* version stamp */
- int pad; /* help for cross compilers */
- vm_offset_t tsize; /* text size in bytes, padded to FW */
- vm_offset_t dsize; /* initialized data size */
- vm_offset_t bsize; /* uninitialized data size */
- vm_offset_t entry; /* entry point, value of "start" */
- vm_offset_t text_start; /* base of text used for this file */
- vm_offset_t data_start; /* base of data used for this file */
- vm_offset_t bss_start; /* base of bss used for this file */
- int gprmask; /* general purpose register mask*/
- int fprmask; /* FPA register mask */
- vm_offset_t gp_value; /* the gp value used for this object*/
-};
-
-struct exechdr {
- struct filehdr f;
- struct aouthdr a;
-};
-
-/* Linker and assembler screwed: .o are not aligned, images are */
-#define SCNROUND ((long)16)
-
-#define N_COFFBADMAG(a) \
- ((a).magic != OMAGIC && (a).magic != NMAGIC && (a).magic != ZMAGIC)
-
-#define N_COFFTXTOFF(f, a) \
- (((a).magic == ZMAGIC) ? 0 : \
- (((f).f_flags & F_EXEC) ? \
- (((sizeof(struct filehdr) + sizeof(struct aouthdr) + \
- (f).f_nscns * sizeof(struct scnhdr)) + SCNROUND-1) & ~(SCNROUND-1)) \
- : (sizeof(struct filehdr) + sizeof(struct aouthdr) + \
- (f).f_nscns * sizeof(struct scnhdr))))
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h
index 27ad8c4606c..9c7281cb7f2 100644
--- a/sys/arch/alpha/include/cpu.h
+++ b/sys/arch/alpha/include/cpu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.7 1995/12/21 05:01:32 mycroft Exp $ */
+/* $NetBSD: cpu.h,v 1.7.4.1 1996/06/14 20:42:44 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -115,11 +115,13 @@ extern u_int64_t ssir;
* CTL_MACHDEP definitions.
*/
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
-#define CPU_MAXID 2 /* number of valid machdep ids */
+#define CPU_ROOT_DEVICE 2 /* string: root device name */
+#define CPU_MAXID 3 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
{ "console_device", CTLTYPE_STRUCT }, \
+ { "root_device", CTLTYPE_STRING }, \
}
#endif /* _ALPHA_CPU_H_ */
diff --git a/sys/arch/alpha/include/ecoff.h b/sys/arch/alpha/include/ecoff.h
index 08427556592..b40c2242f2f 100644
--- a/sys/arch/alpha/include/ecoff.h
+++ b/sys/arch/alpha/include/ecoff.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ecoff.h,v 1.2 1995/11/23 02:35:57 cgd Exp $ */
+/* $NetBSD: ecoff.h,v 1.3 1996/05/09 23:47:25 cgd Exp $ */
/*
* Copyright (c) 1994 Adam Glass
@@ -34,47 +34,49 @@
#define ECOFF_LDPGSZ 4096
#define ECOFF_PAD \
- u_short ea_bldrev; /* XXX */
+ u_short bldrev; /* XXX */
#define ECOFF_MACHDEP \
- u_int ea_gprmask; \
- u_int ea_fprmask; \
- u_long ea_gp_value
+ u_int gprmask; \
+ u_int fprmask; \
+ u_long gp_value
#define ECOFF_MAGIC_ALPHA 0603
-#define ECOFF_MAGIC_NATIVE_ALPHA 0605
-#define ECOFF_BADMAG(ex) \
- (ex->ef_magic != ECOFF_MAGIC_ALPHA && \
- ex->ef_magic != ECOFF_MAGIC_NATIVE_ALPHA)
+#define ECOFF_MAGIC_NETBSD_ALPHA 0605
+#define ECOFF_BADMAG(ep) \
+ ((ep)->f.f_magic != ECOFF_MAGIC_ALPHA && \
+ (ep)->f.f_magic != ECOFF_MAGIC_NETBSD_ALPHA)
-#define ECOFF_SEGMENT_ALIGNMENT(eap) (eap->ea_vstamp < 23 ? 8 : 16)
+#define ECOFF_FLAG_EXEC 0002
+#define ECOFF_SEGMENT_ALIGNMENT(ep) \
+ (((ep)->f.f_flags & ECOFF_FLAG_EXEC) == 0 ? 8 : 16)
struct ecoff_symhdr {
- int16_t sh_magic;
- int16_t sh_vstamp;
- int32_t sh_linemax;
- int32_t sh_densenummax;
- int32_t sh_procmax;
- int32_t sh_lsymmax;
- int32_t sh_optsymmax;
- int32_t sh_auxxymmax;
- int32_t sh_lstrmax;
- int32_t sh_estrmax;
- int32_t sh_fdmax;
- int32_t sh_rfdmax;
- int32_t sh_esymmax;
- long sh_linesize;
- long sh_lineoff;
- long sh_densenumoff;
- long sh_procoff;
- long sh_lsymoff;
- long sh_optsymoff;
- long sh_auxsymoff;
- long sh_lstroff;
- long sh_estroff;
- long sh_fdoff;
- long sh_rfdoff;
- long sh_esymoff;
+ int16_t magic;
+ int16_t vstamp;
+ int32_t lineMax;
+ int32_t densenumMax;
+ int32_t procMax;
+ int32_t lsymMax;
+ int32_t optsymMax;
+ int32_t auxsymMax;
+ int32_t lstrMax;
+ int32_t estrMax;
+ int32_t fdMax;
+ int32_t rfdMax;
+ int32_t esymMax;
+ long linesize;
+ long cbLineOffset;
+ long cbDnOffset;
+ long cbPdOffset;
+ long cbSymOffset;
+ long cbOptOffset;
+ long cbAuxOffset;
+ long cbSsOffset;
+ long cbSsExtOffset;
+ long cbFdOffset;
+ long cbRfdOffset;
+ long cbExtOffset;
};
struct ecoff_extsym {
diff --git a/sys/arch/alpha/include/eisa_machdep.h b/sys/arch/alpha/include/eisa_machdep.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/sys/arch/alpha/include/eisa_machdep.h
+++ /dev/null
diff --git a/sys/arch/alpha/include/fbio.h b/sys/arch/alpha/include/fbio.h
new file mode 100644
index 00000000000..dd03eac5793
--- /dev/null
+++ b/sys/arch/alpha/include/fbio.h
@@ -0,0 +1,173 @@
+/* $NetBSD: fbio.h,v 1.2 1996/05/01 19:44:21 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software developed by the Computer Systems
+ * Engineering group at Lawrence Berkeley Laboratory under DARPA
+ * contract BG 91-66 and contributed to Berkeley.
+ *
+ * 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.
+ *
+ * @(#)fbio.h 7.2 (Berkeley) 4/1/92
+ */
+
+/*
+ * Frame buffer ioctls (from Sprite, trimmed to essentials for X11).
+ */
+
+/*
+ * Frame buffer type codes.
+ */
+#define FBTYPE_PM_MONO 0 /* never on the alpha */
+#define FBTYPE_PM_COLOR 1 /* never on the alpha */
+#define FBTYPE_CFB 2 /* CFB (TurboChannel) */
+#define FBTYPE_XCFB 3 /* ??? (TurboChannel) */
+#define FBTYPE_MFB 4 /* MFB (TurboChannel) */
+#define FBTYPE_SFB 5 /* SFB (TurboChannel) */
+#define FBTYPE_VGA 6 /* ISA or EISA VGA */
+#define FBTYPE_PCIVGA 7 /* PCI VGA */
+#define FBTYPE_TGA 8 /* TGA (PCI) */
+#define FBTYPE_SFBP 9 /* SFB+ (TurboChannel) */
+
+#define FBTYPE_LASTPLUSONE 10
+
+/*
+ * Frame buffer descriptor as returned by FBIOGTYPE.
+ */
+struct fbtype {
+ int fb_type; /* as defined above */
+ int fb_height; /* in pixels */
+ int fb_width; /* in pixels */
+ int fb_depth; /* bits per pixel */
+ int fb_cmsize; /* size of color map (entries) */
+ int fb_size; /* total size in bytes */
+};
+#define FBIOGTYPE _IOR('F', 0, struct fbtype)
+
+#ifdef notdef
+/*
+ * General purpose structure for passing info in and out of frame buffers
+ * (used for gp1) -- unsupported.
+ */
+struct fbinfo {
+ int fb_physaddr; /* physical frame buffer address */
+ int fb_hwwidth; /* fb board width */
+ int fb_hwheight; /* fb board height */
+ int fb_addrdelta; /* phys addr diff between boards */
+ u_char *fb_ropaddr; /* fb virtual addr */
+ int fb_unit; /* minor devnum of fb */
+};
+#define FBIOGINFO _IOR('F', 2, struct fbinfo)
+#endif
+
+/*
+ * Color map I/O.
+ */
+struct fbcmap {
+ int index; /* first element (0 origin) */
+ int count; /* number of elements */
+ u_char *red; /* red color map elements */
+ u_char *green; /* green color map elements */
+ u_char *blue; /* blue color map elements */
+};
+#define FBIOPUTCMAP _IOW('F', 3, struct fbcmap)
+#define FBIOGETCMAP _IOW('F', 4, struct fbcmap)
+
+/*
+ * Set/get attributes.
+ */
+#define FB_ATTR_NDEVSPECIFIC 8 /* no. of device specific values */
+#define FB_ATTR_NEMUTYPES 4 /* no. of emulation types */
+
+struct fbsattr {
+ int flags; /* flags; see below */
+ int emu_type; /* emulation type (-1 if unused) */
+ int dev_specific[FB_ATTR_NDEVSPECIFIC]; /* catchall */
+};
+#define FB_ATTR_AUTOINIT 1 /* emulation auto init flag */
+#define FB_ATTR_DEVSPECIFIC 2 /* dev. specific stuff valid flag */
+
+struct fbgattr {
+ int real_type; /* real device type */
+ int owner; /* PID of owner, 0 if myself */
+ struct fbtype fbtype; /* fbtype info for real device */
+ struct fbsattr sattr; /* see above */
+ int emu_types[FB_ATTR_NEMUTYPES]; /* possible emulations */
+ /* (-1 if unused) */
+};
+/* FBIOSATTR _IOW('F', 5, struct fbsattr) -- unsupported */
+#define FBIOGATTR _IOR('F', 6, struct fbgattr)
+
+/*
+ * Video control.
+ */
+#define FBVIDEO_OFF 0
+#define FBVIDEO_ON 1
+
+#define FBIOSVIDEO _IOW('F', 7, int)
+#define FBIOGVIDEO _IOR('F', 8, int)
+
+/*
+ * hardware cursor control
+ */
+struct fbcurpos {
+ short x;
+ short y;
+};
+
+#define FB_CUR_SETCUR 0x01
+#define FB_CUR_SETPOS 0x02
+#define FB_CUR_SETHOT 0x04
+#define FB_CUR_SETCMAP 0x08
+#define FB_CUR_SETSHAPE 0x10
+#define FB_CUR_SETALL 0x1F
+
+struct fbcursor {
+ short set; /* what to set */
+ short enable; /* enable/disable cursor */
+ struct fbcurpos pos; /* cursor's position */
+ struct fbcurpos hot; /* cursor's hot spot */
+ struct fbcmap cmap; /* color map info */
+ struct fbcurpos size; /* cursor's bit map size */
+ char *image; /* cursor's image bits */
+ char *mask; /* cursor's mask bits */
+};
+
+/* set/get cursor attributes/shape */
+#define FBIOSCURSOR _IOW('F', 24, struct fbcursor)
+#define FBIOGCURSOR _IOWR('F', 25, struct fbcursor)
+
+/* set/get cursor position */
+#define FBIOSCURPOS _IOW('F', 26, struct fbcurpos)
+#define FBIOGCURPOS _IOW('F', 27, struct fbcurpos)
+
+/* get max cursor size */
+#define FBIOGCURMAX _IOR('F', 28, struct fbcurpos)
diff --git a/sys/arch/alpha/include/pci_machdep.h b/sys/arch/alpha/include/intr.h
index 5e474e396d2..8baab0eb85a 100644
--- a/sys/arch/alpha/include/pci_machdep.h
+++ b/sys/arch/alpha/include/intr.h
@@ -1,7 +1,7 @@
-/* $NetBSD: pci_machdep.h,v 1.1 1995/11/23 02:36:19 cgd Exp $ */
+/* $NetBSD: intr.h,v 1.1 1996/04/12 01:42:17 cgd Exp $ */
/*
- * Copyright (c) 1995 Carnegie-Mellon University.
+ * Copyright (c) 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
@@ -26,11 +26,15 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*/
-/*
- * Machine-specific definitions for PCI autoconfiguration.
- */
-/*
- * Configuration tag.
- */
-typedef u_long pci_tag_t;
+#define IPL_NONE 0 /* disable only this interrupt */
+#define IPL_BIO 1 /* disable block I/O interrupts */
+#define IPL_NET 2 /* disable network interrupts */
+#define IPL_TTY 3 /* disable terminal interrupts */
+#define IPL_CLOCK 4 /* disable clock interrupts */
+#define IPL_HIGH 5 /* disable all interrupts */
+
+#define IST_NONE 0 /* none (dummy) */
+#define IST_PULSE 1 /* pulsed */
+#define IST_EDGE 2 /* edge-triggered */
+#define IST_LEVEL 3 /* level-triggered */
diff --git a/sys/arch/alpha/include/intrcnt.h b/sys/arch/alpha/include/intrcnt.h
index abf39d0fc9c..046db247e30 100644
--- a/sys/arch/alpha/include/intrcnt.h
+++ b/sys/arch/alpha/include/intrcnt.h
@@ -1,4 +1,31 @@
+/* $NetBSD: intrcnt.h,v 1.4.4.2 1996/06/05 03:42:24 cgd Exp $ */
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
#define INTRNAMES_DEFINITION \
/* 0x00 */ ASCIZ "clock"; \
@@ -49,20 +76,49 @@
ASCIZ "kn20aa irq 28"; \
ASCIZ "kn20aa irq 29"; \
ASCIZ "kn20aa irq 30"; \
-/* 0x30 */ ASCIZ "kn20aa irq 31";
+/* 0x30 */ ASCIZ "kn20aa irq 31"; \
+ ASCIZ "kn15 tc slot 0"; \
+ ASCIZ "kn15 tc slot 1"; \
+ ASCIZ "kn15 tc slot 2"; \
+ ASCIZ "kn15 tc slot 3"; \
+ ASCIZ "kn15 tc slot 4"; \
+ ASCIZ "kn15 tc slot 5"; \
+ ASCIZ "kn15 tcds"; \
+ ASCIZ "kn15 ioasic"; \
+ ASCIZ "kn15 sfb"; \
+ ASCIZ "kn16 tc slot 0"; \
+ ASCIZ "kn16 tc slot 1"; \
+ ASCIZ "kn16 tcds"; \
+ ASCIZ "kn16 ioasic"; \
+ ASCIZ "kn16 sfb"; \
+ ASCIZ "tcds esp 0"; \
+/* 0x40 */ ASCIZ "tcds esp 1"; \
+ ASCIZ "ioasic le"; \
+ ASCIZ "ioasic scc 0"; \
+ ASCIZ "ioasic scc 1"; \
+ ASCIZ "ioasic am79c30";
#define INTRCNT_DEFINITION \
/* 0x00 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
/* 0x10 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
/* 0x20 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
-/* 0x30 */ .quad 0;
+/* 0x30 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
+/* 0x40 */ .quad 0, 0, 0, 0, 0;
#define INTRCNT_CLOCK 0
-#define INTRCNT_ISA_IRQ (INTRCNT_CLOCK + 1)
+#define INTRCNT_ISA_IRQ (INTRCNT_CLOCK + 1)
#define INTRCNT_ISA_IRQ_LEN 16
-#define INTRCNT_KN20AA_IRQ (INTRCNT_ISA_IRQ + INTRCNT_ISA_IRQ_LEN)
-#define INTRCNT_KN20AA_IRQ_LEN 32
+#define INTRCNT_KN20AA_IRQ (INTRCNT_ISA_IRQ + INTRCNT_ISA_IRQ_LEN)
+#define INTRCNT_KN20AA_IRQ_LEN 32
+#define INTRCNT_KN15 (INTRCNT_KN20AA_IRQ + INTRCNT_KN20AA_IRQ_LEN)
+#define INTRCNT_KN15_LEN 9
+#define INTRCNT_KN16 (INTRCNT_KN15 + INTRCNT_KN15_LEN)
+#define INTRCNT_KN16_LEN 5
+#define INTRCNT_TCDS (INTRCNT_KN16 + INTRCNT_KN16_LEN)
+#define INTRCNT_TCDS_LEN 2
+#define INTRCNT_IOASIC (INTRCNT_TCDS + INTRCNT_TCDS_LEN)
+#define INTRCNT_IOASIC_LEN 4
-#ifndef LOCORE
-extern long intrcnt[];
+#ifndef _LOCORE
+extern volatile long intrcnt[];
#endif
diff --git a/sys/arch/alpha/include/kbio.h b/sys/arch/alpha/include/kbio.h
new file mode 100644
index 00000000000..f785fdce2e3
--- /dev/null
+++ b/sys/arch/alpha/include/kbio.h
@@ -0,0 +1,117 @@
+/* $NetBSD: kbio.h,v 1.1 1996/04/12 01:45:45 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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, Lawrence Berkeley Laboratory.
+ *
+ * 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.
+ *
+ * @(#)kbio.h 8.1 (Berkeley) 6/11/93
+ */
+
+#if 0 /* XXX */
+/*
+ * The following is a minimal emulation of Sun's `kio' structures
+ * and related operations necessary to make X11 happy (i.e., make it
+ * compile, and make old X11 binaries run).
+ */
+
+/*
+ * The kiockey structure apparently gets and/or sets keyboard mappings.
+ * It seems to be kind of useless, but X11 uses it (according to the
+ * comments) to figure out when a Sun 386i has a type-4 keyboard but
+ * claims to have a type-3 keyboard. We need just enough to cause the
+ * appropriate ioctl to return the appropriate magic value.
+ *
+ * KIOCGETKEY fills in kio_entry from kio_station. Not sure what tablemask
+ * is for; X sets it before the call, so it is not an output, but we do not
+ * care anyway. KIOCSDIRECT is supposed to tell the kernel whether to send
+ * keys to the console or to X; we just send them to X whenever the keyboard
+ * is open at all. (XXX may need to change this later)
+ *
+ * Keyboard commands and types are defined in kbd.h as they are actually
+ * real hardware commands and type numbers.
+ */
+struct okiockey { /* Out-dated key translation structure */
+ int kio_tablemask; /* whatever */
+ u_char kio_station; /* key number */
+ u_char kio_entry; /* HOLE if not present */
+ char kio_text[10]; /* the silly escape sequences (unsupported) */
+};
+
+struct kiockey {
+ int kio_tablemask; /* whatever */
+ u_char kio_station; /* key number */
+ u_short kio_entry; /* HOLE if not present */
+ char kio_text[10]; /* the silly escape sequences (unsupported) */
+};
+
+/*
+ * Values for kio_tablemask. These determine which table to read/modify
+ * in KIOC[SG]KEY ioctls. Currently, we only have "non-shift" and "shift"
+ * tables.
+ */
+#define KIOC_NOMASK 0x0
+#define KIOC_CAPSMASK 0x1
+#define KIOC_SHIFTMASK 0xe
+#define KIOC_CTRLMASK 0x30
+#define KIOC_ALTGMASK 0x200
+#define KIOC_NUMLMASK 0x800
+
+#define HOLE 0x302 /* value for kio_entry to say `really type 3' */
+
+#define KIOCTRANS _IOW('k', 0, int) /* set translation mode */
+ /* (we only accept TR_UNTRANS_EVENT) */
+#define KIOCGETKEY _IOWR('k', 2, struct okiockey) /* fill in kio_entry */
+#define KIOCGTRANS _IOR('k', 5, int) /* get translation mode */
+#define KIOCCMD _IOW('k', 8, int) /* X uses this to ring bell */
+#define KIOCTYPE _IOR('k', 9, int) /* get keyboard type */
+#endif /* 0 XXX */
+#define KIOCSDIRECT _IOW('k', 10, int) /* keys to console? */
+#if 0 /* XXX */
+#define KIOCSKEY _IOW('k', 12, struct kiockey) /* set xlat mode */
+#define KIOCGKEY _IOWR('k', 13, struct kiockey) /* get xlat mode */
+#define KIOCLAYOUT _IOR('k', 20, int) /* get keyboard layout */
+#define KIOCSLED _IOW('k', 14, char) /* set LED state */
+#define KIOCGLED _IOR('k', 15, char) /* get LED state */
+
+#define TR_NONE 0 /* X compat, unsupported */
+#define TR_ASCII 1 /* X compat, unsupported */
+#define TR_EVENT 2 /* X compat, unsupported */
+#define TR_UNTRANS_EVENT 3
+#endif /* 0 XXX */
diff --git a/sys/arch/alpha/include/limits.h b/sys/arch/alpha/include/limits.h
index 7fb490baef2..16cd93da86b 100644
--- a/sys/arch/alpha/include/limits.h
+++ b/sys/arch/alpha/include/limits.h
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.1 1995/02/13 23:07:41 cgd Exp $ */
+/* $NetBSD: limits.h,v 1.2 1996/04/12 01:38:25 cgd Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -48,37 +48,48 @@
* These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values
* are written as hex so that GCC will be quiet about large integer constants.
*/
-#define SCHAR_MAX 127 /* min value for a signed char */
-#define SCHAR_MIN (-128) /* max value for a signed char */
+#define SCHAR_MAX 0x7f /* max value for a signed char */
+#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-#define UCHAR_MAX 255 /* max value for an unsigned char */
-#define CHAR_MAX 127 /* max value for a char */
-#define CHAR_MIN (-128) /* min value for a char */
+#define UCHAR_MAX 0xffU /* max value for an unsigned char */
+#define CHAR_MAX 0x7f /* max value for a char */
+#define CHAR_MIN (-0x7f-1) /* min value for a char */
-#define USHRT_MAX 65535 /* max value for an unsigned short */
-#define SHRT_MAX 32767 /* max value for a short */
-#define SHRT_MIN (-32768) /* min value for a short */
+#define USHRT_MAX 0xffffU /* max value for an unsigned short */
+#define SHRT_MAX 0x7fff /* max value for a short */
+#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-#define UINT_MAX 0xffffffff /* max value for an unsigned int */
-#define INT_MAX 2147483647 /* max value for an int */
-#define INT_MIN (-2147483647-1) /* min value for an int */
+#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
+#define INT_MAX 0x7fffffff /* max value for an int */
+#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-#define ULONG_MAX 0xffffffffffffffff /* max value for an unsigned long */
- /* max value for a long */
-#define LONG_MAX 0x7fffffffffffffff
-#define LONG_MIN (-LONG_MAX-1) /* min value for a long */
+#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
+#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
+#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
#if !defined(_ANSI_SOURCE)
-#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
+#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
-#if !defined(_POSIX_SOURCE)
-#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
+#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
+#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
-/* GCC requires that quad constants be written as expressions. */
-#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
- /* max value for a quad_t */
-#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
-#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
+/* Quads and longs are the same on the alpha */
+#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
+#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
+#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE */
+#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
+
+#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
+#define LONG_BIT 64
+#define WORD_BIT 32
+
+#define DBL_DIG 15
+#define DBL_MAX 1.7976931348623157E+308
+#define DBL_MIN 2.2250738585072014E-308
+
+#define FLT_DIG 6
+#define FLT_MAX 3.40282347E+38F
+#define FLT_MIN 1.17549435E-38F
+#endif
diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h
index ed6528e6cd3..73c09a51f81 100644
--- a/sys/arch/alpha/include/param.h
+++ b/sys/arch/alpha/include/param.h
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.10 1995/12/20 00:08:43 cgd Exp $ */
+/* $NetBSD: param.h,v 1.12 1996/03/04 05:04:10 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -45,7 +45,9 @@
/*
* Machine dependent constants for the Alpha.
*/
+#define _MACHINE alpha
#define MACHINE "alpha"
+#define _MACHINE_ARCH alpha
#define MACHINE_ARCH "alpha"
#define MID_MACHINE MID_ALPHA
@@ -157,7 +159,7 @@
#define splhigh() pal_swpipl(PSL_IPL_HIGH)
#ifdef _KERNEL
-#ifndef LOCORE
+#ifndef _LOCORE
/* This was calibrated empirically */
extern u_int64_t cycles_per_usec;
diff --git a/sys/arch/alpha/include/prom.h b/sys/arch/alpha/include/prom.h
index 66cda050fc4..26a70c0d82d 100644
--- a/sys/arch/alpha/include/prom.h
+++ b/sys/arch/alpha/include/prom.h
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.h,v 1.1 1995/02/13 23:07:48 cgd Exp $ */
+/* $NetBSD: prom.h,v 1.2 1996/04/23 15:23:18 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -52,6 +52,7 @@ int prom_open __P((char *, int));
void putchar __P((int));
#endif
+void prom_halt __P((int)) __attribute__((__noreturn__));
int prom_getenv __P((int, char *, int));
#endif
diff --git a/sys/arch/alpha/include/psl.h b/sys/arch/alpha/include/psl.h
index e14260c2bf6..f430f51ec2e 100644
--- a/sys/arch/alpha/include/psl.h
+++ b/sys/arch/alpha/include/psl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.4 1995/11/23 02:36:33 cgd Exp $ */
+/* $NetBSD: psl.h,v 1.5 1996/04/23 15:24:09 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -75,8 +75,8 @@
*/
/* Flush all write buffers */
-static __inline int wbflush() { __asm __volatile("mb"); } /* XXX? wmb */
-
+static __inline int wbflush() \
+ { __asm __volatile("mb" : : : "memory"); } /* XXX? wmb */
#define IMB() pal_imb() /* Sync instruction cache w/data */
void alpha_mb __P((void)); /* Flush all write buffers */
@@ -84,6 +84,7 @@ void pal_imb __P((void)); /* Sync instruction cache */
u_int64_t pal_swpipl __P((u_int64_t)); /* write new IPL, return old */
u_int64_t profile_swpipl __P((u_int64_t)); /* pal_swpipl w/o profiling */
void pal_tbi __P((u_int64_t, void *)); /* Invalidate TLB entries */
+void pal_halt __P((void)) __attribute__((__noreturn__)); /* halt/reboot */
#endif /* _KERNEL */
#endif /* !__ALPHA_PSL_H__ */
diff --git a/sys/arch/alpha/include/pte.h b/sys/arch/alpha/include/pte.h
index 95b3a84c06c..bdec6d7e8a2 100644
--- a/sys/arch/alpha/include/pte.h
+++ b/sys/arch/alpha/include/pte.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.3 1995/11/23 02:36:37 cgd Exp $ */
+/* $NetBSD: pte.h,v 1.4 1996/02/01 22:28:56 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -66,7 +66,7 @@ typedef u_int64_t pt_entry_t;
#define K0SEG_END 0xfffffe0000000000
#define PHYS_UNCACHED 0x0000000040000000
-#if !defined(LOCORE)
+#ifndef _LOCORE
#define k0segtophys(x) ((vm_offset_t)(x) & 0x00000003ffffffff)
#define phystok0seg(x) ((vm_offset_t)(x) | K0SEG_BEGIN)
diff --git a/sys/arch/alpha/include/rpb.h b/sys/arch/alpha/include/rpb.h
index c738b061ac7..c652f3bfc7b 100644
--- a/sys/arch/alpha/include/rpb.h
+++ b/sys/arch/alpha/include/rpb.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rpb.h,v 1.6 1995/11/23 02:36:41 cgd Exp $ */
+/* $NetBSD: rpb.h,v 1.7 1996/04/29 16:23:11 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -169,7 +169,6 @@ struct pcs {
#define PCS_PV 0x000040 /* PALcode valid */
#define PCS_PMV 0x000080 /* PALcode memory valid */
#define PCS_PL 0x000100 /* PALcode loaded */
-#define PCS_PE 0x000200 /* primary eligible (SMP) */
#define PCS_HALT_REQ 0xff0000 /* halt request mask */
#define PCS_HALT_DEFAULT 0x000000
@@ -227,7 +226,7 @@ struct pcs {
#define PCS_VAR_VAXFP 0x0000000000000001 /* VAX FP support */
#define PCS_VAR_IEEEFP 0x0000000000000002 /* IEEE FP support */
-#define PCS_VAR_IOACCESS 0x0000000000000004 /* Has I/O access */
+#define PCS_VAR_PE 0x0000000000000004 /* Primary Eligible */
#define PCS_VAR_RESERVED 0xfffffffffffffff8 /* Reserved */
char pcs_proc_revision[8]; /* C0: only first 4 valid */
diff --git a/sys/arch/alpha/include/sfbreg.h b/sys/arch/alpha/include/sfbreg.h
new file mode 100644
index 00000000000..dcef105d717
--- /dev/null
+++ b/sys/arch/alpha/include/sfbreg.h
@@ -0,0 +1,96 @@
+/* $NetBSD: sfbreg.h,v 1.1 1996/05/01 21:15:46 cgd Exp $ */
+
+/*
+ * Copyright (c) 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * Smart ("CXTurbo") Frame Buffer definitions, from:
+ * ``DEC 3000 300/400/500/600/700/800/900 AXP Models System Prgrammer's Manual''
+ * (DEC order number EK-D3SYS-PM), section 6.
+ *
+ * All definitions are in "dense" TurboChannel space.
+ */
+
+/*
+ * Size of the SFB address space.
+ */
+#define SFB_SIZE 0x1000000
+
+/*
+ * Offsets into slot space of each functional unit.
+ */
+#define SFB_ASIC_OFFSET 0x0100000 /* SFB ASIC Control Registers */
+#define SFB_ASIC_SIZE 0x0020000
+#define SFB_RAMDAC_OFFSET 0x01c0000 /* Bt495 RAMDAC Registers */
+#define SFB_RAMDAC_SIZE 0x0040000
+#define SFB_FB_OFFSET 0x0200000 /* Frame buffer */
+#define SFB_FB_SIZE 0x0200000
+#define SFB_OSBM_OFFSET 0x0600000 /* Off-screen buffer memory */
+#define SFB_OSBM_SIZE 0x0200000
+
+/*
+ * SFB ASIC registers (offsets from SFB_ASIC_OFFSET).
+ */
+#define SFB_ASIC_COPYBUF_0 0x0000 /* Copy buffer register 0 (R/W) */
+#define SFB_ASIC_COPYBUF_1 0x0004 /* Copy buffer register 1 (R/W) */
+#define SFB_ASIC_COPYBUF_2 0x0008 /* Copy buffer register 2 (R/W) */
+#define SFB_ASIC_COPYBUF_3 0x000c /* Copy buffer register 3 (R/W) */
+#define SFB_ASIC_COPYBUF_4 0x0010 /* Copy buffer register 4 (R/W) */
+#define SFB_ASIC_COPYBUF_5 0x0014 /* Copy buffer register 5 (R/W) */
+#define SFB_ASIC_COPYBUF_6 0x0018 /* Copy buffer register 6 (R/W) */
+#define SFB_ASIC_COPYBUF_7 0x001c /* Copy buffer register 7 (R/W) */
+#define SFB_ASIC_FG 0x0020 /* Foreground (R/W) */
+#define SFB_ASIC_BG 0x0024 /* Background (R/W) */
+#define SFB_ASIC_PLANEMASK 0x0028 /* PlaneMask (R/W) */
+#define SFB_ASIC_PIXELMASK 0x002c /* PixelMask (R/W) */
+#define SFB_ASIC_MODE 0x0030 /* Mode (R/W) */
+#define SFB_ASIC_ROP 0x0034 /* RasterOp (R/W) */
+#define SFB_ASIC_PIXELSHIFT 0x0038 /* PixelShift (R/W) */
+#define SFB_ASIC_ADDRESS 0x003c /* Address (R/W) */
+#define SFB_ASIC_BRES1 0x0040 /* Bresenham register 1 (R/W) */
+#define SFB_ASIC_BRES2 0x0044 /* Bresenham register 2 (R/W) */
+#define SFB_ASIC_BRES3 0x0048 /* Bresenham register 3 (R) (?) */
+#define SFB_ASIC_BCONT 0x004c /* Bcont (W) */
+#define SFB_ASIC_DEEP 0x0050 /* Deep (R/W) */
+#define SFB_ASIC_START 0x0054 /* Start (W) */
+#define SFB_ASIC_CLEAR_INTR 0x0058 /* Clear Interrupt (W) */
+#define SFB_ASIC_VIDEO_REFRESH 0x0060 /* Video refresh counter (R/W) */
+#define SFB_ASIC_VIDEO_HSETUP 0x0064 /* Video horizontal setup (R/W) */
+#define SFB_ASIC_VIDEO_VSETUP 0x0068 /* Video vertical setup (R/W) */
+#define SFB_ASIC_VIDEO_BASE 0x006c /* Video base address (R/W) */
+#define SFB_ASIC_VIDEO_VALID 0x0070 /* Video valid (W) */
+#define SFB_ASIC_ENABLE_INTR 0x0074 /* Enable/Disable Interrupts (W) */
+#define SFB_ASIC_TCCLK 0x0078 /* TCCLK count (R/W) */
+#define SFB_ASIC_VIDCLK 0x007c /* VIDCLK count (R/W) */
+
+/*
+ * Bt459 RAMDAC registers (offsets from SFB_RAMDAC_OFFSET)
+ */
+#define SFB_RAMDAC_ADDRLOW 0x0000 /* Address register low byte */
+#define SFB_RAMDAC_ADDRHIGH 0x0004 /* Address register high byte */
+#define SFB_RAMDAC_REGDATA 0x0008 /* Register addressed by addr reg */
+#define SFB_RAMDAC_CMAPDATA 0x000c /* Colormap loc addressed by addr reg */
diff --git a/sys/arch/alpha/include/isa_machdep.h b/sys/arch/alpha/include/sysarch.h
index a5636e42f51..a8a5493ab90 100644
--- a/sys/arch/alpha/include/isa_machdep.h
+++ b/sys/arch/alpha/include/sysarch.h
@@ -1,21 +1,21 @@
-/* $NetBSD: isa_machdep.h,v 1.1 1995/11/23 02:36:11 cgd Exp $ */
+/* $NetBSD: sysarch.h,v 1.1 1996/04/12 01:42:45 cgd Exp $ */
/*
- * Copyright (c) 1995 Carnegie-Mellon University.
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
- *
+ *
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
@@ -27,5 +27,16 @@
* rights to redistribute these changes.
*/
-/* not __ISA_MACHDEP_PIO_DEFINITIONS__ */
-/* not __ISA_MACHDEP_MEM_DEFINITIONS__ */
+#ifndef _ALPHA_SYSARCH_H_
+#define _ALPHA_SYSARCH_H_
+
+static inline u_int64_t
+alpha_rpcc()
+{
+ u_int64_t rv;
+
+ __asm ("rpcc %0" : "=r" (rv));
+ return (rv);
+}
+
+#endif /* _ALPHA_SYSARCH_H_ */
diff --git a/sys/arch/alpha/include/tc_machdep.h b/sys/arch/alpha/include/tc_machdep.h
deleted file mode 100644
index 5287f43b048..00000000000
--- a/sys/arch/alpha/include/tc_machdep.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $NetBSD: tc_machdep.h,v 1.1 1995/12/20 00:09:29 cgd Exp $ */
-
-/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/*
- * Machine-specific definitions for TurboChannel support.
- *
- * This file must typedef the following types:
- *
- * tc_addr_t TurboChannel bus address
- * tc_offset_t TurboChannel bus address difference (offset)
- *
- * This file must prototype or define the following functions
- * or macros (one or more of which may be no-ops):
- *
- * tc_mb() read/write memory barrier (any CPU<->memory
- * reads/writes before must complete before any
- * CPU<->memory reads/writes after).
- * tc_wmb() write memory barrier (any CPU<->memory writes
- * before must complete before any CPU<->memory
- * writes after).
- * tc_syncbus() sync TC bus; make sure CPU writes are
- * propagated across the TurboChannel bus.
- * tc_badaddr() return non-zero if the given address is invalid.
- * TC_DENSE_TO_SPARSE()
- * convert the given physical address in
- * TurboChannel dense space to the corresponding
- * address in TurboChannel sparse space.
- * TC_PHYS_TO_UNCACHED()
- * convert the given system memory physical address
- * to the physical address of the corresponding
- * region that is not cached.
- */
-
-typedef u_int64_t tc_addr_t;
-typedef int32_t tc_offset_t;
-
-#define tc_mb() wbflush()
-#define tc_wmb() wbflush()
-
-/*
- * A junk address to read from, to make sure writes are complete. See
- * System Programmer's Manual, section 9.3 (p. 9-4), and sacrifice a
- * chicken.
- */
-#define tc_syncbus() \
- do { \
- volatile u_int32_t no_optimize; \
- no_optimize = \
- *(volatile u_int32_t *)phystok0seg(0x00000001f0080220); \
- } while (0)
-
-#define tc_badaddr(tcaddr) \
- badaddr((void *)(tcaddr), sizeof (u_int32_t))
-
-#define TC_SPACE_IND 0xffffffffe0000003
-#define TC_SPACE_DENSE 0x0000000000000000
-#define TC_SPACE_DENSE_OFFSET 0x0000000007fffffc
-#define TC_SPACE_SPARSE 0x0000000010000000
-#define TC_SPACE_SPARSE_OFFSET 0x000000000ffffff8
-
-#define TC_DENSE_TO_SPARSE(addr) \
- (((addr) & TC_SPACE_IND) | TC_SPACE_SPARSE | \
- (((addr) & TC_SPACE_DENSE_OFFSET) << 1))
-
-#define TC_PHYS_TO_UNCACHED(addr) \
- (addr)
diff --git a/sys/arch/alpha/include/tgareg.h b/sys/arch/alpha/include/tgareg.h
new file mode 100644
index 00000000000..fab595cc556
--- /dev/null
+++ b/sys/arch/alpha/include/tgareg.h
@@ -0,0 +1,159 @@
+/* $NetBSD: tgareg.h,v 1.1 1996/04/12 01:44:23 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _ALPHA_INCLUDE_TGAREG_H_
+#define _ALPHA_INCLUDE_TGAREG_H_
+
+/*
+ * Device-specific PCI register offsets and contents.
+ */
+
+#define TGA_PCIREG_PVRR 0x40 /* PCI Address Extension Register */
+
+#define TGA_PCIREG_PAER 0x44 /* PCI VGA Redirect Register */
+
+/*
+ * TGA Memory Space offsets
+ */
+
+#define TGA_MEM_ALTROM 0x0000000 /* 0MB -- Alternate ROM space */
+#define TGA_MEM_CREGS 0x0100000 /* 1MB -- Core Registers */
+/* Display and Back Buffers mapped at config-dependent addresses */
+
+/*
+ * TGA Core Space register numbers and contents.
+ */
+
+typedef u_int32_t tga_reg_t;
+
+#define TGA_REG_GCBR0 0x000 /* Copy buffer 0 */
+#define TGA_REG_GCBR1 0x001 /* Copy buffer 1 */
+#define TGA_REG_GCBR2 0x002 /* Copy buffer 2 */
+#define TGA_REG_GCBR3 0x003 /* Copy buffer 3 */
+#define TGA_REG_GCBR4 0x004 /* Copy buffer 4 */
+#define TGA_REG_GCBR5 0x005 /* Copy buffer 5 */
+#define TGA_REG_GCBR6 0x006 /* Copy buffer 6 */
+#define TGA_REG_GCBR7 0x007 /* Copy buffer 7 */
+
+#define TGA_REG_GFGR 0x008 /* Foreground */
+#define TGA_REG_GBGR 0x009 /* Background */
+#define TGA_REG_GPMR 0x00a /* Plane Mask */
+#define TGA_REG_GPXR_S 0x00b /* Pixel Mask (one-shot) */
+#define TGA_REG_GMOR 0x00c /* Mode */
+#define TGA_REG_GOPR 0x00d /* Raster Operation */
+#define TGA_REG_GPSR 0x00e /* Pixel Shift */
+#define TGA_REG_GADR 0x00f /* Address */
+
+#define TGA_REG_GB1R 0x010 /* Bresenham 1 */
+#define TGA_REG_GB2R 0x011 /* Bresenham 2 */
+#define TGA_REG_GB3R 0x012 /* Bresenham 3 */
+
+#define TGA_REG_GCTR 0x013 /* Continue */
+#define TGA_REG_GDER 0x014 /* Deep */
+/* reserved 0x015 */
+#define TGA_REG_GSMR 0x016 /* Stencil Mode */
+#define TGA_REG_GPXR_P 0x017 /* Pixel Mask (persistent) */
+#define TGA_REG_CCBR 0x018 /* Cursor Base Address */
+#define TGA_REG_VHCR 0x019 /* Horizontal Control */
+#define TGA_REG_VVCR 0x01a /* Vertical Control */
+#define TGA_REG_VVBR 0x01b /* Video Base Address */
+#define TGA_REG_VVVR 0x01c /* Video Valid */
+#define TGA_REG_CXYR 0x01d /* Cursor XY */
+#define TGA_REG_VSAR 0x01e /* Video Shift Address */
+#define TGA_REG_SISR 0x01f /* Interrupt Status */
+#define TGA_REG_GDAR 0x020 /* Data */
+#define TGA_REG_GRIR 0x021 /* Red Increment */
+#define TGA_REG_GGIR 0x022 /* Green Increment */
+#define TGA_REG_GBIR 0x023 /* Blue Increment */
+#define TGA_REG_GZIR_L 0x024 /* Z-increment Low */
+#define TGA_REG_GZIR_H 0x025 /* Z-Increment High */
+#define TGA_REG_GDBR 0x026 /* DMA Base Address */
+#define TGA_REG_GBWR 0x027 /* Bresenham Width */
+#define TGA_REG_GZVR_L 0x028 /* Z-value Low */
+#define TGA_REG_GZVR_H 0x029 /* Z-value High */
+#define TGA_REG_GZBR 0x02a /* Z-base address */
+/* GADR alias 0x02b */
+#define TGA_REG_GRVR 0x02c /* Red Value */
+#define TGA_REG_GGVR 0x02d /* Green Value */
+#define TGA_REG_GBVR 0x02e /* Blue Value */
+#define TGA_REG_GSWR 0x02f /* Span Width */
+#define TGA_REG_EPSR 0x030 /* Pallete and DAC Setup */
+
+/* reserved 0x031 - 0x3f */
+
+#define TGA_REG_GSNR0 0x040 /* Slope-no-go 0 */
+#define TGA_REG_GSNR1 0x041 /* Slope-no-go 1 */
+#define TGA_REG_GSNR2 0x042 /* Slope-no-go 2 */
+#define TGA_REG_GSNR3 0x043 /* Slope-no-go 3 */
+#define TGA_REG_GSNR4 0x044 /* Slope-no-go 4 */
+#define TGA_REG_GSNR5 0x045 /* Slope-no-go 5 */
+#define TGA_REG_GSNR6 0x046 /* Slope-no-go 6 */
+#define TGA_REG_GSNR7 0x047 /* Slope-no-go 7 */
+
+#define TGA_REG_GSLR0 0x048 /* Slope 0 */
+#define TGA_REG_GSLR1 0x049 /* Slope 1 */
+#define TGA_REG_GSLR2 0x04a /* Slope 2 */
+#define TGA_REG_GSLR3 0x04b /* Slope 3 */
+#define TGA_REG_GSLR4 0x04c /* Slope 4 */
+#define TGA_REG_GSLR5 0x04d /* Slope 5 */
+#define TGA_REG_GSLR6 0x04e /* Slope 6 */
+#define TGA_REG_GSLR7 0x04f /* Slope 7 */
+
+#define TGA_REG_GBCR0 0x050 /* Block Color 0 */
+#define TGA_REG_GBCR1 0x051 /* Block Color 1 */
+#define TGA_REG_GBCR2 0x052 /* Block Color 2 */
+#define TGA_REG_GBCR3 0x053 /* Block Color 3 */
+#define TGA_REG_GBCR4 0x054 /* Block Color 4 */
+#define TGA_REG_GBCR5 0x055 /* Block Color 5 */
+#define TGA_REG_GBCR6 0x056 /* Block Color 6 */
+#define TGA_REG_GBCR7 0x057 /* Block Color 7 */
+
+#define TGA_REG_GCSR 0x058 /* Copy 64 Source */
+#define TGA_REG_GCDR 0x059 /* Copy 64 Destination */
+/* GC[SD]R aliases 0x05a - 0x05f */
+
+/* reserved 0x060 - 0x077 */
+
+#define TGA_REG_ERWR 0x078 /* EEPROM write */
+
+/* reserved 0x079 */
+
+#define TGA_REG_ECGR 0x07a /* Clock */
+
+/* reserved 0x07b */
+
+#define TGA_REG_EPDR 0x07c /* Pallete and DAC Data */
+
+/* reserved 0x07d */
+
+#define TGA_REG_SCSR 0x07e /* Command Status */
+
+/* reserved 0x07f */
+
+#endif /* _ALPHA_INCLUDE_TGAREG_H_ */
diff --git a/sys/arch/alpha/include/vuid_event.h b/sys/arch/alpha/include/vuid_event.h
new file mode 100644
index 00000000000..26c0e72590f
--- /dev/null
+++ b/sys/arch/alpha/include/vuid_event.h
@@ -0,0 +1,87 @@
+/* $NetBSD: vuid_event.h,v 1.1 1996/04/12 01:45:47 cgd Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * 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, Lawrence Berkeley Laboratory.
+ *
+ * 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.
+ *
+ * @(#)vuid_event.h 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * The following is a minimal emulation of Sun's `Firm_event' structures
+ * and related operations necessary to make X11 happy (i.e., make it
+ * compile, and make old X11 binaries run).
+ */
+typedef struct firm_event {
+ u_short id; /* key or MS_* or LOC_[XY]_DELTA */
+ u_short pad; /* unused, at least by X11 */
+ int value; /* VKEY_{UP,DOWN} or locator delta */
+ struct timeval time;
+} Firm_event;
+
+/*
+ * Special `id' fields. These weird numbers simply match the old binaries.
+ * Others are in 0..0x7f and are keyboard key numbers (keyboard dependent!).
+ */
+#define MS_LEFT 0x7f20 /* left mouse button */
+#define MS_MIDDLE 0x7f21 /* middle mouse button */
+#define MS_RIGHT 0x7f22 /* right mouse button */
+#define LOC_X_DELTA 0x7f80 /* mouse delta-X */
+#define LOC_Y_DELTA 0x7f81 /* mouse delta-Y */
+#define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */
+#define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */
+
+/*
+ * Special `value' fields. These apply to keys and mouse buttons. The
+ * value of a mouse delta is the delta. Note that positive deltas are
+ * left and up (not left and down as you might expect).
+ */
+#define VKEY_UP 0 /* key or button went up */
+#define VKEY_DOWN 1 /* key or button went down */
+
+/*
+ * The following ioctls are clearly intended to take things in and out
+ * of `firm event' mode. Since we always run in this mode (as far as
+ * /dev/kbd and /dev/mouse are concerned, anyway), we always claim to
+ * be in this mode and reject anything else.
+ */
+#define VUIDSFORMAT _IOW('v', 1, int)
+#define VUIDGFORMAT _IOR('v', 2, int)
+#define VUID_FIRM_EVENT 1 /* the only format we support */
diff --git a/sys/arch/alpha/include/wsconsio.h b/sys/arch/alpha/include/wsconsio.h
new file mode 100644
index 00000000000..58848e420f5
--- /dev/null
+++ b/sys/arch/alpha/include/wsconsio.h
@@ -0,0 +1,61 @@
+/* $NetBSD: wsconsio.h,v 1.1 1996/04/12 01:43:06 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * Get keyboard type. Keyboard type definitions are below.
+ */
+#define WSCONSIO_KBD_GTYPE _IOR('W',100,int)
+#define KBD_TYPE_LK201 0 /* lk-201 */
+#define KBD_TYPE_LK401 1 /* lk-401 */
+#define KBD_TYPE_PC 2 /* pc-like */
+
+/*
+ * If arg is one, don't process scancodes into characters
+ */
+#define WSCONSIO_KBD_SCANCODES _IO('W',101,int)
+
+/*
+ * Bell ioctls.
+ */
+
+struct wsconsio_bell_data {
+ int wbd_flags;
+ int wbd_pitch; /* pitch, in Hz. */
+ int wbd_period; /* period, in milliseconds. */
+ int wbd_volume; /* percentage of maximum volume. */
+};
+
+#define WSCONSIO_BELLDATA_PITCH 0x01 /* pitch data present */
+#define WSCONSIO_BELLDATA_PERIOD 0x02 /* period data present */
+#define WSCONSIO_BELLDATA_VOLUME 0x04 /* volume data present */
+
+#define WSCONSIO_BELL _IO('W',102)
+#define WSCONSIO_COMPLEXBELL _IOW('W',103,struct wsconsio_bell_data)
+#define WSCONSIO_SETBELL _IOW('W',104,struct wsconsio_bell_data)
+#define WSCONSIO_GETBELL _IOR('W',105,struct wsconsio_bell_data)