diff options
49 files changed, 248 insertions, 72 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 43a6bec..3fe003f 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $Id$ + * $Id: cpu.h,v 1.3 1993/10/08 20:50:57 rgrimes Exp $ */ +#ifndef _MACHINE_CPU_H_ +#define _MACHINE_CPU_H_ 1 + /* * Definitions unique to i386 cpu support. */ @@ -83,9 +86,6 @@ typedef struct intrframe clockframe; #define aston() (astpending++) -int astpending; /* need to trap before returning to user mode */ -int want_resched; /* resched() was called */ - /* * pull in #defines for kinds of processors */ @@ -97,7 +97,11 @@ struct cpu_nameclass { }; #ifdef KERNEL +extern int astpending; /* want a trap before returning to user mode */ +extern int want_resched; /* resched was called */ + extern int cpu; extern int cpu_class; extern struct cpu_nameclass i386_cpus[]; #endif +#endif /* _MACHINE_CPU_H_ */ diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index db5cf95..b105543 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -2,9 +2,12 @@ * Functions to provide access to special i386 instructions. * XXX - bezillions more are defined in locore.s but are not declared anywhere. * - * $Id$ + * $Id: cpufunc.h,v 1.3 1993/10/16 14:39:08 rgrimes Exp $ */ +#ifndef _MACHINE_CPUFUNC_H_ +#define _MACHINE_CPUFUNC_H_ 1 + #include <sys/cdefs.h> #include <sys/types.h> @@ -193,3 +196,4 @@ really_void setidt __P((int idx, /*XXX*/caddr_t func, int typ, int dpl)); #undef really_u_int #undef really_void +#endif /* _MACHINE_CPUFUNC_H_ */ diff --git a/sys/amd64/include/cputypes.h b/sys/amd64/include/cputypes.h index b922494..c85fe19 100644 --- a/sys/amd64/include/cputypes.h +++ b/sys/amd64/include/cputypes.h @@ -24,9 +24,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: cputypes.h,v 1.1 1993/10/08 13:40:54 rgrimes Exp $ */ +#ifndef _MACHINE_CPUTYPES_H_ +#define _MACHINE_CPUTYPES_H_ 1 + /* * Classes of Processor */ @@ -47,3 +50,4 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ +#endif /* _MACHINE_CPUTYPES_H_ */ diff --git a/sys/amd64/include/db_machdep.h b/sys/amd64/include/db_machdep.h index aa0f006..a3f4064 100644 --- a/sys/amd64/include/db_machdep.h +++ b/sys/amd64/include/db_machdep.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. * - * $Id$ + * $Id: db_machdep.h,v 1.2 1993/10/16 14:39:10 rgrimes Exp $ */ #ifndef _I386_DB_MACHDEP_H_ @@ -54,7 +54,7 @@ typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef int db_expr_t; /* expression - signed */ typedef struct i386_saved_state db_regs_t; -db_regs_t ddb_regs; /* register state */ +extern db_regs_t ddb_regs; /* register state */ #define DDB_REGS (&ddb_regs) #define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip) diff --git a/sys/amd64/include/float.h b/sys/amd64/include/float.h index d6232a0..fb5967e 100644 --- a/sys/amd64/include/float.h +++ b/sys/amd64/include/float.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $Id$ + * $Id: float.h,v 1.4 1993/10/16 14:39:16 rgrimes Exp $ */ +#ifndef _MACHINE_FLOAT_H_ +#define _MACHINE_FLOAT_H_ 1 + #define FLT_RADIX 2 /* b */ #define FLT_ROUNDS 1 /* FP addition rounds to nearest */ @@ -66,3 +69,4 @@ #define LDBL_MAX_EXP DBL_MAX_EXP #define LDBL_MAX DBL_MAX #define LDBL_MAX_10_EXP DBL_MAX_10_EXP +#endif /* _MACHINE_FLOAT_H_ */ diff --git a/sys/amd64/include/floatingpoint.h b/sys/amd64/include/floatingpoint.h index c17bd2c..ed47cf6 100644 --- a/sys/amd64/include/floatingpoint.h +++ b/sys/amd64/include/floatingpoint.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#) floatingpoint.h 1.0 (Berkeley) 9/23/93 - * $Id$ + * $Id: floatingpoint.h,v 1.3 1993/10/16 14:39:18 rgrimes Exp $ */ /* @@ -46,12 +46,13 @@ #ifdef __GNUC__ +#ifdef __i386__ + #define fnstcw(addr) __asm("fnstcw %0" : "=m" (*addr) : "0" (*addr)) #define fnstsw(addr) __asm("fnstsw %0" : "=m" (*addr) : "0" (*addr)) #define fnstenv(addr) __asm("fnstenv %0" : "=m" (*addr) : "0" (*addr)) #define fldenv(addr) __asm("fldenv %0" : : "m" (*addr)) -#ifdef __i386__ /* * return the contents of a FP register diff --git a/sys/amd64/include/frame.h b/sys/amd64/include/frame.h index 250e5c5..71701d6 100644 --- a/sys/amd64/include/frame.h +++ b/sys/amd64/include/frame.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)frame.h 5.2 (Berkeley) 1/18/91 - * $Id$ + * $Id: frame.h,v 1.2 1993/10/08 20:50:59 rgrimes Exp $ */ +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ 1 + #include <sys/signal.h> /* @@ -131,3 +134,4 @@ struct syscframe { int sf_esp; int sf_ss; }; +#endif /* _MACHINE_FRAME_H_ */ diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 96485b4..1090798 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $Id$ + * $Id: pcb.h,v 1.2 1993/10/08 20:51:00 rgrimes Exp $ */ #ifndef _I386_PCB_H_ @@ -81,7 +81,7 @@ struct pcb { }; #ifdef KERNEL -struct pcb *curpcb; /* our current running pcb */ +extern struct pcb *curpcb; /* our current running pcb */ #endif #endif /* _I386_PCB_H_ */ diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 3fe1248..f9baf22 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id$ + * $Id: pmap.h,v 1.4 1993/10/15 10:07:44 rgrimes Exp $ */ #ifndef _PMAP_MACHINE_ @@ -228,6 +228,6 @@ pv_entry_t pv_table; /* array of entries, one per page */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -#endif KERNEL +#endif /* KERNEL */ -#endif _PMAP_MACHINE_ +#endif /* _PMAP_MACHINE_ */ diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h index 0e17164..1b9e4a2 100644 --- a/sys/amd64/include/proc.h +++ b/sys/amd64/include/proc.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $Id$ + * $Id: proc.h,v 1.2 1993/10/16 14:39:24 rgrimes Exp $ */ +#ifndef _MACHINE_PROC_H_ +#define _MACHINE_PROC_H_ 1 + /* * Machine-dependent part of the proc structure for hp300. */ @@ -46,3 +49,4 @@ struct mdproc { /* md_flags */ #define MDP_AST 0x0001 /* async trap pending */ +#endif /* _MACHINE_PROC_H_ */ diff --git a/sys/amd64/include/psl.h b/sys/amd64/include/psl.h index 21de5f7..ca56538 100644 --- a/sys/amd64/include/psl.h +++ b/sys/amd64/include/psl.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)psl.h 5.2 (Berkeley) 1/18/91 - * $Id$ + * $Id: psl.h,v 1.2 1993/10/16 14:39:26 rgrimes Exp $ */ +#ifndef _MACHINE_PSL_H_ +#define _MACHINE_PSL_H_ 1 + /* * 386 processor status longword. */ @@ -59,3 +62,4 @@ #define PSL_USERSET (PSL_IOPL) #define PSL_USERCLR (PSL_I|PSL_NT) +#endif /* _MACHINE_PSL_H_ */ diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h index 11d930d..46f6b80 100644 --- a/sys/amd64/include/reg.h +++ b/sys/amd64/include/reg.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $Id$ + * $Id: reg.h,v 1.2 1993/10/16 14:39:29 rgrimes Exp $ */ +#ifndef _MACHINE_REG_H_ +#define _MACHINE_REG_H_ 1 + /* * Location of the users' stored * registers within appropriate frame of 'trap' and 'syscall', relative to @@ -92,3 +95,4 @@ int ipcreg[NIPCREG] = { tES,tDS,tEDI,tESI,tEBP,tEBX,tEDX,tECX,tEAX,tEIP,tCS,tEFLAGS,tESP,tSS }; #endif +#endif /* _MACHINE_REG_H_ */ diff --git a/sys/amd64/include/segments.h b/sys/amd64/include/segments.h index bc77569..a7ed234 100644 --- a/sys/amd64/include/segments.h +++ b/sys/amd64/include/segments.h @@ -35,9 +35,12 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $Id$ + * $Id: segments.h,v 1.2 1993/10/16 14:39:30 rgrimes Exp $ */ +#ifndef _MACHINE_SEGMENTS_H_ +#define _MACHINE_SEGMENTS_H_ 1 + /* * 386 Segmentation Data Structures and definitions * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 @@ -195,3 +198,4 @@ struct region_descriptor { #define NIDT 256 #define NRSVIDT 32 /* reserved entries for cpu exceptions */ +#endif /* _MACHINE_SEGMENTS_H_ */ diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h index 7538259..935b1ed 100644 --- a/sys/amd64/include/specialreg.h +++ b/sys/amd64/include/specialreg.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $Id$ + * $Id: specialreg.h,v 1.2 1993/10/16 14:39:32 rgrimes Exp $ */ +#ifndef _MACHINE_SPECIALREG_H_ +#define _MACHINE_SPECIALREG_H_ 1 + /* * Bits in 386 special registers: */ @@ -58,3 +61,4 @@ #ifdef notyet #define CR0_AM 0x00040000 /* Alignment Mask (set to enable AC flag) */ #endif +#endif /* _MACHINE_SPECIALREG_H_ */ diff --git a/sys/amd64/include/sysarch.h b/sys/amd64/include/sysarch.h index 92abe9c..2649ba5 100644 --- a/sys/amd64/include/sysarch.h +++ b/sys/amd64/include/sysarch.h @@ -1,12 +1,24 @@ /* * Architecture specific syscalls (i386) * - * $Id$ + * $Id: sysarch.h,v 1.2 1993/10/16 14:39:35 rgrimes Exp $ */ +#ifndef _MACHINE_SYSARCH_H_ +#define _MACHINE_SYSARCH_H_ 1 + +#include <sys/cdefs.h> + #define I386_GET_LDT 0 #define I386_SET_LDT 1 -#ifndef KERNEL +#ifdef KERNEL +/* nothing here yet... */ +#else /* not KERNEL */ +__BEGIN_DECLS + int i386_get_ldt __P((int, union descriptor *, int)); int i386_set_ldt __P((int, union descriptor *, int)); -#endif + +__END_DECLS +#endif /* not KERNEL */ +#endif /* _MACHINE_SYSARCH_H_ */ diff --git a/sys/amd64/include/trap.h b/sys/amd64/include/trap.h index 7b19bc7..aa832ff 100644 --- a/sys/amd64/include/trap.h +++ b/sys/amd64/include/trap.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 - * $Id$ + * $Id: trap.h,v 1.2 1993/10/16 14:39:37 rgrimes Exp $ */ +#ifndef _MACHINE_TRAP_H_ +#define _MACHINE_TRAP_H_ 1 + /* * Trap type values * also known in trap.c for name strings @@ -95,3 +98,4 @@ /* Trap's coming from user mode */ #define T_USER 0x100 +#endif /* _MACHINE_TRAP_H_ */ diff --git a/sys/amd64/include/tss.h b/sys/amd64/include/tss.h index fec3db5..b0430de 100644 --- a/sys/amd64/include/tss.h +++ b/sys/amd64/include/tss.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 - * $Id$ + * $Id: tss.h,v 1.2 1993/10/16 14:39:38 rgrimes Exp $ */ +#ifndef _MACHINE_TSS_H_ +#define _MACHINE_TSS_H_ 1 + /* * Intel 386 Context Data Type */ @@ -77,3 +80,4 @@ struct i386tss { int tss_ioopt; /* options & io offset bitmap: currently zero */ /* XXX unimplemented .. i/o permission bitmap */ }; +#endif /* _MACHINE_TSS_H_ */ diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 700b697..a43615d 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -34,10 +34,13 @@ * SUCH DAMAGE. * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - * $Id$ + * $Id: vmparam.h,v 1.7 1993/10/15 10:07:45 rgrimes Exp $ */ +#ifndef _MACHINE_VMPARAM_H_ +#define _MACHINE_VMPARAM_H_ 1 + /* * Machine dependent constants for 386. */ @@ -259,3 +262,4 @@ : "ax"); \ }) #endif +#endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/i386/include/_limits.h b/sys/i386/include/_limits.h index 82fac5f..605a895 100644 --- a/sys/i386/include/_limits.h +++ b/sys/i386/include/_limits.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 - * $Id$ + * $Id: limits.h,v 1.2 1993/10/16 14:39:19 rgrimes Exp $ */ +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ 1 + #define CHAR_BIT 8 /* number of bits in a char */ #define CLK_TCK 60 /* ticks per second */ #define MB_LEN_MAX 1 /* no multibyte characters */ @@ -56,3 +59,4 @@ #define ULONG_MAX 0xffffffff /* max value for an unsigned long */ #define LONG_MAX 0x7fffffff /* max value for a long */ #define LONG_MIN (-0x7fffffff-1) /* min value for a long */ +#endif /* _MACHINE_LIMITS_H_ */ diff --git a/sys/i386/include/cons.h b/sys/i386/include/cons.h new file mode 100644 index 0000000..f66277e --- /dev/null +++ b/sys/i386/include/cons.h @@ -0,0 +1,6 @@ +/* + * Console support headers should be in <machine/cons.h> since MI software + * needs to access these functions. In the mean time, just include the + * header where it sits. + */ +#include <i386/i386/cons.h> diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index 43a6bec..3fe003f 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $Id$ + * $Id: cpu.h,v 1.3 1993/10/08 20:50:57 rgrimes Exp $ */ +#ifndef _MACHINE_CPU_H_ +#define _MACHINE_CPU_H_ 1 + /* * Definitions unique to i386 cpu support. */ @@ -83,9 +86,6 @@ typedef struct intrframe clockframe; #define aston() (astpending++) -int astpending; /* need to trap before returning to user mode */ -int want_resched; /* resched() was called */ - /* * pull in #defines for kinds of processors */ @@ -97,7 +97,11 @@ struct cpu_nameclass { }; #ifdef KERNEL +extern int astpending; /* want a trap before returning to user mode */ +extern int want_resched; /* resched was called */ + extern int cpu; extern int cpu_class; extern struct cpu_nameclass i386_cpus[]; #endif +#endif /* _MACHINE_CPU_H_ */ diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index db5cf95..b105543 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -2,9 +2,12 @@ * Functions to provide access to special i386 instructions. * XXX - bezillions more are defined in locore.s but are not declared anywhere. * - * $Id$ + * $Id: cpufunc.h,v 1.3 1993/10/16 14:39:08 rgrimes Exp $ */ +#ifndef _MACHINE_CPUFUNC_H_ +#define _MACHINE_CPUFUNC_H_ 1 + #include <sys/cdefs.h> #include <sys/types.h> @@ -193,3 +196,4 @@ really_void setidt __P((int idx, /*XXX*/caddr_t func, int typ, int dpl)); #undef really_u_int #undef really_void +#endif /* _MACHINE_CPUFUNC_H_ */ diff --git a/sys/i386/include/cputypes.h b/sys/i386/include/cputypes.h index b922494..c85fe19 100644 --- a/sys/i386/include/cputypes.h +++ b/sys/i386/include/cputypes.h @@ -24,9 +24,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: cputypes.h,v 1.1 1993/10/08 13:40:54 rgrimes Exp $ */ +#ifndef _MACHINE_CPUTYPES_H_ +#define _MACHINE_CPUTYPES_H_ 1 + /* * Classes of Processor */ @@ -47,3 +50,4 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ +#endif /* _MACHINE_CPUTYPES_H_ */ diff --git a/sys/i386/include/db_machdep.h b/sys/i386/include/db_machdep.h index aa0f006..a3f4064 100644 --- a/sys/i386/include/db_machdep.h +++ b/sys/i386/include/db_machdep.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. * - * $Id$ + * $Id: db_machdep.h,v 1.2 1993/10/16 14:39:10 rgrimes Exp $ */ #ifndef _I386_DB_MACHDEP_H_ @@ -54,7 +54,7 @@ typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef int db_expr_t; /* expression - signed */ typedef struct i386_saved_state db_regs_t; -db_regs_t ddb_regs; /* register state */ +extern db_regs_t ddb_regs; /* register state */ #define DDB_REGS (&ddb_regs) #define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip) diff --git a/sys/i386/include/dkio.h b/sys/i386/include/dkio.h index 90f0721..af781be 100644 --- a/sys/i386/include/dkio.h +++ b/sys/i386/include/dkio.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)dkio.h 5.2 (Berkeley) 1/18/91 - * $Id$ + * $Id: dkio.h,v 1.2 1993/10/16 14:39:12 rgrimes Exp $ */ +#ifndef _MACHINE_DKIO_H_ +#define _MACHINE_DKIO_H_ 1 + /* * Structures and definitions for disk io control commands * @@ -47,3 +50,4 @@ /* disk io control commands */ #define DKIOCHDR _IO(d, 1) /* next I/O will read/write header */ +#endif /* _MACHINE_DKIO_H_ */ diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h index 9abd47e..8c7dc4a 100644 --- a/sys/i386/include/endian.h +++ b/sys/i386/include/endian.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)endian.h 7.8 (Berkeley) 4/3/91 - * $Id$ + * $Id: endian.h,v 1.2 1993/10/16 14:39:15 rgrimes Exp $ */ +#ifndef _MACHINE_ENDIAN_H_ +#define _MACHINE_ENDIAN_H_ 1 + /* * Definitions for byte order, according to byte significance from low * address to high. @@ -108,3 +111,4 @@ #define HTONL(x) (x) = htonl((u_long)x) #define HTONS(x) (x) = htons((u_short)x) #endif +#endif /* _MACHINE_ENDIAN_H_ */ diff --git a/sys/i386/include/float.h b/sys/i386/include/float.h index d6232a0..fb5967e 100644 --- a/sys/i386/include/float.h +++ b/sys/i386/include/float.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $Id$ + * $Id: float.h,v 1.4 1993/10/16 14:39:16 rgrimes Exp $ */ +#ifndef _MACHINE_FLOAT_H_ +#define _MACHINE_FLOAT_H_ 1 + #define FLT_RADIX 2 /* b */ #define FLT_ROUNDS 1 /* FP addition rounds to nearest */ @@ -66,3 +69,4 @@ #define LDBL_MAX_EXP DBL_MAX_EXP #define LDBL_MAX DBL_MAX #define LDBL_MAX_10_EXP DBL_MAX_10_EXP +#endif /* _MACHINE_FLOAT_H_ */ diff --git a/sys/i386/include/floatingpoint.h b/sys/i386/include/floatingpoint.h index c17bd2c..ed47cf6 100644 --- a/sys/i386/include/floatingpoint.h +++ b/sys/i386/include/floatingpoint.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#) floatingpoint.h 1.0 (Berkeley) 9/23/93 - * $Id$ + * $Id: floatingpoint.h,v 1.3 1993/10/16 14:39:18 rgrimes Exp $ */ /* @@ -46,12 +46,13 @@ #ifdef __GNUC__ +#ifdef __i386__ + #define fnstcw(addr) __asm("fnstcw %0" : "=m" (*addr) : "0" (*addr)) #define fnstsw(addr) __asm("fnstsw %0" : "=m" (*addr) : "0" (*addr)) #define fnstenv(addr) __asm("fnstenv %0" : "=m" (*addr) : "0" (*addr)) #define fldenv(addr) __asm("fldenv %0" : : "m" (*addr)) -#ifdef __i386__ /* * return the contents of a FP register diff --git a/sys/i386/include/frame.h b/sys/i386/include/frame.h index 250e5c5..71701d6 100644 --- a/sys/i386/include/frame.h +++ b/sys/i386/include/frame.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)frame.h 5.2 (Berkeley) 1/18/91 - * $Id$ + * $Id: frame.h,v 1.2 1993/10/08 20:50:59 rgrimes Exp $ */ +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ 1 + #include <sys/signal.h> /* @@ -131,3 +134,4 @@ struct syscframe { int sf_esp; int sf_ss; }; +#endif /* _MACHINE_FRAME_H_ */ diff --git a/sys/i386/include/limits.h b/sys/i386/include/limits.h index 82fac5f..605a895 100644 --- a/sys/i386/include/limits.h +++ b/sys/i386/include/limits.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 - * $Id$ + * $Id: limits.h,v 1.2 1993/10/16 14:39:19 rgrimes Exp $ */ +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ 1 + #define CHAR_BIT 8 /* number of bits in a char */ #define CLK_TCK 60 /* ticks per second */ #define MB_LEN_MAX 1 /* no multibyte characters */ @@ -56,3 +59,4 @@ #define ULONG_MAX 0xffffffff /* max value for an unsigned long */ #define LONG_MAX 0x7fffffff /* max value for a long */ #define LONG_MIN (-0x7fffffff-1) /* min value for a long */ +#endif /* _MACHINE_LIMITS_H_ */ diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h index 546a8f31..65d72b2 100644 --- a/sys/i386/include/param.h +++ b/sys/i386/include/param.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 - * $Id: param.h,v 1.6 1993/10/12 12:08:16 rgrimes Exp $ + * $Id: param.h,v 1.7 1993/10/15 10:07:43 rgrimes Exp $ */ +#ifndef _MACHINE_PARAM_H_ +#define _MACHINE_PARAM_H_ 1 + /* * Machine dependent constants for Intel 386. */ @@ -160,3 +163,4 @@ * phystokv stolen from SCSI device drivers and fixed to use KERNBASE */ #define PHYSTOKV(x) (x | KERNBASE) +#endif /* _MACHINE_PARAM_H_ */ diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 96485b4..1090798 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $Id$ + * $Id: pcb.h,v 1.2 1993/10/08 20:51:00 rgrimes Exp $ */ #ifndef _I386_PCB_H_ @@ -81,7 +81,7 @@ struct pcb { }; #ifdef KERNEL -struct pcb *curpcb; /* our current running pcb */ +extern struct pcb *curpcb; /* our current running pcb */ #endif #endif /* _I386_PCB_H_ */ diff --git a/sys/i386/include/pio.h b/sys/i386/include/pio.h index 2cb714c..ef9aba3 100644 --- a/sys/i386/include/pio.h +++ b/sys/i386/include/pio.h @@ -5,9 +5,12 @@ * the terms and conditions for use and redistribution. * * from: Mach, unknown, 386BSD patch kit - * $Id$ + * $Id: pio.h,v 1.2 1993/10/16 14:39:23 rgrimes Exp $ */ +#ifndef _MACHINE_PIO_H_ +#define _MACHINE_PIO_H_ 1 + #define inl(y) \ ({ unsigned long _tmp__; \ asm volatile("inl %1, %0" : "=a" (_tmp__) : "d" ((unsigned short)(y))); \ @@ -42,3 +45,4 @@ #define outb(x, y) \ { asm volatile("outb %0, %1" : : "a" ((unsigned char)(y)) , "d" ((unsigned short)(x))); } +#endif /* _MACHINE_PIO_H_ */ diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 3fe1248..f9baf22 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id$ + * $Id: pmap.h,v 1.4 1993/10/15 10:07:44 rgrimes Exp $ */ #ifndef _PMAP_MACHINE_ @@ -228,6 +228,6 @@ pv_entry_t pv_table; /* array of entries, one per page */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -#endif KERNEL +#endif /* KERNEL */ -#endif _PMAP_MACHINE_ +#endif /* _PMAP_MACHINE_ */ diff --git a/sys/i386/include/proc.h b/sys/i386/include/proc.h index 0e17164..1b9e4a2 100644 --- a/sys/i386/include/proc.h +++ b/sys/i386/include/proc.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $Id$ + * $Id: proc.h,v 1.2 1993/10/16 14:39:24 rgrimes Exp $ */ +#ifndef _MACHINE_PROC_H_ +#define _MACHINE_PROC_H_ 1 + /* * Machine-dependent part of the proc structure for hp300. */ @@ -46,3 +49,4 @@ struct mdproc { /* md_flags */ #define MDP_AST 0x0001 /* async trap pending */ +#endif /* _MACHINE_PROC_H_ */ diff --git a/sys/i386/include/psl.h b/sys/i386/include/psl.h index 21de5f7..ca56538 100644 --- a/sys/i386/include/psl.h +++ b/sys/i386/include/psl.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)psl.h 5.2 (Berkeley) 1/18/91 - * $Id$ + * $Id: psl.h,v 1.2 1993/10/16 14:39:26 rgrimes Exp $ */ +#ifndef _MACHINE_PSL_H_ +#define _MACHINE_PSL_H_ 1 + /* * 386 processor status longword. */ @@ -59,3 +62,4 @@ #define PSL_USERSET (PSL_IOPL) #define PSL_USERCLR (PSL_I|PSL_NT) +#endif /* _MACHINE_PSL_H_ */ diff --git a/sys/i386/include/pte.h b/sys/i386/include/pte.h index a98a357..693e7d8 100644 --- a/sys/i386/include/pte.h +++ b/sys/i386/include/pte.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)pte.h 5.5 (Berkeley) 5/9/91 - * $Id$ + * $Id: pte.h,v 1.2 1993/10/16 14:39:27 rgrimes Exp $ */ +#ifndef _MACHINE_PTE_H_ +#define _MACHINE_PTE_H_ 1 + /* * 386 page table entry and page table directory * W.Jolitz, 8/89 @@ -135,3 +138,4 @@ unsigned int extern struct pte *Sysmap; #endif #endif +#endif /* _MACHINE_PTE_H_ */ diff --git a/sys/i386/include/reg.h b/sys/i386/include/reg.h index 11d930d..46f6b80 100644 --- a/sys/i386/include/reg.h +++ b/sys/i386/include/reg.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $Id$ + * $Id: reg.h,v 1.2 1993/10/16 14:39:29 rgrimes Exp $ */ +#ifndef _MACHINE_REG_H_ +#define _MACHINE_REG_H_ 1 + /* * Location of the users' stored * registers within appropriate frame of 'trap' and 'syscall', relative to @@ -92,3 +95,4 @@ int ipcreg[NIPCREG] = { tES,tDS,tEDI,tESI,tEBP,tEBX,tEDX,tECX,tEAX,tEIP,tCS,tEFLAGS,tESP,tSS }; #endif +#endif /* _MACHINE_REG_H_ */ diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index bc77569..a7ed234 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -35,9 +35,12 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $Id$ + * $Id: segments.h,v 1.2 1993/10/16 14:39:30 rgrimes Exp $ */ +#ifndef _MACHINE_SEGMENTS_H_ +#define _MACHINE_SEGMENTS_H_ 1 + /* * 386 Segmentation Data Structures and definitions * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 @@ -195,3 +198,4 @@ struct region_descriptor { #define NIDT 256 #define NRSVIDT 32 /* reserved entries for cpu exceptions */ +#endif /* _MACHINE_SEGMENTS_H_ */ diff --git a/sys/i386/include/soundcard.h b/sys/i386/include/soundcard.h index f853de4..1c048eb 100644 --- a/sys/i386/include/soundcard.h +++ b/sys/i386/include/soundcard.h @@ -1,5 +1,5 @@ -#ifndef SOUNDCARD_H -#define SOUNDCARD_H +#ifndef _SOUNDCARD_H_ +#define _SOUNDCARD_H_ 1 /* * Copyright by Hannu Savolainen 1993 * @@ -734,4 +734,4 @@ void seqbuf_dump(); /* This function must be provided by programs */ #endif long soundcard_init(long mem_start); -#endif +#endif /* _SOUNDCARD_H_ */ diff --git a/sys/i386/include/specialreg.h b/sys/i386/include/specialreg.h index 7538259..935b1ed 100644 --- a/sys/i386/include/specialreg.h +++ b/sys/i386/include/specialreg.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $Id$ + * $Id: specialreg.h,v 1.2 1993/10/16 14:39:32 rgrimes Exp $ */ +#ifndef _MACHINE_SPECIALREG_H_ +#define _MACHINE_SPECIALREG_H_ 1 + /* * Bits in 386 special registers: */ @@ -58,3 +61,4 @@ #ifdef notyet #define CR0_AM 0x00040000 /* Alignment Mask (set to enable AC flag) */ #endif +#endif /* _MACHINE_SPECIALREG_H_ */ diff --git a/sys/i386/include/stdarg.h b/sys/i386/include/stdarg.h index 3fdd382..91dab8b 100644 --- a/sys/i386/include/stdarg.h +++ b/sys/i386/include/stdarg.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)stdarg.h 7.2 (Berkeley) 5/4/91 - * $Id$ + * $Id: stdarg.h,v 1.2 1993/10/16 14:39:34 rgrimes Exp $ */ +#ifndef _MACHINE_STDARG_H_ +#define _MACHINE_STDARG_H_ 1 + typedef char *va_list; #ifdef KERNEL @@ -52,3 +55,4 @@ typedef char *va_list; #define va_start(ap, last) \ (ap = ((char *)&(last) + __va_promote(last))) +#endif /* _MACHINE_STDARG_H_ */ diff --git a/sys/i386/include/sysarch.h b/sys/i386/include/sysarch.h index 92abe9c..2649ba5 100644 --- a/sys/i386/include/sysarch.h +++ b/sys/i386/include/sysarch.h @@ -1,12 +1,24 @@ /* * Architecture specific syscalls (i386) * - * $Id$ + * $Id: sysarch.h,v 1.2 1993/10/16 14:39:35 rgrimes Exp $ */ +#ifndef _MACHINE_SYSARCH_H_ +#define _MACHINE_SYSARCH_H_ 1 + +#include <sys/cdefs.h> + #define I386_GET_LDT 0 #define I386_SET_LDT 1 -#ifndef KERNEL +#ifdef KERNEL +/* nothing here yet... */ +#else /* not KERNEL */ +__BEGIN_DECLS + int i386_get_ldt __P((int, union descriptor *, int)); int i386_set_ldt __P((int, union descriptor *, int)); -#endif + +__END_DECLS +#endif /* not KERNEL */ +#endif /* _MACHINE_SYSARCH_H_ */ diff --git a/sys/i386/include/trap.h b/sys/i386/include/trap.h index 7b19bc7..aa832ff 100644 --- a/sys/i386/include/trap.h +++ b/sys/i386/include/trap.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 - * $Id$ + * $Id: trap.h,v 1.2 1993/10/16 14:39:37 rgrimes Exp $ */ +#ifndef _MACHINE_TRAP_H_ +#define _MACHINE_TRAP_H_ 1 + /* * Trap type values * also known in trap.c for name strings @@ -95,3 +98,4 @@ /* Trap's coming from user mode */ #define T_USER 0x100 +#endif /* _MACHINE_TRAP_H_ */ diff --git a/sys/i386/include/tss.h b/sys/i386/include/tss.h index fec3db5..b0430de 100644 --- a/sys/i386/include/tss.h +++ b/sys/i386/include/tss.h @@ -34,9 +34,12 @@ * SUCH DAMAGE. * * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 - * $Id$ + * $Id: tss.h,v 1.2 1993/10/16 14:39:38 rgrimes Exp $ */ +#ifndef _MACHINE_TSS_H_ +#define _MACHINE_TSS_H_ 1 + /* * Intel 386 Context Data Type */ @@ -77,3 +80,4 @@ struct i386tss { int tss_ioopt; /* options & io offset bitmap: currently zero */ /* XXX unimplemented .. i/o permission bitmap */ }; +#endif /* _MACHINE_TSS_H_ */ diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index 700b697..a43615d 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -34,10 +34,13 @@ * SUCH DAMAGE. * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - * $Id$ + * $Id: vmparam.h,v 1.7 1993/10/15 10:07:45 rgrimes Exp $ */ +#ifndef _MACHINE_VMPARAM_H_ +#define _MACHINE_VMPARAM_H_ 1 + /* * Machine dependent constants for 386. */ @@ -259,3 +262,4 @@ : "ax"); \ }) #endif +#endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/powerpc/include/_limits.h b/sys/powerpc/include/_limits.h index 82fac5f..605a895 100644 --- a/sys/powerpc/include/_limits.h +++ b/sys/powerpc/include/_limits.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 - * $Id$ + * $Id: limits.h,v 1.2 1993/10/16 14:39:19 rgrimes Exp $ */ +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ 1 + #define CHAR_BIT 8 /* number of bits in a char */ #define CLK_TCK 60 /* ticks per second */ #define MB_LEN_MAX 1 /* no multibyte characters */ @@ -56,3 +59,4 @@ #define ULONG_MAX 0xffffffff /* max value for an unsigned long */ #define LONG_MAX 0x7fffffff /* max value for a long */ #define LONG_MIN (-0x7fffffff-1) /* min value for a long */ +#endif /* _MACHINE_LIMITS_H_ */ diff --git a/sys/powerpc/include/limits.h b/sys/powerpc/include/limits.h index 82fac5f..605a895 100644 --- a/sys/powerpc/include/limits.h +++ b/sys/powerpc/include/limits.h @@ -31,9 +31,12 @@ * SUCH DAMAGE. * * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 - * $Id$ + * $Id: limits.h,v 1.2 1993/10/16 14:39:19 rgrimes Exp $ */ +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ 1 + #define CHAR_BIT 8 /* number of bits in a char */ #define CLK_TCK 60 /* ticks per second */ #define MB_LEN_MAX 1 /* no multibyte characters */ @@ -56,3 +59,4 @@ #define ULONG_MAX 0xffffffff /* max value for an unsigned long */ #define LONG_MAX 0x7fffffff /* max value for a long */ #define LONG_MIN (-0x7fffffff-1) /* min value for a long */ +#endif /* _MACHINE_LIMITS_H_ */ diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index f853de4..1c048eb 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -1,5 +1,5 @@ -#ifndef SOUNDCARD_H -#define SOUNDCARD_H +#ifndef _SOUNDCARD_H_ +#define _SOUNDCARD_H_ 1 /* * Copyright by Hannu Savolainen 1993 * @@ -734,4 +734,4 @@ void seqbuf_dump(); /* This function must be provided by programs */ #endif long soundcard_init(long mem_start); -#endif +#endif /* _SOUNDCARD_H_ */ |