summaryrefslogtreecommitdiff
path: root/sys/arch/atari/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/atari/include')
-rw-r--r--sys/arch/atari/include/acia.h86
-rw-r--r--sys/arch/atari/include/ansi.h8
-rw-r--r--sys/arch/atari/include/aout_machdep.h49
-rw-r--r--sys/arch/atari/include/asm.h8
-rw-r--r--sys/arch/atari/include/cdefs.h8
-rw-r--r--sys/arch/atari/include/cpu.h219
-rw-r--r--sys/arch/atari/include/cpufunc.h8
-rw-r--r--sys/arch/atari/include/db_machdep.h8
-rw-r--r--sys/arch/atari/include/disklabel.h45
-rw-r--r--sys/arch/atari/include/dma.h88
-rw-r--r--sys/arch/atari/include/endian.h8
-rw-r--r--sys/arch/atari/include/exec.h49
-rw-r--r--sys/arch/atari/include/float.h8
-rw-r--r--sys/arch/atari/include/frame.h8
-rw-r--r--sys/arch/atari/include/iomap.h63
-rw-r--r--sys/arch/atari/include/limits.h8
-rw-r--r--sys/arch/atari/include/mfp.h177
-rw-r--r--sys/arch/atari/include/mtpr.h61
-rw-r--r--sys/arch/atari/include/param.h220
-rw-r--r--sys/arch/atari/include/pcb.h77
-rw-r--r--sys/arch/atari/include/pmap.h105
-rw-r--r--sys/arch/atari/include/proc.h52
-rw-r--r--sys/arch/atari/include/profile.h8
-rw-r--r--sys/arch/atari/include/psl.h8
-rw-r--r--sys/arch/atari/include/pte.h143
-rw-r--r--sys/arch/atari/include/ptrace.h8
-rw-r--r--sys/arch/atari/include/reg.h8
-rw-r--r--sys/arch/atari/include/scu.h106
-rw-r--r--sys/arch/atari/include/setjmp.h3
-rw-r--r--sys/arch/atari/include/signal.h8
-rw-r--r--sys/arch/atari/include/stdarg.h4
-rw-r--r--sys/arch/atari/include/tospart.h59
-rw-r--r--sys/arch/atari/include/trap.h8
-rw-r--r--sys/arch/atari/include/types.h8
-rw-r--r--sys/arch/atari/include/varargs.h4
-rw-r--r--sys/arch/atari/include/video.h162
-rw-r--r--sys/arch/atari/include/vmparam.h168
37 files changed, 2068 insertions, 0 deletions
diff --git a/sys/arch/atari/include/acia.h b/sys/arch/atari/include/acia.h
new file mode 100644
index 00000000000..b4accda3b04
--- /dev/null
+++ b/sys/arch/atari/include/acia.h
@@ -0,0 +1,86 @@
+ /* $NetBSD: acia.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_ACIA_H
+#define _MACHINE_ACIA_H
+/*
+ * Atari ST hardware:
+ * Motorola 6850 Asynchronous Communications Interface Adapter
+ */
+
+#define KBD (((struct acia *)AD_ACIA))
+#define MDI (((struct acia *)AD_ACIA) + 1)
+
+struct acia {
+ volatile char acb[4]; /* use only the even bytes */
+};
+
+#define ac_cs acb[0] /* control and status register */
+#define ac_da acb[2] /* data register */
+
+/* bits in control register: */
+/* 0x03 *//* clock divider */
+#define A_Q01 0x00 /* don't divide */
+#define A_Q16 0x01 /* divide by 16 */
+#define A_Q64 0x02 /* divide by 64 */
+#define A_RESET 0x03 /* master reset */
+/* 0x1C *//* word select bits */
+#define A_72E 0x00 /* 7 data, 2 stop, parity even */
+#define A_72O 0x04 /* 7 data, 2 stop, parity odd */
+#define A_71E 0x08 /* 7 data, 1 stop, parity even */
+#define A_71O 0x0C /* 7 data, 1 stop, parity odd */
+#define A_82N 0x10 /* 8 data, 2 stop, no parity */
+#define A_81N 0x14 /* 8 data, 1 stop, no parity */
+#define A_81E 0x18 /* 8 data, 1 stop, parity even */
+#define A_81O 0x1C /* 8 data, 1 stop, parity odd */
+/* 0x60 *//* RTS Low/High, TXINT en/dis, BREAK */
+#define A_TXPOL 0x00 /* RTS Low, TXINT disabled */
+#define A_TXINT 0x20 /* RTS Low, TXINT enabled */
+#define A_TXOFF 0x40 /* RTS High, TXINT disabled */
+#define A_BREAK 0x60 /* RTS Low, TXINT disabled, BREAK */
+#define A_RXINT 0x80 /* enable receiver interrupt */
+
+/* bits in status register: */
+#define A_RXRDY 0x01 /* receiver ready */
+#define A_TXRDY 0x02 /* transmitter ready */
+#define A_CLOST 0x04 /* Carrier Lost */
+#define A_CTS 0x08 /* Clear To Send */
+#define A_FE 0x10 /* Frame Error */
+#define A_OE 0x20 /* Overrun Error */
+#define A_PE 0x40 /* Parity Error */
+#define A_IRQ 0x80 /* State of IRQ signal */
+
+/* values for the TT: */
+#define KBD_INIT (A_81N|A_Q64)
+#define MDI_INIT (A_81N|A_Q16)
+
+#endif /* _MACHINE_ACIA_H */
diff --git a/sys/arch/atari/include/ansi.h b/sys/arch/atari/include/ansi.h
new file mode 100644
index 00000000000..31de7856c33
--- /dev/null
+++ b/sys/arch/atari/include/ansi.h
@@ -0,0 +1,8 @@
+/* $NetBSD: ansi.h,v 1.1.1.1 1995/03/26 07:12:09 leo Exp $ */
+
+#ifndef _MACHINE_ANSI_H_
+#define _MACHINE_ANSI_H_
+
+#include <m68k/ansi.h>
+
+#endif
diff --git a/sys/arch/atari/include/aout_machdep.h b/sys/arch/atari/include/aout_machdep.h
new file mode 100644
index 00000000000..6283ab803eb
--- /dev/null
+++ b/sys/arch/atari/include/aout_machdep.h
@@ -0,0 +1,49 @@
+/* $NetBSD: aout_machdep.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_EXEC_H_
+#define _MACHINE_EXEC_H_
+
+#define __LDPGSZ 8192
+
+/* Relocation format. */
+struct relocation_info_m68k {
+ int r_address; /* offset in text or data segment */
+ unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
+ r_pcrel : 1, /* 1 if value should be pc-relative */
+ r_length : 2, /* log base 2 of value's width */
+ r_extern : 1, /* 1 if need to add symbol to value */
+ r_baserel : 1, /* linkage table relative */
+ r_jmptable : 1, /* relocate to jump table */
+ r_relative : 1, /* load address relative */
+ r_copy : 1; /* run time copy */
+};
+#define relocation_info relocation_info_m68k
+
+#endif /* _MACHINE_EXEC_H_ */
diff --git a/sys/arch/atari/include/asm.h b/sys/arch/atari/include/asm.h
new file mode 100644
index 00000000000..c5f3dd8a213
--- /dev/null
+++ b/sys/arch/atari/include/asm.h
@@ -0,0 +1,8 @@
+/* $NetBSD: asm.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_ASM_H_
+#define _MACHINE_ASM_H_
+
+#include <m68k/asm.h>
+
+#endif
diff --git a/sys/arch/atari/include/cdefs.h b/sys/arch/atari/include/cdefs.h
new file mode 100644
index 00000000000..fbb4f3a5b98
--- /dev/null
+++ b/sys/arch/atari/include/cdefs.h
@@ -0,0 +1,8 @@
+/* $NetBSD: cdefs.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+#ifndef _MACHINE_CDEFS_H_
+#define _MACHINE_CDEFS_H_
+
+#include <m68k/cdefs.h>
+
+#endif
diff --git a/sys/arch/atari/include/cpu.h b/sys/arch/atari/include/cpu.h
new file mode 100644
index 00000000000..d748378f37e
--- /dev/null
+++ b/sys/arch/atari/include/cpu.h
@@ -0,0 +1,219 @@
+/* $NetBSD: cpu.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1982, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: cpu.h 1.16 91/03/25$
+ *
+ * @(#)cpu.h 7.7 (Berkeley) 6/27/91
+ */
+
+#ifndef _MACHINE_CPU_H_
+#define _MACHINE_CPU_H_
+
+/*
+ * Exported definitions unique to atari/68k cpu support.
+ */
+
+/*
+ * definitions of cpu-dependent requirements
+ * referenced in generic code
+ */
+#define COPY_SIGCODE /* copy sigcode above user stack in exec */
+
+#define cpu_exec(p) /* nothing */
+#define cpu_swapin(p) /* nothing */
+#define cpu_wait(p) /* nothing */
+#define cpu_setstack(p, ap) (p)->p_md.md_regs[SP] = ap
+#define cpu_set_init_frame(p, fp) (p)->p_md.md_regs = fp
+
+/*
+ * Arguments to hardclock and gatherstats encapsulate the previous
+ * machine state in an opaque clockframe. On the hp300, we use
+ * what the hardware pushes on an interrupt (frame format 0).
+ */
+struct clockframe {
+ u_short sr; /* sr at time of interrupt */
+ u_long pc; /* pc at time of interrupt */
+ u_short vo; /* vector offset (4-word frame) */
+};
+
+#define CLKF_USERMODE(framep) (((framep)->sr & PSL_S) == 0)
+#define CLKF_BASEPRI(framep) (((framep)->sr & PSL_IPL) == 0)
+#define CLKF_PC(framep) ((framep)->pc)
+#if 0
+/* We would like to do it this way... */
+#define CLKF_INTR(framep) (((framep)->sr & PSL_M) == 0)
+#else
+/* but until we start using PSL_M, we have to do this instead */
+#define CLKF_INTR(framep) (0) /* XXX */
+#endif
+
+
+/*
+ * Preempt the current process if in interrupt from user mode,
+ * or after the current trap/syscall if in system mode.
+ */
+#define need_resched() {want_resched = 1; setsoftast();}
+
+/*
+ * Give a profiling tick to the current process from the softclock
+ * interrupt. On hp300, request an ast to send us through trap(),
+ * marking the proc as needing a profiling tick.
+ */
+#define profile_tick(p, framep) ((p)->p_flag |= P_OWEUPC, setsoftast())
+#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, setsoftast())
+
+/*
+ * Notify the current process (p) that it has a signal pending,
+ * process as soon as possible.
+ */
+#define signotify(p) setsoftast()
+
+#define setsoftast() (astpending = 1)
+
+extern int astpending; /* need trap before returning to user mode */
+extern int want_resched; /* resched() was called */
+
+/*
+ * simulated software interrupt register
+ */
+extern unsigned char ssir;
+
+#define SIR_NET 0x1
+#define SIR_CLOCK 0x2
+
+#define siroff(x) ssir &= ~(x)
+#define setsoftnet() ssir |= SIR_NET
+#define setsoftclock() ssir |= SIR_CLOCK
+
+
+/*
+ * The rest of this should probably be moved to ../atari/ataricpu.h,
+ * although some of it could probably be put into generic 68k headers.
+ */
+#define BASEPRI(sr) ((sr & PSL_IPL) == 0)
+
+/*
+ * Values for machineid.
+ */
+#define ATARI_68020 (1L<<2)
+#define ATARI_68030 (1L<<3)
+#define ATARI_68040 (1L<<4)
+#define ATARI_68881 (1L<<8)
+#define ATARI_68882 (1L<<9)
+#define ATARI_FPU40 (1L<<10)
+
+
+/*
+ * Values for mmutype (assigned for quick testing)
+ */
+#define MMU_68030 -1 /* 68030 on-chip subset of 68851 */
+#define MMU_68851 1 /* Motorola 68851 */
+#define MMU_68040 -2 /* 68040 on-chip subsubset */
+
+/* values for cpuspeed (not really related to clock speed due to caches) */
+#define MHZ_8 1
+#define MHZ_16 2
+#define MHZ_25 3
+#define MHZ_33 4
+#define MHZ_50 6
+
+#ifdef KERNEL
+extern int machineid, mmutype, cpu040;
+#endif
+
+/*
+ * 68851 and 68030 MMU
+ */
+#define PMMU_LVLMASK 0x0007
+#define PMMU_INV 0x0400
+#define PMMU_WP 0x0800
+#define PMMU_ALV 0x1000
+#define PMMU_SO 0x2000
+#define PMMU_LV 0x4000
+#define PMMU_BE 0x8000
+#define PMMU_FAULT (PMMU_WP|PMMU_INV)
+
+/* 680X0 function codes */
+#define FC_USERD 1 /* user data space */
+#define FC_USERP 2 /* user program space */
+#define FC_SUPERD 5 /* supervisor data space */
+#define FC_SUPERP 6 /* supervisor program space */
+#define FC_CPU 7 /* CPU space */
+
+/* fields in the 68020 cache control register */
+#define IC_ENABLE 0x0001 /* enable instruction cache */
+#define IC_FREEZE 0x0002 /* freeze instruction cache */
+#define IC_CE 0x0004 /* clear instruction cache entry */
+#define IC_CLR 0x0008 /* clear entire instruction cache */
+
+/* additional fields in the 68030 cache control register */
+#define IC_BE 0x0010 /* instruction burst enable */
+#define DC_ENABLE 0x0100 /* data cache enable */
+#define DC_FREEZE 0x0200 /* data cache freeze */
+#define DC_CE 0x0400 /* clear data cache entry */
+#define DC_CLR 0x0800 /* clear entire data cache */
+#define DC_BE 0x1000 /* data burst enable */
+#define DC_WA 0x2000 /* write allocate */
+
+/* fields in the 68040 cache control register */
+#define IC40_ENABLE 0x00008000 /* enable instruction cache */
+#define DC40_ENABLE 0x80000000 /* enable data cache */
+
+#define CACHE_ON (DC_WA|DC_BE|DC_CLR|DC_ENABLE|IC_BE|IC_CLR|IC_ENABLE)
+#define CACHE_OFF (DC_CLR|IC_CLR)
+#define CACHE_CLR (CACHE_ON)
+#define IC_CLEAR (DC_WA|DC_BE|DC_ENABLE|IC_BE|IC_CLR|IC_ENABLE)
+#define DC_CLEAR (DC_WA|DC_BE|DC_CLR|DC_ENABLE|IC_BE|IC_ENABLE)
+
+/* 68040 cache control */
+#define CACHE40_ON (IC40_ENABLE|DC40_ENABLE)
+#define CACHE40_OFF 0x00000000
+
+/*
+ * CTL_MACHDEP definitions.
+ */
+#define CPU_CONSDEV 1 /* dev_t: console terminal device */
+#define CPU_MAXID 2 /* number of valid machdep ids */
+
+#define CTL_MACHDEP_NAMES { \
+ { 0, 0 }, \
+ { "console_device", CTLTYPE_STRUCT }, \
+}
+
+#endif /* !_MACHINE_CPU_H_ */
diff --git a/sys/arch/atari/include/cpufunc.h b/sys/arch/atari/include/cpufunc.h
new file mode 100644
index 00000000000..3c7842e30b4
--- /dev/null
+++ b/sys/arch/atari/include/cpufunc.h
@@ -0,0 +1,8 @@
+/* $NetBSD: cpufunc.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+/*
+ * Functions to provide access to special cpu instructions.
+ */
+#ifndef _MACHINE_CPUFUNC_H_
+#define _MACHINE_CPUFUNC_H_
+#endif /* !_MACHINE_CPUFUNC_H_ */
diff --git a/sys/arch/atari/include/db_machdep.h b/sys/arch/atari/include/db_machdep.h
new file mode 100644
index 00000000000..896d316688c
--- /dev/null
+++ b/sys/arch/atari/include/db_machdep.h
@@ -0,0 +1,8 @@
+/* $NetBSD: db_machdep.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_DB_MACHDEP_H_
+#define _MACHINE_DB_MACHDEP_H_
+
+#include <m68k/db_machdep.h>
+
+#endif
diff --git a/sys/arch/atari/include/disklabel.h b/sys/arch/atari/include/disklabel.h
new file mode 100644
index 00000000000..a634c4780da
--- /dev/null
+++ b/sys/arch/atari/include/disklabel.h
@@ -0,0 +1,45 @@
+ /* $NetBSD: disklabel.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_DISKLABEL_H_
+#define _MACHINE_DISKLABEL_H_
+
+#define LABELSECTOR 0 /* sector containing label */
+#define LABELOFFSET 64 /* offset of label in sector */
+#define MAXPARTITIONS 16
+#define RAW_PART 2 /* xx?c is raw part. */
+
+struct cpu_disklabel {
+ int filler; /* must be something */
+};
+
+#endif /* _MACHINE_DISKLABEL_H_ */
diff --git a/sys/arch/atari/include/dma.h b/sys/arch/atari/include/dma.h
new file mode 100644
index 00000000000..50d810a6558
--- /dev/null
+++ b/sys/arch/atari/include/dma.h
@@ -0,0 +1,88 @@
+ /* $NetBSD: dma.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_DMA_H
+#define _MACHINE_DMA_H
+
+/*
+ * Atari TT hardware:
+ * FDC/ACSI DMA circuitry
+ */
+
+#define DMA ((struct dma *)AD_DMA)
+
+struct dma {
+ volatile short dma_gap[2]; /* reserved */
+ volatile short dma_data; /* controller data path */
+ volatile short dma_mode; /* mode register */
+ volatile char dma_addr[6]; /* base address H/M/L */
+ volatile short dma_drvmode; /* floppy density settings */
+};
+
+#define dma_nsec dma_data /* sector count */
+#define dma_stat dma_mode /* status register */
+
+/*
+ * Mode register bits
+ */
+/* 0x0001 *//* not used */
+#define A0 0x0002 /* signal A0 to fdc/hdc */
+#define A1 0x0004 /* signal A1 to fdc/hdc */
+#define HDC 0x0008 /* must be on if accessing hdc */
+#define SCREG 0x0010 /* access sector count register */
+/* 0x0020 *//* reserved */
+#define NODMA 0x0040 /* no DMA (yet) */
+#define FDC 0x0080 /* must be on if accessing fdc */
+#define WRBIT 0x0100 /* write to fdc/hdc via dma_data */
+
+/*
+ * Status register bits
+ */
+#define DMAOK 0x0001 /* something wrong */
+#define SCNOT0 0x0002 /* sector count not 0 */
+#define DATREQ 0x0004 /* FDC data request signal */
+
+/*
+ * Indices into dma_addr.
+ * Access low byte of 16 bits.
+ * Fill low/mid/high in this order.
+ */
+#define AD_HIGH 1
+#define AD_MID 3
+#define AD_LOW 5
+
+/*
+ * Defines for 'dmadrv_mode'.
+ */
+#define FDC_HDSET 1 /* Set FDC for High density */
+#define FDC_HDSIG 2 /* Signal HD present to drive */
+#endif /* _MACHINE_DMA_H */
diff --git a/sys/arch/atari/include/endian.h b/sys/arch/atari/include/endian.h
new file mode 100644
index 00000000000..814afb73d93
--- /dev/null
+++ b/sys/arch/atari/include/endian.h
@@ -0,0 +1,8 @@
+/* $NetBSD: endian.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_ENDIAN_H_
+#define _MACHINE_ENDIAN_H_
+
+#include <m68k/endian.h>
+
+#endif
diff --git a/sys/arch/atari/include/exec.h b/sys/arch/atari/include/exec.h
new file mode 100644
index 00000000000..6227cea790d
--- /dev/null
+++ b/sys/arch/atari/include/exec.h
@@ -0,0 +1,49 @@
+/* $NetBSD: exec.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_EXEC_H_
+#define _MACHINE_EXEC_H_
+
+#define __LDPGSZ 8192
+
+/* Relocation format. */
+struct relocation_info_m68k {
+ int r_address; /* offset in text or data segment */
+ unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
+ r_pcrel : 1, /* 1 if value should be pc-relative */
+ r_length : 2, /* log base 2 of value's width */
+ r_extern : 1, /* 1 if need to add symbol to value */
+ r_baserel : 1, /* linkage table relative */
+ r_jmptable : 1, /* relocate to jump table */
+ r_relative : 1, /* load address relative */
+ r_copy : 1; /* run time copy */
+};
+#define relocation_info relocation_info_m68k
+
+#endif /* _MACHINE_EXEC_H_ */
diff --git a/sys/arch/atari/include/float.h b/sys/arch/atari/include/float.h
new file mode 100644
index 00000000000..f5cf37fb337
--- /dev/null
+++ b/sys/arch/atari/include/float.h
@@ -0,0 +1,8 @@
+/* $NetBSD: float.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_FLOAT_H_
+#define _MACHINE_FLOAT_H_
+
+#include <m68k/float.h>
+
+#endif
diff --git a/sys/arch/atari/include/frame.h b/sys/arch/atari/include/frame.h
new file mode 100644
index 00000000000..d2079289692
--- /dev/null
+++ b/sys/arch/atari/include/frame.h
@@ -0,0 +1,8 @@
+/* $NetBSD: frame.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+#ifndef _MACHINE_FRAME_H_
+#define _MACHINE_FRAME_H_
+
+#include <m68k/frame.h>
+
+#endif
diff --git a/sys/arch/atari/include/iomap.h b/sys/arch/atari/include/iomap.h
new file mode 100644
index 00000000000..2b8cf8c0447
--- /dev/null
+++ b/sys/arch/atari/include/iomap.h
@@ -0,0 +1,63 @@
+ /* $NetBSD: iomap.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_IOMAP_H
+#define _MACHINE_IOMAP_H
+/*
+ * Atari TT hardware:
+ * I/O Address map
+ */
+
+#define AD_RAM (0x000000L) /* main memory */
+#define AD_CART (0xFA0000L) /* expansion cartridge */
+#define AD_ROM (0xFC0000L) /* system ROM */
+#define AD_IO (0xFF8000L) /* I/O devices */
+#define AD_EIO (0xFFFFFFL) /* End of I/O devices */
+
+/*
+ * I/O address parts
+ */
+#define AD_RAMCFG (0xFF8000L) /* ram configuration */
+#define AD_VIDEO (0xFF8200L) /* video controller */
+#define AD_RESERVED (0xFF8400L) /* reserved */
+#define AD_DMA (0xFF8600L) /* DMA device access */
+#define AD_SCSI_DMA (0xFF8700L) /* SCSI DMA registers */
+#define AD_NCR5380 (0xFF8780L) /* SCSI controller */
+#define AD_SOUND (0xFF8800L) /* YM-2149 */
+#define AD_RTC (0xFF8960L) /* TT realtime clock */
+#define AD_SCC (0xFF8C80L) /* SCC 8530 */
+#define AD_SCU (0xFF8E00L) /* System Control Unit */
+
+#define AD_MFP (0xFFFA00L) /* 68901 */
+#define AD_MFP2 (0xFFFA80L) /* 68901-TT */
+#define AD_ACIA (0xFFFC00L) /* 2 * 6850 */
+#endif /* _MACHINE_IOMAP_H */
diff --git a/sys/arch/atari/include/limits.h b/sys/arch/atari/include/limits.h
new file mode 100644
index 00000000000..027cc313e78
--- /dev/null
+++ b/sys/arch/atari/include/limits.h
@@ -0,0 +1,8 @@
+/* $NetBSD: limits.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+#ifndef _MACHINE_LIMITS_H_
+#define _MACHINE_LIMITS_H_
+
+#include <m68k/limits.h>
+
+#endif
diff --git a/sys/arch/atari/include/mfp.h b/sys/arch/atari/include/mfp.h
new file mode 100644
index 00000000000..0b12c778382
--- /dev/null
+++ b/sys/arch/atari/include/mfp.h
@@ -0,0 +1,177 @@
+ /* $NetBSD: mfp.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_MFP_H
+#define _MACHINE_MFP_H
+/*
+ * Atari TT hardware: MFP1/MFP2
+ * Motorola 68901 Multi-Function Peripheral
+ */
+
+#define MFP ((struct mfp *)AD_MFP)
+#define MFP2 ((struct mfp *)AD_MFP2)
+
+struct mfp {
+ volatile u_char mfb[48]; /* use only the odd bytes */
+};
+
+#define mf_gpip mfb[ 1] /* general purpose I/O interrupt port */
+#define mf_aer mfb[ 3] /* active edge register */
+#define mf_ddr mfb[ 5] /* data direction register */
+#define mf_iera mfb[ 7] /* interrupt enable register A */
+#define mf_ierb mfb[ 9] /* interrupt enable register B */
+#define mf_ipra mfb[11] /* interrupt pending register A */
+#define mf_iprb mfb[13] /* interrupt pending register B */
+#define mf_isra mfb[15] /* interrupt in-service register A */
+#define mf_isrb mfb[17] /* interrupt in-service register B */
+#define mf_imra mfb[19] /* interrupt mask register A */
+#define mf_imrb mfb[21] /* interrupt mask register B */
+#define mf_vr mfb[23] /* vector register */
+#define mf_tacr mfb[25] /* timer control register A */
+#define mf_tbcr mfb[27] /* timer control register B */
+#define mf_tcdcr mfb[29] /* timer control register C+D */
+#define mf_tadr mfb[31] /* timer data register A */
+#define mf_tbdr mfb[33] /* timer data register B */
+#define mf_tcdr mfb[35] /* timer data register C */
+#define mf_tddr mfb[37] /* timer data register D */
+#define mf_scr mfb[39] /* synchronous character register */
+#define mf_ucr mfb[41] /* USART control register */
+#define mf_rsr mfb[43] /* receiver status register */
+#define mf_tsr mfb[45] /* transmitter status register */
+#define mf_udr mfb[47] /* USART data register */
+
+/* names of IO port bits: */
+#define IO_PBSY 0x01 /* Parallel Busy */
+#define IO_SDCD 0x02 /* Serial Data Carrier Detect */
+#define IO_SCTS 0x04 /* Serial Clear To Send */
+/* 0x08 *//* reserved */
+#define IO_AINT 0x10 /* ACIA interrupt (KB or MIDI) */
+#define IO_DINT 0x20 /* DMA interrupt (FDC or HDC) */
+#define IO_SRI 0x40 /* Serial Ring Indicator */
+#define IO_MONO 0x80 /* Monochrome Monitor Detect */
+
+/* names of interrupts in register A: MFP1 */
+#define IA_MONO 0x80 /* IO_MONO */
+#define IA_SRI 0x40 /* IO_SRI */
+#define IA_TIMA 0x20 /* Timer A */
+#define IA_RRDY 0x10 /* Serial Receiver Ready(=Full) */
+#define IA_RERR 0x08 /* Serial Receiver Error */
+#define IA_TRDY 0x04 /* Serial Transmitter Ready(=Empty) */
+#define IA_TERR 0x02 /* Serial Transmitter Error */
+#define IA_TIMB 0x01 /* Timer B */
+
+/* names of interrupts in register A: MFP2 */
+#define IA_SCSI 0x80 /* SCSI-controller */
+#define IA_RTC 0x40 /* Real Time Clock */
+#define IA_TIMA2 0x20 /* Timer A */
+/* 0x10 *//* reserved */
+/* 0x08 *//* reserved */
+/* 0x04 *//* reserved */
+/* 0x02 *//* reserved */
+#define IA_TIMB2 0x01 /* Timer B */
+
+/* names of interrupts in register B: MFP1*/
+#define IB_DINT 0x80 /* IO_DINT: from DMA devices */
+#define IB_AINT 0x40 /* IO_AINT: from kbd or midi */
+#define IB_TIMC 0x20 /* Timer C */
+#define IB_TIMD 0x10 /* Timer D */
+/* 0x08 *//* reserved */
+#define IB_SCTS 0x04 /* IO_SCTS */
+#define IB_SDCD 0x02 /* IO_SDCD */
+#define IB_PBSY 0x01 /* IO_PBSY */
+
+/* names of interrupts in register B: MFP2*/
+#define IB_SCDM 0x80 /* SCSI-dma */
+#define IB_DCHG 0x40 /* Diskette change */
+/* 0x20 *//* reserved */
+/* 0x10 *//* reserved */
+#define IB_RISB 0x80 /* Serial Ring indicator SCC port B */
+#define IB_DMSC 0x40 /* SCC-dma */
+#define IB_J602_3 0x02 /* Pin 3 J602 */
+#define IB_J602_1 0x01 /* Pin 1 J602 */
+
+/* bits in VR: */
+#define V_S 0x08 /* software end-of-interrupt mode */
+#define V_V 0xF0 /* four high bits of vector */
+
+/* bits in TCR: */
+/* 0x07 *//* divider */
+#define T_STOP 0x00 /* don't count */
+#define T_Q004 0x01 /* divide by 4 */
+#define T_Q010 0x02 /* divide by 10 */
+#define T_Q016 0x03 /* divide by 16 */
+#define T_Q050 0x04 /* divide by 50 */
+#define T_Q064 0x05 /* divide by 64 */
+#define T_Q100 0x06 /* divide by 100 */
+#define T_Q200 0x07 /* divide by 200 */
+#define T_EXTI 0x08 /* use extern impulse */
+#define T_LOWO 0x10 /* force output low */
+
+/* bits in UCR: */
+/* 0x01 *//* not used */
+#define U_EVEN 0x02 /* even parity */
+#define U_PAR 0x04 /* use parity */
+/* 0x18 *//* sync/async and stop bits */
+#define U_SYNC 0x00 /* synchrone */
+#define U_ST1 0x08 /* async, 1 stop bit */
+#define U_ST1_5 0x10 /* async, 1.5 stop bit */
+#define U_ST2 0x18 /* async, 2 stop bits */
+/* 0x60 *//* number of data bits */
+#define U_D8 0x00 /* 8 data bits */
+#define U_D7 0x20 /* 7 data bits */
+#define U_D6 0x40 /* 6 data bits */
+#define U_D5 0x60 /* 5 data bits */
+#define U_Q16 0x80 /* divide clock by 16 */
+
+/* bits in RSR: */
+#define RS_ENA 0x01 /* Receiver Enable */
+#define RS_STRIP 0x02 /* Synchronous Strip Enable */
+#define RS_CIP 0x04 /* Character in Progress */
+#define RS_BREAK 0x08 /* Break Detected */
+#define RS_FE 0x10 /* Frame Error */
+#define RS_PE 0x20 /* Parity Error */
+#define RS_OE 0x40 /* Overrun Error */
+#define RS_FULL 0x80 /* Buffer Full */
+
+/* bits in TSR: */
+#define TS_ENA 0x01 /* Transmitter Enable */
+/* 0x06 *//* state of dead transmitter output */
+#define TS_TRI 0x00 /* Quiet Output Tristate */
+#define TS_LOW 0x02 /* Quiet Output Low */
+#define TS_HIGH 0x04 /* Quiet Output High */
+#define TS_BACK 0x06 /* Loop Back Mode */
+#define TS_BREAK 0x08 /* Break Detected */
+#define TS_EOT 0x10 /* End of Transmission */
+#define TS_TURN 0x20 /* Auto Turnaround */
+#define TS_UE 0x40 /* Underrun Error */
+#define TS_EMPTY 0x80 /* Buffer Empty */
+#endif /* _MACHINE_MFP_H */
diff --git a/sys/arch/atari/include/mtpr.h b/sys/arch/atari/include/mtpr.h
new file mode 100644
index 00000000000..d531675dded
--- /dev/null
+++ b/sys/arch/atari/include/mtpr.h
@@ -0,0 +1,61 @@
+/* $NetBSD: mtpr.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: mtpr.h 1.1 90/07/09$
+ *
+ * @(#)mtpr.h 7.2 (Berkeley) 11/3/90
+ */
+
+#ifndef _MACHINE_MPTR_H_
+#define _MACHINE_MPTR_H_
+
+/*
+ * simulated software interrupt register
+ */
+
+extern unsigned char ssir;
+
+#define SIR_NET 0x1
+#define SIR_CLOCK 0x2
+
+#define siroff(x) ssir &= ~(x)
+#define setsoftnet() ssir |= SIR_NET
+#define setsoftclock() ssir |= SIR_CLOCK
+
+#endif /* !_MACHINE_MPTR_H_ */
diff --git a/sys/arch/atari/include/param.h b/sys/arch/atari/include/param.h
new file mode 100644
index 00000000000..e32afe724a0
--- /dev/null
+++ b/sys/arch/atari/include/param.h
@@ -0,0 +1,220 @@
+ /* $NetBSD: param.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: machparam.h 1.11 89/08/14$
+ *
+ * @(#)param.h 7.8 (Berkeley) 6/28/91
+ */
+
+#ifndef _MACHINE_PARAM_H_
+#define _MACHINE_PARAM_H_
+
+/*
+ * Machine dependent constants for atari
+ */
+#define MACHINE "atari"
+#define MACHINE_ARCH "m68k"
+#define MID_MACHINE MID_M68K
+
+/*
+ * Round p (pointer or byte index) up to a correctly-aligned value
+ * for all data types (int, long, ...). The result is u_int and
+ * must be cast to any desired pointer type.
+ */
+#define ALIGNBYTES (sizeof(int) - 1)
+#define ALIGN(p) (((u_int)(p) + (sizeof(int) - 1)) &~ (sizeof(int) - 1))
+
+#define NBPG 8192 /* bytes/page */
+#define PGOFSET (NBPG-1) /* byte offset into page */
+#define PGSHIFT 13 /* LOG2(NBPG) */
+#define NPTEPG (NBPG/(sizeof(u_int)))
+
+#define NBSEG (cpu040 ? 32*NBPG : 2048*NBPG) /* bytes/segment */
+#define SEGOFSET (NBSEG-1) /* byte offset into segment */
+#define SEGSHIFT (cpu040 ? 18 : 24) /* LOG2(NBSEG) */
+
+#define KERNBASE 0x0 /* start of kernel virtual */
+#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
+
+#define DEV_BSIZE 512
+#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
+#define BLKDEV_IOSIZE 2048
+#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
+
+#define CLSIZE 1
+#define CLSIZELOG2 0
+
+/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
+#define SSIZE 1 /* initial stack size/NBPG */
+#define SINCR 1 /* increment of stack/NBPG */
+
+#define UPAGES 2 /* pages of u-area */
+#define USPACE (UPAGES * NBPG)
+
+/*
+ * Constants related to network buffer management.
+ * MCLBYTES must be no larger than CLBYTES (the software page size), and,
+ * on machines that exchange pages of input or output buffers with mbuf
+ * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
+ * of the hardware page size.
+ */
+#define MSIZE 128 /* size of an mbuf */
+#define MCLBYTES 1024
+#define MCLSHIFT 10
+#define MCLOFSET (MCLBYTES - 1)
+#ifndef NMBCLUSTERS
+#ifdef GATEWAY
+#define NMBCLUSTERS 512 /* map size, max cluster allocation */
+#else
+#define NMBCLUSTERS 256 /* map size, max cluster allocation */
+#endif
+#endif
+
+/*
+ * Size of kernel malloc arena in CLBYTES-sized logical pages
+ */
+#ifndef NKMEMCLUSTERS
+#define NKMEMCLUSTERS (3072*1024/CLBYTES)
+#endif
+
+#define MAXPARTITIONS 16
+
+/* pages ("clicks") to disk blocks */
+#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
+#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
+#define dtob(x) ((x)<<DEV_BSHIFT)
+
+/* pages to bytes */
+#define ctob(x) ((x)<<PGSHIFT)
+
+/* bytes to pages */
+#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
+
+#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
+ ((unsigned)(bytes) >> DEV_BSHIFT)
+#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
+ ((unsigned)(db) << DEV_BSHIFT)
+
+/*
+ * Map a ``block device block'' to a file system block.
+ * This should be device dependent, and should use the bsize
+ * field from the disk label.
+ * For now though just use DEV_BSIZE.
+ */
+#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
+
+/*
+ * Mach derived conversion macros
+ */
+#define atari_round_seg(x) ((((unsigned)(x)) + NBSEG - 1) & ~(NBSEG-1))
+#define atari_trunc_seg(x) ((unsigned)(x) & ~(NBSEG-1))
+#define atari_round_page(x) ((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1))
+#define atari_trunc_page(x) ((unsigned)(x) & ~(NBPG-1))
+#define atari_btos(x) ((unsigned)(x) >> SEGSHIFT)
+#define atari_stob(x) ((unsigned)(x) << SEGSHIFT)
+#define atari_btop(x) ((unsigned)(x) >> PGSHIFT)
+#define atari_ptob(x) ((unsigned)(x) << PGSHIFT)
+
+/*
+ * spl functions; all but spl0 are done in-line
+ */
+#include <machine/psl.h>
+
+#define _debug_spl(s) \
+({ \
+ register int _spl_r; \
+\
+ __asm __volatile ("clrl %0; movew sr,%0; movew %1,sr" : \
+ "&=d" (_spl_r) : "di" (s)); \
+ if ((_spl_r&PSL_IPL) > (s&PSL_IPL)) \
+ printf ("%s:%d:spl(%d) ==> spl(%d)!!\n",__FILE__,__LINE__, \
+ ((PSL_IPL&_spl_r)>>8), ((PSL_IPL&s)>>8)); \
+ _spl_r; \
+})
+
+#define _spl_no_check(s) \
+({ \
+ register int _spl_r; \
+\
+ __asm __volatile ("clrl %0; movew sr,%0; movew %1,sr" : \
+ "&=d" (_spl_r) : "di" (s)); \
+ _spl_r; \
+})
+#if defined (DEBUG)
+#define _spl _debug_spl
+#else
+#define _spl _spl_no_check
+#endif
+
+/* spl0 requires checking for software interrupts */
+#define spl1() _spl(PSL_S|PSL_IPL1)
+#define spl2() _spl(PSL_S|PSL_IPL2)
+#define spl3() _spl(PSL_S|PSL_IPL3)
+#define spl4() _spl(PSL_S|PSL_IPL4)
+#define spl5() _spl(PSL_S|PSL_IPL5)
+#define spl6() _spl(PSL_S|PSL_IPL6)
+#define spl7() _spl(PSL_S|PSL_IPL7)
+
+#define splnone() spl0()
+#define splsoftclock() spl1()
+#define splnet() spl1()
+#define splbio() spl3()
+#define splimp() spl3()
+/*
+ * lowered to spl4 to allow for serial input into
+ * private ringbuffer inspite of spltty
+ */
+#define spltty() spl4()
+#define splclock() spl6()
+#define splstatclock() spl6()
+#define splvm() spl6()
+#define splhigh() spl7()
+#define splsched() spl7()
+
+#define splx(s) (s & PSL_IPL ? _spl_no_check(s) : spl0())
+
+#ifdef KERNEL
+extern int cpuspeed;
+void delay __P((int));
+void DELAY __P((int));
+#else
+#define DELAY(n) { register int N = (n); while (--N > 0); }
+#endif
+
+#endif /* !_MACHINE_PARAM_H_ */
diff --git a/sys/arch/atari/include/pcb.h b/sys/arch/atari/include/pcb.h
new file mode 100644
index 00000000000..fbb5f018fbe
--- /dev/null
+++ b/sys/arch/atari/include/pcb.h
@@ -0,0 +1,77 @@
+/* $NetBSD: pcb.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: pcb.h 1.13 89/04/23$
+ *
+ * @(#)pcb.h 7.4 (Berkeley) 5/4/91
+ */
+
+#ifndef _MACHINE_PCB_H_
+#define _MACHINE_PCB_H_
+
+#include <machine/frame.h>
+
+/*
+ * ATARI process control block
+ */
+struct pcb
+{
+ short pcb_flags; /* misc. process flags (+0) */
+ short pcb_ps; /* processor status word (+2) */
+ int pcb_ustp; /* user segment table pointer (+4) */
+ int pcb_usp; /* user stack pointer (+8) */
+ int pcb_regs[12]; /* D0-D7, A0-A7 (+C) */
+ int pcb_cmap2; /* temporary copy PTE */
+ caddr_t pcb_onfault; /* for copyin/out faults */
+ struct fpframe pcb_fpregs; /* 68881/2 context save area */
+ int pcb_exec[16]; /* exec structure for core dumps */
+};
+
+/* flags (none currently used) */
+
+/*
+ * The pcb is augmented with machine-dependent additional data for
+ * core dumps. For the hp300, this includes an HP-UX exec header
+ * which is dumped for HP-UX processes.
+ */
+struct md_coredump {
+ int md_exec[16]; /* exec structure for HP-UX core dumps */
+};
+
+#endif /* !_MACHINE_PCB_H_ */
diff --git a/sys/arch/atari/include/pmap.h b/sys/arch/atari/include/pmap.h
new file mode 100644
index 00000000000..57dc7a5a6f7
--- /dev/null
+++ b/sys/arch/atari/include/pmap.h
@@ -0,0 +1,105 @@
+/* $NetBSD: pmap.h,v 1.1.1.1 1995/03/26 07:12:05 leo Exp $ */
+
+/*
+ * Copyright (c) 1987 Carnegie-Mellon University
+ * Copyright (c) 1991 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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.
+ *
+ * @(#)pmap.h 7.6 (Berkeley) 5/10/91
+ */
+
+#ifndef _MACHINE_PMAP_H_
+#define _MACHINE_PMAP_H_
+
+/*
+ * Pmap stuff (in anticipation of '40 support)
+ */
+struct pmap {
+ u_int *pm_ptab; /* KVA of page table */
+ u_int *pm_stab; /* KVA of segment table */
+ u_int *pm_rtab; /* KVA of 68040 root table */
+ int pm_stchanged; /* ST changed */
+ short pm_sref; /* segment table ref count */
+ short pm_count; /* pmap reference count */
+ long pm_ptpages; /* more stats: PT pages */
+ simple_lock_data_t pm_lock; /* lock on pmap */
+ struct pmap_statistics pm_stats; /* pmap statistics */
+};
+
+typedef struct pmap *pmap_t;
+extern pmap_t kernel_pmap;
+
+/*
+ * Macros for speed
+ */
+#define PMAP_ACTIVATE(pmapp, pcbp, iscurproc) \
+ if ((pmapp) != NULL && (pmapp)->pm_stchanged) { \
+ (pcbp)->pcb_ustp = \
+ atari_btop(pmap_extract(kernel_pmap, \
+ cpu040 ? (vm_offset_t)(pmapp)->pm_rtab : \
+ (vm_offset_t)(pmapp)->pm_stab)); \
+ if (iscurproc) \
+ loadustp((pcbp)->pcb_ustp); \
+ (pmapp)->pm_stchanged = FALSE; \
+ }
+#define PMAP_DEACTIVATE(pmapp, pcbp)
+
+/*
+ * For each vm_page_t, there is a list of all currently valid virtual
+ * mappings of that page. An entry is a pv_entry_t, the list is pv_table.
+ */
+typedef struct pv_entry {
+ struct pv_entry *pv_next; /* next pv_entry */
+ struct pmap *pv_pmap; /* pmap where mapping lies */
+ vm_offset_t pv_va; /* virtual address for mapping */
+ u_int *pv_ptste; /* non-zero if VA maps a PT page */
+ struct pmap *pv_ptpmap; /* if pv_ptste, pmap for PT page */
+ int pv_flags; /* flags */
+} *pv_entry_t;
+
+#define PV_CI 0x01 /* all entries must be cache inhibited */
+#define PV_PTPAGE 0x02 /* entry maps a page table page */
+
+#ifdef KERNEL
+extern pv_entry_t pv_table; /* array of entries, one per page */
+extern u_int *Sysmap;
+extern char *vmmap; /* map for mem, dumps, etc. */
+
+#define pa_index(pa) atop(pa - vm_first_phys)
+#define pa_to_pvh(pa) (&pv_table[pa_index(pa)])
+#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
+#endif KERNEL
+
+#endif /* !_MACHINE_PMAP_H_ */
diff --git a/sys/arch/atari/include/proc.h b/sys/arch/atari/include/proc.h
new file mode 100644
index 00000000000..8104668f7cc
--- /dev/null
+++ b/sys/arch/atari/include/proc.h
@@ -0,0 +1,52 @@
+/* $NetBSD: proc.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/*
+ * Copyright (c) 1991 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_PROC_H_
+#define _MACHINE_PROC_H_
+
+/*
+ * Machine-dependent part of the proc structure for atari.
+ */
+struct mdproc {
+ int *md_regs; /* registers on current frame */
+ long md_flags; /* machine-dependent flags */
+};
+
+/* md_flags */
+#define MDP_AST 0x0001 /* async trap pending */
+#define MDP_STACKADJ 0x0002 /* frame SP adjusted, might have to
+ undo when system call returns
+ ERESTART. */
+#endif /* !_MACHINE_PROC_H_ */
diff --git a/sys/arch/atari/include/profile.h b/sys/arch/atari/include/profile.h
new file mode 100644
index 00000000000..2c0aad6025c
--- /dev/null
+++ b/sys/arch/atari/include/profile.h
@@ -0,0 +1,8 @@
+/* $NetBSD: profile.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+#ifndef _MACHINE_PROFILE_H_
+#define _MACHINE_PROFILE_H_
+
+#include <m68k/profile.h>
+
+#endif
diff --git a/sys/arch/atari/include/psl.h b/sys/arch/atari/include/psl.h
new file mode 100644
index 00000000000..101d091b428
--- /dev/null
+++ b/sys/arch/atari/include/psl.h
@@ -0,0 +1,8 @@
+/* $NetBSD: psl.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_PSL_H_
+#define _MACHINE_PSL_H_
+
+#include <m68k/psl.h>
+
+#endif
diff --git a/sys/arch/atari/include/pte.h b/sys/arch/atari/include/pte.h
new file mode 100644
index 00000000000..3c65653104a
--- /dev/null
+++ b/sys/arch/atari/include/pte.h
@@ -0,0 +1,143 @@
+/* $NetBSD: pte.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: pte.h 1.11 89/09/03$
+ *
+ * @(#)pte.h 7.3 (Berkeley) 5/8/91
+ */
+
+#ifndef _MACHINE_PTE_H_
+#define _MACHINE_PTE_H_
+
+/*
+ * ATARI hardware segment/page table entries
+ */
+
+struct pte {
+ u_int pte;
+};
+
+typedef u_int pt_entry_t;
+
+struct ste {
+ u_int ste;
+};
+
+typedef u_int st_entry_t;
+
+#define PT_ENTRY_NULL ((u_int *) 0)
+#define ST_ENTRY_NULL ((u_int *) 0)
+
+#define SG_V 0x00000002 /* segment is valid */
+#define SG_NV 0x00000000
+#define SG_PROT 0x00000004 /* access protection mask */
+#define SG_RO 0x00000004
+#define SG_RW 0x00000000
+#define SG_U 0x00000008 /* modified bit (68040) */
+#define SG_FRAME 0xffffe000
+#define SG_IMASK 0xff000000
+#define SG_ISHIFT 24
+#define SG_PMASK 0x00ffe000
+#define SG_PSHIFT 13
+
+/* 68040 additions */
+#define SG4_IMASK1 0xfe000000
+#define SG4_ISHIFT1 25
+#define SG4_IMASK2 0x01fc0000
+#define SG4_IMASK 0xfffc0000
+#define SG4_PMASK 0x0003e000
+#define SG4_ISHIFT 18
+
+#define PG_V 0x00000001
+#define PG_NV 0x00000000
+#define PG_PROT 0x00000004
+#define PG_U 0x00000008
+#define PG_M 0x00000010
+#define PG_W 0x00000100
+#define PG_RO 0x00000004
+#define PG_RW 0x00000000
+#define PG_FRAME 0xffffe000
+#define PG_CI 0x00000040
+#define PG_SHIFT 13
+#define PG_PFNUM(x) (((x) & PG_FRAME) >> PG_SHIFT)
+
+/* 68040 additions */
+#define PG_CMASK 0x00000060 /* cache mode mask */
+#define PG_CWT 0x00000000 /* writethrough caching */
+#define PG_CCB 0x00000020 /* copyback caching */
+#define PG_CIS 0x00000040 /* cache inhibited serialized */
+#define PG_CIN 0x00000060 /* cache inhibited nonserialized */
+#define PG_SO 0x00000080 /* supervisor only */
+
+#define ATARI_040RTSIZE 512 /* root (level 1) table size */
+#define ATARI_040STSIZE 512 /* segment (level 2) table size */
+#define ATARI_040PTSIZE 128 /* page (level 3) table size */
+#define ATARI_STSIZE 1024 /* segment table size */
+/*
+ * ATARI_MAX_COREUPT maximum number of incore user page tables
+ * ATARI_USER_PTSIZE the number of bytes for user pagetables
+ * ATARI_PTBASE the VA start of the map from which upt's are allocated
+ * ATARI_PTSIZE the size of the map from which upt's are allocated
+ * ATARI_KPTSIZE size of kernel page table
+ * ATARI_MAX_KPTSIZE the most number of bytes for kpt pages
+ * ATARI_MAX_PTSIZE the number of bytes to map everything
+ */
+#define ATARI_MAX_COREUPT 1024
+#define ATARI_UPTSIZE roundup(VM_MAXUSER_ADDRESS / NPTEPG, NBPG)
+#define ATARI_UPTBASE 0x10000000
+#define ATARI_UPTMAXSIZE \
+ roundup((ATARI_MAX_COREUPT * ATARI_UPTSIZE), NBPG)
+#define ATARI_MAX_KPTSIZE \
+ (ATARI_MAX_COREUPT * ATARI_UPTSIZE / NPTEPG)
+#define ATARI_KPTSIZE \
+ roundup((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / NPTEPG, NBPG)
+#define ATARI_MAX_PTSIZE roundup(0xffffffff / NPTEPG, NBPG)
+
+/*
+ * Kernel virtual address to page table entry and to physical address.
+ */
+#define kvtopte(va) \
+ (&Sysmap[((unsigned)(va) - VM_MIN_KERNEL_ADDRESS) >> PGSHIFT])
+#define ptetokv(pt) \
+ ((((u_int *)(pt) - Sysmap) << PGSHIFT) + VM_MIN_KERNEL_ADDRESS)
+#define kvtophys(va) \
+ ((kvtopte(va)->pg_pfnum << PGSHIFT) | ((int)(va) & PGOFSET))
+
+
+#endif /* !_MACHINE_PTE_H_ */
diff --git a/sys/arch/atari/include/ptrace.h b/sys/arch/atari/include/ptrace.h
new file mode 100644
index 00000000000..5f414028faa
--- /dev/null
+++ b/sys/arch/atari/include/ptrace.h
@@ -0,0 +1,8 @@
+/* $NetBSD: ptrace.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_PTRACE_H_
+#define _MACHINE_PTRACE_H_
+
+#include <m68k/ptrace.h>
+
+#endif
diff --git a/sys/arch/atari/include/reg.h b/sys/arch/atari/include/reg.h
new file mode 100644
index 00000000000..15aa532214f
--- /dev/null
+++ b/sys/arch/atari/include/reg.h
@@ -0,0 +1,8 @@
+/* $NetBSD: reg.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+#ifndef _MACHINE_REG_H_
+#define _MACHINE_REG_H_
+
+#include <m68k/reg.h>
+
+#endif
diff --git a/sys/arch/atari/include/scu.h b/sys/arch/atari/include/scu.h
new file mode 100644
index 00000000000..a516266c095
--- /dev/null
+++ b/sys/arch/atari/include/scu.h
@@ -0,0 +1,106 @@
+/* $NetBSD: scu.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_SCU_H
+#define _MACHINE_SCU_H
+/*
+ * Atari TT hardware:
+ * SCU registers
+ */
+
+#define SCU ((struct scu *)AD_SCU)
+
+
+/*
+ * System control unit
+ */
+struct scu {
+ volatile u_char fil1;
+ volatile u_char sys_mask; /* System interrupt mask */
+ volatile u_char fil2;
+ volatile u_char sys_stat; /* System interrupt status */
+ volatile u_char fil3;
+ volatile u_char sys_int; /* System interrupter */
+ volatile u_char fil4;
+ volatile u_char vme_int; /* VME interrupter */
+ volatile u_char fil5;
+ volatile u_char gen_reg1; /* General purpose reg. 1 */
+ volatile u_char fil6;
+ volatile u_char gen_reg2; /* General purpose reg. 2 */
+ volatile u_char fil7;
+ volatile u_char vme_mask; /* VME interrupt mask */
+ volatile u_char fil8;
+ volatile u_char vme_stat; /* VME interrupt status */
+};
+
+/*
+ * Bits for system mask & stat.
+ * Read 'sys_stat' first, reading 'sys_mask' clears pending bits in 'sys_stat'.
+ */
+#define SCU_SYSFAIL 0x80 /* _Sysfail in VME bus (Auto vectored) */
+#define SCU_MFP 0x40 /* MFP interrupt (Programmable) */
+#define SCU_SCC 0x20 /* SCC interrupt (Programmable) */
+#define SCU_VSYNC 0x10 /* Vertical Sync (Auto vectored) */
+ /* 0x08 Not Used */
+#define SCU_HSYNC 0x04 /* Horizontal Sync (Auto vectored) */
+#define SCU_SYS_SOFT 0x02 /* System Software INT (Auto vectored) */
+ /* 0x00 Not Used */
+
+/*
+ * Bits for VME mask & stat.
+ * Read 'vme_stat' first, reading 'vme_mask' clears pending bits in 'vme_stat'.
+ * Not that MFP/SCC interrupts are hard-wired to the mentioned VME IRQ's.
+ * (or'ed).
+ */
+#define SCU_IRQ7 0x80
+#define SCU_IQ6_MFP 0x40 /* Also MFP interrupt */
+#define SCU_IRQ5_SCC 0x20 /* Also SCC interrupt */
+#define SCU_IRQ4 0x10
+#define SCU_IRQ3_SOFT 0x08 /* Also VME Software interrupt */
+#define SCU_IRQ2 0x04
+#define SCU_IRQ1 0x02
+ /* 0x00 Not Used */
+
+/*
+ * Generate/remove Software system interrupt.
+ * Note: Will not be cleared automatically!!
+ */
+#define SET_SOFT_INT (SCU->sys_int = 1)
+#define CLR_SOFT_INT (SCU->sys_int = 0)
+
+/*
+ * Generate/remove Software VME interrupt.
+ * Note: Will not be cleared automatically!!
+ */
+#define SET_VME_INT (SCU->vme_int = 1)
+#define CLR_VME_INT (SCU->vme_int = 0)
+#endif /* _MACHINE_SCU_H */
diff --git a/sys/arch/atari/include/setjmp.h b/sys/arch/atari/include/setjmp.h
new file mode 100644
index 00000000000..47f4334abeb
--- /dev/null
+++ b/sys/arch/atari/include/setjmp.h
@@ -0,0 +1,3 @@
+/* $NetBSD: setjmp.h,v 1.1.1.1 1995/03/26 07:12:09 leo Exp $ */
+
+#include <m68k/setjmp.h>
diff --git a/sys/arch/atari/include/signal.h b/sys/arch/atari/include/signal.h
new file mode 100644
index 00000000000..05f47cbd64a
--- /dev/null
+++ b/sys/arch/atari/include/signal.h
@@ -0,0 +1,8 @@
+/* $NetBSD: signal.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+#ifndef _MACHINE_SIGNAL_H_
+#define _MACHINE_SIGNAL_H_
+
+#include <m68k/signal.h>
+
+#endif
diff --git a/sys/arch/atari/include/stdarg.h b/sys/arch/atari/include/stdarg.h
new file mode 100644
index 00000000000..9b66132359a
--- /dev/null
+++ b/sys/arch/atari/include/stdarg.h
@@ -0,0 +1,4 @@
+/* $NetBSD: stdarg.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/* Just use the common m68k definition */
+#include <m68k/stdarg.h>
diff --git a/sys/arch/atari/include/tospart.h b/sys/arch/atari/include/tospart.h
new file mode 100644
index 00000000000..412ee61ea2a
--- /dev/null
+++ b/sys/arch/atari/include/tospart.h
@@ -0,0 +1,59 @@
+/* $NetBSD: tospart.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_TOSPART_H
+#define _MACHINE_TOSPART_H
+/*
+ * Format of GEM root sector
+ */
+typedef struct gem_part {
+ u_char p_flg; /* bit 0 is in-use flag */
+ u_char p_id[3]; /* id: GEM, BGM, XGM, UNX, MIX */
+ u_long p_st; /* block where partition starts */
+ u_long p_size; /* partition size */
+} GEM_PART;
+
+#define NGEM_PARTS 4 /* Max. partition infos in root sector */
+
+typedef struct gem_root {
+ u_char fill[0x1c2]; /* Filler, can be boot code */
+ u_long hd_siz; /* size of entire volume */
+ GEM_PART parts[NGEM_PARTS];/* see above */
+ u_long bsl_st; /* start of bad-sector list */
+ u_long bsl_cnt; /* # of blocks in bad-sect. list*/
+} GEM_ROOT;
+
+#define TOS_BSIZE 512 /* TOS blocksize */
+#define TOS_BBLOCK 0 /* TOS Bootblock */
+#define TOS_MAXPART 32 /* Maximum number of partitions we read */
+
+#endif /* _MACHINE_TOSPART_H */
diff --git a/sys/arch/atari/include/trap.h b/sys/arch/atari/include/trap.h
new file mode 100644
index 00000000000..192d7a95765
--- /dev/null
+++ b/sys/arch/atari/include/trap.h
@@ -0,0 +1,8 @@
+/* $NetBSD: trap.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_TRAP_H_
+#define _MACHINE_TRAP_H_
+
+#include <m68k/trap.h>
+
+#endif
diff --git a/sys/arch/atari/include/types.h b/sys/arch/atari/include/types.h
new file mode 100644
index 00000000000..625a9d06190
--- /dev/null
+++ b/sys/arch/atari/include/types.h
@@ -0,0 +1,8 @@
+/* $NetBSD: types.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+#ifndef _MACHINE_TYPES_H_
+#define _MACHINE_TYPES_H_
+
+#include <m68k/types.h>
+
+#endif
diff --git a/sys/arch/atari/include/varargs.h b/sys/arch/atari/include/varargs.h
new file mode 100644
index 00000000000..a1ff0b8af18
--- /dev/null
+++ b/sys/arch/atari/include/varargs.h
@@ -0,0 +1,4 @@
+/* $NetBSD: varargs.h,v 1.1.1.1 1995/03/26 07:12:06 leo Exp $ */
+
+/* Just use the common m68k definition */
+#include <m68k/varargs.h>
diff --git a/sys/arch/atari/include/video.h b/sys/arch/atari/include/video.h
new file mode 100644
index 00000000000..6ae02377477
--- /dev/null
+++ b/sys/arch/atari/include/video.h
@@ -0,0 +1,162 @@
+/* $NetBSD: video.h,v 1.1.1.1 1995/03/26 07:12:08 leo Exp $ */
+
+/*
+ * Copyright (c) 1995 Leo Weppelman.
+ * 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 Leo Weppelman.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MACHINE_VIDEO_H
+#define _MACHINE_VIDEO_H
+/*
+ * Access to circuitry for video
+ */
+
+#define VIDEO ((struct video *)AD_VIDEO)
+
+struct video {
+ volatile char vdb[64]; /* sparsely filled */
+ volatile u_short vd_st_rgb[16]; /* RGB for simultaneous colors (ST)*/
+ volatile u_char vd_st_res; /* ST resolution */
+ volatile char vd_fill1; /* filler */
+ volatile u_short vd_tt_res; /* TT-resultion mode */
+ volatile u_char vd_ste_hscroll; /* MEGA STe hor bitwise scroll */
+ volatile u_char vd_fill2[411];
+ volatile u_short vd_tt_rgb[256]; /* RGB for simultaneous TT colors */
+};
+
+#define vd_ramh vdb[ 1] /* base address Video RAM, high byte */
+#define vd_ramm vdb[ 3] /* base address Video RAM, mid byte */
+#define vd_raml vdb[13] /* base address Video RAM, low byte */
+#define vd_ptrh vdb[ 5] /* scan address Video RAM, high byte */
+#define vd_ptrm vdb[ 7] /* scan address Video RAM, mid byte */
+#define vd_ptrl vdb[ 9] /* scan address Video RAM, low byte */
+#define vd_sync vdb[10] /* synchronization mode */
+
+/* bits in vd_sync: */
+#define SYNC_EXT 0x01 /* extern sync */
+#define SYNC_50 0x02 /* 50 Hertz (used for color) */
+
+/* bits in vd_st_rgb[]: */
+#define RGB_B 0x0007
+#define RGB_G 0x0070
+#define RGB_R 0x0700
+
+/* some values for vd_st_rgb[]: */
+#define RGB_BLACK 0x0000
+#define RGB_RED 0x0700
+#define RGB_GREEN 0x0070
+#define RGB_BLUE 0x0007
+#define RGB_WHITE 0x0777
+#define RGB_MAGENTA 0x0707
+#define RGB_CYAN 0x0077
+#define RGB_YELLOW 0x0770
+#define RGB_LGREY 0x0555
+#define RGB_DGREY 0x0222
+
+/* values for vd_st_res: */
+#define RES_LOW 0x00 /* 320x200, 16 colors */
+#define RES_MID 0x01 /* 640x200, 4 colors */
+#define RES_HIGH 0x02 /* 640x400, monochrome */
+
+/* masks for vd_tt_res: */
+#define RES_STLOW 0x0000 /* 320x200, 16 colors */
+#define RES_STMID 0x0100 /* 640x200, 4 colors */
+#define RES_STHIGH 0x0200 /* 640x400, monochrome */
+#define RES_TTMID 0x0400 /* 640x480, 16 colors */
+#define RES_TTHIGH 0x0600 /* 1280x960, monochrome */
+#define RES_TTLOW 0x0700 /* 320x480, 256 colors */
+#define TT_PALLET 0x000f /* Pallette number */
+#define TT_HYMONO 0x8000 /* Hyper mono mode */
+#define TT_SHOLD 0x1000 /* Sample/hold mode */
+
+/*
+ * Yahama YM-2149 Programmable Sound Generator
+ */
+
+#define SOUND ((struct sound *)AD_SOUND)
+
+struct sound {
+ char sdb[4]; /* use only the even bytes */
+};
+
+#define sd_selr sdb[0] /* select register */
+#define sd_rdat sdb[0] /* read register data */
+#define sd_wdat sdb[2] /* write register data */
+
+/*
+ * Accessing the YM-2149 registers is indirect through ST-specific
+ * circuitry by writing the register number into sd_selr.
+ */
+#define YM_PA0 0 /* Period Channel A, bits 0-7 */
+#define YM_PA1 1 /* Period Channel A, bits 8-11 */
+#define YM_PB0 2 /* Period Channel B, bits 0-7 */
+#define YM_PB1 3 /* Period Channel B, bits 8-11 */
+#define YM_PC0 4 /* Period Channel C, bits 0-7 */
+#define YM_PC1 5 /* Period Channel C, bits 8-11 */
+#define YM_PNG 6 /* Period Noise Generator, bits 0-4 */
+#define YM_MFR 7 /* Multi Function Register */
+#define YM_VA 8 /* Volume Channel A */
+#define YM_VB 9 /* Volume Channel B */
+#define YM_VC 10 /* Volume Channel C */
+#define YM_PE0 11 /* Period Envelope, bits 0-7 */
+#define YM_PE1 12 /* Period Envelope, bits 8-15 */
+#define YM_WFE 13 /* Wave Form Envelope */
+#define YM_IOA 14 /* I/O port A */
+#define YM_IOB 15 /* I/O port B */
+
+/* bits in MFR: */
+#define SA_OFF 0x01 /* Sound Channel A off */
+#define SB_OFF 0x02 /* Sound Channel B off */
+#define SC_OFF 0x04 /* Sound Channel C off */
+#define NA_OFF 0x08 /* Noise Channel A off */
+#define NB_OFF 0x10 /* Noise Channel B off */
+#define NC_OFF 0x20 /* Noise Channel C off */
+#define PA_OUT 0x40 /* Port A for Output */
+#define PB_OUT 0x80 /* Port B for Output */
+
+/* bits in Vx: */
+#define VOLUME 0x0F /* 16 steps */
+#define ENVELOP 0x10 /* volume steered by envelope */
+
+/* bits in WFE: */
+#define WF_HOLD 0x01 /* hold after one period */
+#define WF_ALTERNAT 0x02 /* up and down (no saw teeth) */
+#define WF_ATTACK 0x04 /* start up */
+#define WF_CONTINUE 0x08 /* multiple periods */
+
+/* names for bits in Port A (ST specific): */
+#define PA_SIDEB 0x01 /* select floppy head - if double sided */
+#define PA_FLOP0 0x02 /* Drive Select Floppy 0 */
+#define PA_FLOP1 0x04 /* Drive Select Floppy 1 */
+#define PA_SRTS 0x08 /* Serial RTS */
+#define PA_SDTR 0x10 /* Serial DTR */
+#define PA_PSTROBE 0x20 /* Parallel Strobe */
+#define PA_USER 0x40 /* Free Pin on Monitor Connector */
+/* 0x80 reserved */
+
+#endif /* _MACHINE_VIDEO_H */
diff --git a/sys/arch/atari/include/vmparam.h b/sys/arch/atari/include/vmparam.h
new file mode 100644
index 00000000000..07025dfa6c5
--- /dev/null
+++ b/sys/arch/atari/include/vmparam.h
@@ -0,0 +1,168 @@
+/* $NetBSD: vmparam.h,v 1.1.1.1 1995/03/26 07:12:07 leo Exp $ */
+
+/*
+ * Copyright (c) 1988 University of Utah.
+ * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 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: Utah $Hdr: vmparam.h 1.16 91/01/18$
+ *
+ * @(#)vmparam.h 7.3 (Berkeley) 5/7/91
+ */
+
+#ifndef _MACHINE_VMPARAM_H_
+#define _MACHINE_VMPARAM_H_
+
+#include <machine/pte.h>
+
+/*
+ * Machine dependent constants for HP300
+ */
+/*
+ * USRTEXT is the start of the user text/data space, while USRSTACK
+ * is the top (end) of the user stack. LOWPAGES and HIGHPAGES are
+ * the number of pages from the beginning of the P0 region to the
+ * beginning of the text and from the beginning of the P1 region to the
+ * beginning of the stack respectively.
+ *
+ * These are a mixture of i386, sun3 and hp settings..
+ */
+
+/* Sun settings. Still hope, that I might get sun3 binaries to work... */
+#define USRTEXT 0x2000
+#define USRSTACK 0x0E000000
+#define LOWPAGES btoc(USRTEXT)
+#define KUSER_AREA (-UPAGES*NBPG)
+/*
+ * Virtual memory related constants, all in bytes
+ */
+
+#ifndef MAXTSIZ
+#define MAXTSIZ (6*1024*1024) /* max text size */
+#endif
+#ifndef DFLDSIZ
+#define DFLDSIZ (32*1024*1024) /* initial data size limit */
+#endif
+#ifndef MAXDSIZ
+#define MAXDSIZ (32*1024*1024) /* max data size */
+#endif
+#ifndef DFLSSIZ
+#define DFLSSIZ (2*1024*1024) /* initial stack size limit */
+#endif
+#ifndef MAXSSIZ
+#define MAXSSIZ MAXDSIZ /* max stack size */
+#endif
+
+/*
+ * Default sizes of swap allocation chunks (see dmap.h).
+ * The actual values may be changed in vminit() based on MAXDSIZ.
+ * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
+ * DMMIN should be at least ctod(1) so that vtod() works.
+ * vminit() insures this.
+ */
+#define DMMIN 32 /* smallest swap allocation */
+#define DMMAX NBPG /* largest potential swap allocation */
+
+/*
+ * Sizes of the system and user portions of the system page table.
+ */
+/* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
+#define SYSPTSIZE (2 * NPTEPG) /* 16mb */
+#define USRPTSIZE (1 * NPTEPG) /* 16mb */
+
+/*
+ * PTEs for mapping user space into the kernel for phyio operations.
+ * One page is enough to handle 16Mb of simultaneous raw IO operations.
+ */
+#ifndef USRIOSIZE
+#define USRIOSIZE (1 * NPTEPG) /* 16mb */
+#endif
+
+/*
+ * PTEs for system V style shared memory.
+ * This is basically slop for kmempt which we actually allocate (malloc) from.
+ */
+#ifndef SHMMAXPGS
+#define SHMMAXPGS (1 * NPTEPG) /* 16mb */
+#endif
+
+/*
+ * The time for a process to be blocked before being very swappable.
+ * This is a number of seconds which the system takes as being a non-trivial
+ * amount of real time. You probably shouldn't change this;
+ * it is used in subtle ways (fractions and multiples of it are, that is, like
+ * half of a ``long time'', almost a long time, etc.)
+ * It is related to human patience and other factors which don't really
+ * change over time.
+ */
+#define MAXSLP 20
+
+/*
+ * A swapped in process is given a small amount of core without being bothered
+ * by the page replacement algorithm. Basically this says that if you are
+ * swapped in you deserve some resources. We protect the last SAFERSS
+ * pages against paging and will just swap you out rather than paging you.
+ * Note that each process has at least UPAGES+CLSIZE pages which are not
+ * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
+ * number just means a swapped in process is given around 25k bytes.
+ * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
+ * so we loan each swapped in process memory worth 100$, or just admit
+ * that we don't consider it worthwhile and swap it out to disk which costs
+ * $30/mb or about $0.75.
+ */
+#define SAFERSS 4 /* nominal ``small'' resident set size
+ protected against replacement */
+
+/*
+ * user/kernel map constants
+ */
+#define VM_MIN_ADDRESS ((vm_offset_t)0)
+#define VM_MAXUSER_ADDRESS ((vm_offset_t)(USRSTACK))
+#define VM_MAX_ADDRESS ((vm_offset_t)(0-(UPAGES*NBPG)))
+#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0)
+#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(0-NBPG))
+
+/*
+ * virtual sizes (bytes) for various kernel submaps
+ */
+#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
+#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
+#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
+
+/*
+ * number of kernel PT pages (initial only, can grow dynamically)
+ */
+#define VM_KERNEL_PT_PAGES ((vm_size_t)2) /* XXX: SYSPTSIZE */
+#endif /* !_MACHINE_VMPARAM_H_ */