diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-18 13:40:05 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-18 13:40:05 +0000 |
commit | 2157b0ba8b467d175588a39d0235e3f42cfa0167 (patch) | |
tree | ab27e576639f38402b47a6af61ab8711d85d7ce7 /sys/arch/amiga/include | |
parent | 9557efb948677ebfd961c6f49a7b69e3c722c206 (diff) |
Merge of NetBSD changes upto last week or so, with the exception of stand/
Diffstat (limited to 'sys/arch/amiga/include')
-rw-r--r-- | sys/arch/amiga/include/conf.h | 4 | ||||
-rw-r--r-- | sys/arch/amiga/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/amiga/include/mtpr.h | 5 | ||||
-rw-r--r-- | sys/arch/amiga/include/param.h | 112 | ||||
-rw-r--r-- | sys/arch/amiga/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/amiga/include/proc.h | 9 | ||||
-rw-r--r-- | sys/arch/amiga/include/psl.h | 4 | ||||
-rw-r--r-- | sys/arch/amiga/include/vmparam.h | 8 |
8 files changed, 42 insertions, 110 deletions
diff --git a/sys/arch/amiga/include/conf.h b/sys/arch/amiga/include/conf.h index 84f54aeed03..ec8b7b25957 100644 --- a/sys/arch/amiga/include/conf.h +++ b/sys/arch/amiga/include/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.8 1997/05/16 18:54:18 niklas Exp $ */ +/* $OpenBSD: conf.h,v 1.9 1997/09/18 13:40:01 niklas Exp $ */ /* $NetBSD: conf.h,v 1.4 1996/11/30 01:13:07 is Exp $ */ /* @@ -35,8 +35,6 @@ cdev_decl(acd); cdev_decl(com); -cdev_decl(drcom); - bdev_decl(fd); cdev_decl(fd); diff --git a/sys/arch/amiga/include/cpu.h b/sys/arch/amiga/include/cpu.h index d63e077db00..9b1733a4b65 100644 --- a/sys/arch/amiga/include/cpu.h +++ b/sys/arch/amiga/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.9 1997/01/16 09:25:46 niklas Exp $ */ +/* $OpenBSD: cpu.h,v 1.10 1997/09/18 13:40:01 niklas Exp $ */ /* $NetBSD: cpu.h,v 1.36 1996/09/11 00:11:42 thorpej Exp $ */ /* @@ -227,8 +227,6 @@ int badaddr __P((caddr_t)); int badbaddr __P((caddr_t)); void bootsync __P((void)); void dumpconf __P((void)); -struct frame; -void regdump __P((struct frame *, int)); /* * Prototypes from sys_machdep.c: diff --git a/sys/arch/amiga/include/mtpr.h b/sys/arch/amiga/include/mtpr.h index 623c88ab546..6723b955520 100644 --- a/sys/arch/amiga/include/mtpr.h +++ b/sys/arch/amiga/include/mtpr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mtpr.h,v 1.3 1997/01/16 09:25:57 niklas Exp $ */ +/* $OpenBSD: mtpr.h,v 1.4 1997/09/18 13:40:02 niklas Exp $ */ /* $NetBSD: mtpr.h,v 1.10 1996/05/09 20:31:53 is Exp $ */ /* @@ -81,6 +81,9 @@ extern unsigned char ssir; #define setsoftclock() (ssir |= SIR_CLOCK, setsoftint()) #define setsoftcback() (ssir |= SIR_CBACK, setsoftint()) +void softintr_schedule __P((void *)); +void *softintr_establish __P((int, void (*)(void *), void *)); + #endif /* _KERNEL */ #endif /* !_MACHINE_MPTR_H_ */ diff --git a/sys/arch/amiga/include/param.h b/sys/arch/amiga/include/param.h index be4d5b0b21d..5b04b0daf87 100644 --- a/sys/arch/amiga/include/param.h +++ b/sys/arch/amiga/include/param.h @@ -1,5 +1,5 @@ -/* $OpenBSD: param.h,v 1.9 1997/09/17 17:44:05 downsj Exp $ */ -/* $NetBSD: param.h,v 1.30 1996/09/28 15:54:04 mhitch Exp $ */ +/* $OpenBSD: param.h,v 1.10 1997/09/18 13:40:02 niklas Exp $ */ +/* $NetBSD: param.h,v 1.35 1997/07/10 08:22:36 veego Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -42,119 +42,49 @@ * * @(#)param.h 7.8 (Berkeley) 6/28/91 */ -#ifndef _MACHINE_PARAM_H_ -#define _MACHINE_PARAM_H_ + +#ifndef _MACHINE_PARAM_H_ +#define _MACHINE_PARAM_H_ /* * Machine dependent constants for amiga */ #define _MACHINE amiga #define MACHINE "amiga" -#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. - */ -#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 KERNBASE 0x00000000 /* start of kernel virtual */ -#define NBSEG ((mmutype == MMU_68040) ? 32*NBPG : 2048*NBPG) /* bytes/segment */ -#define SEGOFSET (NBSEG-1) /* byte offset into segment */ #define SEGSHIFT 24 /* LOG2(NBSEG) [68030 value] */ - -#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 */ +/* bytes/segment */ +/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */ +#define NBSEG ((mmutype == MMU_68040) \ + ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT))) +#define SEGOFSET (NBSEG-1) /* byte offset into segment */ #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 MCLSHIFT 11 -#define MCLBYTES (1 << MCLSHIFT) -#define MCLOFSET (MCLBYTES - 1) -#ifndef NMBCLUSTERS -#ifdef GATEWAY -#define NMBCLUSTERS 1024 /* map size, max cluster allocation */ -#else -#define NMBCLUSTERS 512 /* map size, max cluster allocation */ -#endif -#endif +#include <m68k/param.h> + +#define NPTEPG (NBPG/(sizeof (pt_entry_t))) /* * Size of kernel malloc arena in CLBYTES-sized logical pages - */ + */ #ifndef NKMEMCLUSTERS -#define NKMEMCLUSTERS (3072*1024/CLBYTES) +#define NKMEMCLUSTERS (3072 * 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 amiga_round_seg(x) ((((unsigned)(x)) + NBSEG - 1) & ~(NBSEG-1)) -#define amiga_trunc_seg(x) ((unsigned)(x) & ~(NBSEG-1)) -#define amiga_round_page(x) ((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1)) -#define amiga_trunc_page(x) ((unsigned)(x) & ~(NBPG-1)) -#define amiga_btop(x) ((unsigned)(x) >> PGSHIFT) -#define amiga_ptob(x) ((unsigned)(x) << PGSHIFT) - /* * spl functions; all are normally done in-line */ #include <machine/psl.h> #ifdef _KERNEL -#ifndef _LOCORE -void delay __P((u_int)); -void DELAY __P((u_int)); -#endif -#endif +#ifndef _LOCORE +void delay __P((int)); +void DELAY __P((int)); +#endif /* !_LOCORE */ +#endif /* _KERNEL */ #endif /* !_MACHINE_PARAM_H_ */ diff --git a/sys/arch/amiga/include/pmap.h b/sys/arch/amiga/include/pmap.h index e627e170091..da51ee3ed92 100644 --- a/sys/arch/amiga/include/pmap.h +++ b/sys/arch/amiga/include/pmap.h @@ -1,5 +1,5 @@ -/* $OpenBSD: pmap.h,v 1.2 1997/01/16 09:26:01 niklas Exp $ */ -/* $NetBSD: pmap.h,v 1.16 1995/09/29 13:52:08 chopps Exp $ */ +/* $OpenBSD: pmap.h,v 1.3 1997/09/18 13:40:03 niklas Exp $ */ +/* $NetBSD: pmap.h,v 1.17 1997/06/10 18:34:52 veego Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -83,7 +83,7 @@ typedef struct pmap *pmap_t; #define PMAP_ACTIVATE(pmapp, pcbp, iscurproc) \ if ((pmapp) != NULL && (pmapp)->pm_stchanged) { \ (pcbp)->pcb_ustp = \ - amiga_btop((vm_offset_t)(pmapp)->pm_stpa); \ + m68k_btop((vm_offset_t)(pmapp)->pm_stpa); \ if (iscurproc) \ loadustp((pcbp)->pcb_ustp); \ (pmapp)->pm_stchanged = FALSE; \ diff --git a/sys/arch/amiga/include/proc.h b/sys/arch/amiga/include/proc.h index 22e636ee922..bff72acd8c1 100644 --- a/sys/arch/amiga/include/proc.h +++ b/sys/arch/amiga/include/proc.h @@ -1,5 +1,5 @@ -/* $OpenBSD: proc.h,v 1.3 1997/01/16 09:26:02 niklas Exp $ */ -/* $NetBSD: proc.h,v 1.10 1994/10/26 02:06:27 cgd Exp $ */ +/* $OpenBSD: proc.h,v 1.4 1997/09/18 13:40:03 niklas Exp $ */ +/* $NetBSD: proc.h,v 1.12 1997/06/08 10:35:39 veego Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -47,10 +47,9 @@ struct mdproc { }; /* md_flags */ -#define MDP_AST 0x0001 /* async trap pending */ -#define MDP_STACKADJ 0x0002 /* frame SP adjusted, might have to +#define MDP_STACKADJ 0x0001 /* frame SP adjusted, might have to undo when system call returns ERESTART. */ -#define MDP_UNCACHE_WX 0x0004 /* The process might modify code, so +#define MDP_UNCACHE_WX 0x0002 /* The process might modify code, so don't cache writeable executable pages. */ #endif /* !_MACHINE_PROC_H_ */ diff --git a/sys/arch/amiga/include/psl.h b/sys/arch/amiga/include/psl.h index e3c5def73aa..4c52270e45c 100644 --- a/sys/arch/amiga/include/psl.h +++ b/sys/arch/amiga/include/psl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psl.h,v 1.8 1997/01/16 09:26:04 niklas Exp $ */ +/* $OpenBSD: psl.h,v 1.9 1997/09/18 13:40:04 niklas Exp $ */ /* $NetBSD: psl.h,v 1.11 1996/11/30 00:33:49 is Exp $ */ #ifndef _MACHINE_PSL_H_ @@ -115,7 +115,7 @@ spllower(npsl) * * XXX should ttyspl be volatile? I think not; it is intended to be set only * during xxx_attach() time, and will be used only later. - * -is + * -is */ extern u_int16_t amiga_ttyspl; diff --git a/sys/arch/amiga/include/vmparam.h b/sys/arch/amiga/include/vmparam.h index c8053c4b8b5..28738d5982b 100644 --- a/sys/arch/amiga/include/vmparam.h +++ b/sys/arch/amiga/include/vmparam.h @@ -1,5 +1,5 @@ -/* $OpenBSD: vmparam.h,v 1.3 1996/08/04 01:15:15 niklas Exp $ */ -/* $NetBSD: vmparam.h,v 1.14 1996/04/21 21:13:23 veego Exp $ */ +/* $OpenBSD: vmparam.h,v 1.4 1997/09/18 13:40:04 niklas Exp $ */ +/* $NetBSD: vmparam.h,v 1.16 1997/07/12 16:18:36 perry Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -141,6 +141,10 @@ * 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. + * Update: memory prices have changed recently (9/96). At the current + * value of $6 per megabyte, we lend each swapped in process memory worth + * $0.15, or just admit that we don't consider it worthwhile and swap it out + * to disk which costs $0.20/MB, or just under half a cent. */ #define SAFERSS 4 /* nominal ``small'' resident set size protected against replacement */ |