diff options
Diffstat (limited to 'sys/arch/m68k/include')
-rw-r--r-- | sys/arch/m68k/include/ansi.h | 6 | ||||
-rw-r--r-- | sys/arch/m68k/include/asm.h | 32 | ||||
-rw-r--r-- | sys/arch/m68k/include/asm_single.h | 59 | ||||
-rw-r--r-- | sys/arch/m68k/include/endian.h | 4 | ||||
-rw-r--r-- | sys/arch/m68k/include/reg.h | 9 | ||||
-rw-r--r-- | sys/arch/m68k/include/sysctl.h | 6 |
6 files changed, 101 insertions, 15 deletions
diff --git a/sys/arch/m68k/include/ansi.h b/sys/arch/m68k/include/ansi.h index 0da4f53d0ed..f3162b9c895 100644 --- a/sys/arch/m68k/include/ansi.h +++ b/sys/arch/m68k/include/ansi.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ansi.h,v 1.2 1996/04/19 06:18:13 niklas Exp $ */ -/* $NetBSD: ansi.h,v 1.6 1996/03/16 01:31:52 jtc Exp $ */ +/* $OpenBSD: ansi.h,v 1.3 1997/01/13 11:51:08 niklas Exp $ */ +/* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:52 jtc Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -54,6 +54,8 @@ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ long /* time() */ #define _BSD_VA_LIST_ char * /* va_list */ +#define _BSD_CLOCKID_T_ int +#define _BSD_TIMER_T_ int /* * Runes (wchar_t) is declared to be an ``int'' instead of the more natural diff --git a/sys/arch/m68k/include/asm.h b/sys/arch/m68k/include/asm.h index 8ff526531db..c5d656fadd9 100644 --- a/sys/arch/m68k/include/asm.h +++ b/sys/arch/m68k/include/asm.h @@ -1,5 +1,5 @@ -/* $OpenBSD: asm.h,v 1.2 1996/05/29 18:38:28 niklas Exp $ */ -/* $NetBSD: asm.h,v 1.10 1995/03/26 17:08:36 briggs Exp $ */ +/* $OpenBSD: asm.h,v 1.3 1997/01/13 11:51:09 niklas Exp $ */ +/* $NetBSD: asm.h,v 1.12 1996/11/30 02:49:00 jtc Exp $ */ /* * Copyright (c) 1994 Allen Briggs @@ -60,17 +60,33 @@ .text; .even; .globl name; name: #endif +#ifdef GPROF +#define _PROF_PROLOG link a6,#0; jbsr mcount; unlk a6 +#else +#define _PROF_PROLOG +#endif +#define ENTRY(name) _ENTRY(_C_LABEL(name)) _PROF_PROLOG +#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)) _PROF_PROLOG + +/* + * The m68k ALTENTRY macro is very different than the traditional + * implementation used by other OpenBSD ports. Usually ALTENTRY + * simply provides an alternate function entry point. The m68k + * definition takes a second argument and jumps inside the second + * function when profiling is enabled. + * + * The m68k behavior is similar to the ENTRY2 macro found in + * solaris' asm_linkage.h. + * + * Providing ENTRY2 and changing all the code that uses ALTENTRY + * to use it would be a desirable change. + */ #ifdef PROF -#define ENTRY(name) \ - _ENTRY(_C_LABEL(name)); link a6,#0; jbsr mcount; unlk a6 -#define ALTENTRY(name, rname) \ - ENTRY(name); jra rname+12 +#define ALTENTRY(name, rname) ENTRY(name); jra rname+12 #else -#define ENTRY(name) _ENTRY(_C_LABEL(name)) #define ALTENTRY(name, rname) _ENTRY(_C_LABEL(name)) #endif -#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)) #define RCSID(x) .text; .asciz x diff --git a/sys/arch/m68k/include/asm_single.h b/sys/arch/m68k/include/asm_single.h new file mode 100644 index 00000000000..96ef42e985b --- /dev/null +++ b/sys/arch/m68k/include/asm_single.h @@ -0,0 +1,59 @@ +/* $OpenBSD: asm_single.h,v 1.1 1997/01/13 11:51:09 niklas Exp $ */ +/* $NetBSD: asm_single.h,v 1.1 1996/09/16 06:03:58 leo Exp $ */ + +/* + * Copyright (c) 1996 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 _M68K_ASM_SINGLE_H +#define _M68K_ASM_SINGLE_H +/* + * Provide bit manipulation macro's that resolve to a single instruction. + * These can be considered atomic on single processor architectures when + * no page faults can occur when acessing <var>. + * There primary use is to avoid race conditions when manipulating device + * registers. + */ + +#define single_inst_bset_b(var, bit) \ + asm volatile ("orb %0,%1" : : "di" ((u_char)bit), "g" (var)) +#define single_inst_bclr_b(var, bit) \ + asm volatile ("andb %0,%1" : : "di" ((u_char)~(bit)), "g" (var)); + +#define single_inst_bset_w(var, bit) \ + asm volatile ("orw %0,%1" : : "di" ((u_short)bit), "g" (var)) +#define single_inst_bclr_w(var, bit) \ + asm volatile ("andw %0,%1" : : "di" ((u_short)~(bit)), "g" (var)); + +#define single_inst_bset_l(var, bit) \ + asm volatile ("orl %0,%1" : : "di" ((u_long)bit), "g" (var)) +#define single_inst_bclr_l(var, bit) \ + asm volatile ("andl %0,%1" : : "di" ((u_long)~(bit)), "g" (var)); + +#endif /* _M68K_ASM_SINGLE_H */ diff --git a/sys/arch/m68k/include/endian.h b/sys/arch/m68k/include/endian.h index 979c8d844ff..3a8186130d8 100644 --- a/sys/arch/m68k/include/endian.h +++ b/sys/arch/m68k/include/endian.h @@ -1,5 +1,5 @@ -/* $OpenBSD: endian.h,v 1.3 1996/11/25 13:11:26 niklas Exp $ */ -/* $NetBSD: endian.h,v 1.7 1996/03/29 01:40:31 briggs Exp $ */ +/* $OpenBSD: endian.h,v 1.4 1997/01/13 11:51:10 niklas Exp $ */ +/* $NetBSD: endian.h,v 1.10 1996/10/13 02:59:55 christos Exp $ */ /* * Copyright (c) 1987, 1991 Regents of the University of California. diff --git a/sys/arch/m68k/include/reg.h b/sys/arch/m68k/include/reg.h index 63b950c4e57..0cb61fd0a50 100644 --- a/sys/arch/m68k/include/reg.h +++ b/sys/arch/m68k/include/reg.h @@ -1,5 +1,5 @@ -/* $OpenBSD: reg.h,v 1.2 1996/05/29 18:38:36 niklas Exp $ */ -/* $NetBSD: reg.h,v 1.11 1995/03/26 17:08:38 briggs Exp $ */ +/* $OpenBSD: reg.h,v 1.3 1997/01/13 11:51:10 niklas Exp $ */ +/* $NetBSD: reg.h,v 1.12 1996/12/17 19:24:31 gwr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -98,6 +98,11 @@ struct fpreg { */ #define R0 D1 #define R1 A0 + +struct proc; +int process_read_regs __P((struct proc *, struct reg *)); +int process_read_fpregs __P((struct proc *, struct fpreg *)); + #endif #endif /* !_M68K_REG_H_ */ diff --git a/sys/arch/m68k/include/sysctl.h b/sys/arch/m68k/include/sysctl.h index 5cb04d5e093..8e527f19992 100644 --- a/sys/arch/m68k/include/sysctl.h +++ b/sys/arch/m68k/include/sysctl.h @@ -8,11 +8,15 @@ #ifndef CTL_MACHDEP_NAMES #define CPU_CONSDEV 1 /* dev_t: console terminal device */ -#define CPU_MAXID 2 /* number of valid machdep ids */ +#define CPU_ROOT_DEVICE 2 /* string: root device name */ +#define CPU_BOOTED_KERNEL 3 /* string: booted kernel name */ +#define CPU_MAXID 4 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ { "console_device", CTLTYPE_STRUCT }, \ + { "root_device", CTLTYPE_STRING }, \ + { "booted_kernel", CTLTYPE_STRING }, \ } #endif /* CTL_MACHDEP_NAMES */ |