summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/include
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1997-03-08 16:17:07 +0000
committerbriggs <briggs@cvs.openbsd.org>1997-03-08 16:17:07 +0000
commitff0673c19523d5b6bd01a362faa04af8f4ca9c13 (patch)
tree445632a2a4924f1e56bf8949a24dd9db30df5336 /sys/arch/mac68k/include
parent4c4f43623ba216b0bf625d16ef1c4eb0f8eb529c (diff)
Sync with NetBSD of about 4 March.
Diffstat (limited to 'sys/arch/mac68k/include')
-rw-r--r--sys/arch/mac68k/include/cpu.h8
-rw-r--r--sys/arch/mac68k/include/param.h17
-rw-r--r--sys/arch/mac68k/include/pmap.h5
-rw-r--r--sys/arch/mac68k/include/viareg.h68
4 files changed, 64 insertions, 34 deletions
diff --git a/sys/arch/mac68k/include/cpu.h b/sys/arch/mac68k/include/cpu.h
index bf16662a8f3..636c0788a7b 100644
--- a/sys/arch/mac68k/include/cpu.h
+++ b/sys/arch/mac68k/include/cpu.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: cpu.h,v 1.13 1997/01/24 01:35:40 briggs Exp $ */
-/* $NetBSD: cpu.h,v 1.44 1997/01/20 05:08:00 scottr Exp $ */
+/* $OpenBSD: cpu.h,v 1.14 1997/03/08 16:17:00 briggs Exp $ */
+/* $NetBSD: cpu.h,v 1.45 1997/02/10 22:13:40 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -180,7 +180,9 @@ extern volatile u_int8_t ssir;
__BEGIN_DECLS
/* machdep.c */
-u_int get_mapping __P((void));
+void mac68k_set_bell_callback __P((int (*)(void *, int, int, int), void *));
+int mac68k_ring_bell __P((int, int, int));
+u_int get_mapping __P((void));
/* locore.s */
void m68881_restore __P((struct fpframe *));
diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h
index a9fed796565..06b9d6b78c0 100644
--- a/sys/arch/mac68k/include/param.h
+++ b/sys/arch/mac68k/include/param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: param.h,v 1.5 1996/05/26 18:35:56 briggs Exp $ */
-/* $NetBSD: param.h,v 1.26 1996/05/05 06:17:49 briggs Exp $ */
+/* $OpenBSD: param.h,v 1.6 1997/03/08 16:17:00 briggs Exp $ */
+/* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -97,9 +97,16 @@
* 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.
+ *
+ * ALIGNED_POINTER is a boolean macro that checks whether an address
+ * is valid to fetch data elements of type t from on this architecture.
+ * This does not reflect the optimal alignment, just the possibility
+ * (within reasonable limits).
+ *
*/
-#define ALIGNBYTES (sizeof(int) - 1)
-#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#define ALIGNBYTES (sizeof(int) - 1)
+#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
#define PGSHIFT 12 /* LOG2(NBPG) */
#define NBPG (1 << PGSHIFT) /* bytes/page */
@@ -135,7 +142,9 @@
* of the hardware page size.
*/
#define MSIZE 128 /* size of an mbuf */
+#ifndef MCLSHIFT
#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
+#endif /* MCLSHIFT */
#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
diff --git a/sys/arch/mac68k/include/pmap.h b/sys/arch/mac68k/include/pmap.h
index 0b016d57c32..65ce48fa6e3 100644
--- a/sys/arch/mac68k/include/pmap.h
+++ b/sys/arch/mac68k/include/pmap.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: pmap.h,v 1.4 1997/02/18 05:13:13 gene Exp $ */
-/* $NetBSD: pmap.h,v 1.13 1996/05/18 18:52:41 briggs Exp $ */
+/* $OpenBSD: pmap.h,v 1.5 1997/03/08 16:17:01 briggs Exp $ */
+/* $NetBSD: pmap.h,v 1.14 1997/02/02 18:19:55 scottr Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -211,7 +211,6 @@ void TBIA __P((void));
void TBIS __P((vm_offset_t));
void DCFP __P((vm_offset_t));
void ICPP __P((vm_offset_t));
-void copypage __P((void *, void *));
__END_DECLS
#endif /* _KERNEL */
diff --git a/sys/arch/mac68k/include/viareg.h b/sys/arch/mac68k/include/viareg.h
index 0883aa36d26..fbfc255854c 100644
--- a/sys/arch/mac68k/include/viareg.h
+++ b/sys/arch/mac68k/include/viareg.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: viareg.h,v 1.5 1997/01/24 01:35:41 briggs Exp $ */
-/* $NetBSD: viareg.h,v 1.5 1996/10/29 05:42:16 briggs Exp $ */
+/* $OpenBSD: viareg.h,v 1.6 1997/03/08 16:17:01 briggs Exp $ */
+/* $NetBSD: viareg.h,v 1.6 1997/02/28 07:41:41 scottr Exp $ */
/*-
* Copyright (C) 1993 Allen K. Briggs, Chris P. Caputo,
@@ -90,25 +90,47 @@
#define DB2O_vCDis 0x01
#define DB2O_CEnable 0x01
- /* VIA1 interrupt bits */
+/*
+ * VIA1 interrupts
+ */
+#define VIA1_T1 6
+#define VIA1_T2 5
+#define VIA1_ADBCLK 4
+#define VIA1_ADBDATA 3
+#define VIA1_ADBRDY 2
+#define VIA1_VBLNK 1
+#define VIA1_ONESEC 0
+
+/* VIA1 interrupt bits */
#define V1IF_IRQ 0x80
-#define V1IF_T1 0x40
-#define V1IF_T2 0x20
-#define V1IF_ADBCLK 0x10
-#define V1IF_ADBDATA 0x08
-#define V1IF_ADBRDY 0x04
-#define V1IF_VBLNK 0x02
-#define V1IF_ONESEC 0x01
-
- /* VIA2 interrupt bits */
-#define V2IF_IRQ 0x80
-#define V2IF_T1 0x40
-#define V2IF_T2 0x20
-#define V2IF_ASC 0x10
-#define V2IF_SCSIIRQ 0x08
-#define V2IF_EXPIRQ 0x04
-#define V2IF_SLOTINT 0x02
-#define V2IF_SCSIDRQ 0x01
+#define V1IF_T1 (1 << VIA1_T1)
+#define V1IF_T2 (1 << VIA1_T2)
+#define V1IF_ADBCLK (1 << VIA1_ADBCLK)
+#define V1IF_ADBDATA (1 << VIA1_ADBDATA)
+#define V1IF_ADBRDY (1 << VIA1_ADBRDY)
+#define V1IF_VBLNK (1 << VIA1_VBLNK)
+#define V1IF_ONESEC (1 << VIA1_ONESEC)
+
+/*
+ * VIA2 interrupts
+ */
+#define VIA2_T1 6
+#define VIA2_T2 5
+#define VIA2_ASC 4
+#define VIA2_SCSIIRQ 3
+#define VIA2_EXPIRQ 2
+#define VIA2_SLOTINT 1
+#define VIA2_SCSIDRQ 0
+
+/* VIA2 interrupt bits */
+#define V2IF_IRQ 0x80
+#define V2IF_T1 (1 << VIA2_T1)
+#define V2IF_T2 (1 << VIA2_T2)
+#define V2IF_ASC (1 << VIA2_ASC)
+#define V2IF_SCSIIRQ (1 << VIA2_SCSIIRQ)
+#define V2IF_EXPIRQ (1 << VIA2_EXPIRQ)
+#define V2IF_SLOTINT (1 << VIA2_SLOTINT)
+#define V2IF_SCSIDRQ (1 << VIA2_SCSIDRQ)
#define VIA1_INTS (V1IF_T1 | V1IF_ADBRDY)
#define VIA2_INTS (V2IF_T1 | V2IF_ASC | V2IF_SCSIIRQ | V2IF_SLOTINT | \
@@ -175,10 +197,8 @@ void via_shutdown __P((void));
void via_set_modem __P((int));
int add_nubus_intr __P((int, void (*) __P((void *, int)), void *));
void enable_nubus_intr __P((void));
-void mac68k_register_scsi_irq __P((void (*)(void *), void *clnt));
-void mac68k_register_scsi_b_irq __P((void (*)(void *), void *clnt));
-void mac68k_register_scsi_drq __P((void (*)(void *), void *clnt));
-void mac68k_register_via1_t1_irq __P((void (*)(void *)));
+void via1_register_irq __P((int, void (*)(void *), void *));
+void via2_register_irq __P((int, void (*)(void *), void *));
extern void (*via1itab[7]) __P((void *));
extern void (*via2itab[7]) __P((void *));