summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/include/param.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mac68k/include/param.h')
-rw-r--r--sys/arch/mac68k/include/param.h96
1 files changed, 5 insertions, 91 deletions
diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h
index 6628d08f6df..eff676c12d0 100644
--- a/sys/arch/mac68k/include/param.h
+++ b/sys/arch/mac68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.8 1998/05/03 07:10:47 gene Exp $ */
+/* $OpenBSD: param.h,v 1.9 1999/04/24 06:39:40 downsj Exp $ */
/* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */
/*
@@ -80,11 +80,8 @@
#ifndef _MAC68K_PARAM_H_
#define _MAC68K_PARAM_H_
-#ifndef PSL_IPL
-#include <machine/psl.h>
-#endif /* PSL_IPL */
-
/* Pull in interrupt glue */
+#include <machine/psl.h>
#include <machine/intr.h>
/*
@@ -92,72 +89,19 @@
*/
#define _MACHINE mac68k
#define MACHINE "mac68k"
-#define _MACHINE_ARCH m68k
-#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.
- *
- * 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 ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
#define PGSHIFT 12 /* LOG2(NBPG) */
-#define NBPG (1 << PGSHIFT) /* bytes/page */
-#define PGOFSET (NBPG-1) /* byte offset into page */
-#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
+#define KERNBASE 0x00000000 /* start of kernel virtual */
#define SEGSHIFT 22 /* LOG2(NBSEG) */
#define NBSEG (1 << SEGSHIFT) /* bytes/segment */
#define SEGOFSET (NBSEG-1) /* byte offset into segment */
-#define KERNBASE 0x00000000 /* start of kernel virtual */
-#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
-
-#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
-#define DEV_BSIZE (1 << DEV_BSHIFT)
-#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
-
-#define CLSIZELOG2 0
-#define CLSIZE (1 << CLSIZELOG2)
-
-/* 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 3 /* pages of u-area */
-#define USPACE (UPAGES * NBPG) /* total size of u-area */
-/*
- * 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 */
-#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 */
+#include <m68k/param.h>
-#ifndef NMBCLUSTERS
-#ifdef GATEWAY
-#define NMBCLUSTERS 512 /* map size, max cluster allocation */
-#else
-#define NMBCLUSTERS 256 /* map size, max cluster allocation */
-#endif
-#endif
+#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
/*
* Size of kernel malloc arena in CLBYTES-sized logical pages
@@ -166,36 +110,6 @@
#define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
#endif
-/* pages ("clicks") to disk blocks */
-#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
-#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
-
-/* pages to bytes */
-#define ctob(x) ((x) << PGSHIFT)
-#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
-
-/* bytes to disk blocks */
-#define btodb(x) ((x) >> DEV_BSHIFT)
-#define dbtob(x) ((x) << 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 mac68k_round_page(x) ((((unsigned)(x)) + PGOFSET) & ~PGOFSET)
-#define mac68k_trunc_page(x) ((unsigned)(x) & ~PGOFSET)
-#define mac68k_btop(x) ((unsigned)(x) >> PGSHIFT)
-#define mac68k_ptob(x) ((unsigned)(x) << PGSHIFT)
-
-#include <machine/psl.h>
-
#if defined(_KERNEL) && !defined(_LOCORE)
void delay __P((unsigned));
#define DELAY(ms) delay(ms)