diff options
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/cpu.h | 12 | ||||
-rw-r--r-- | sys/amd64/include/cpufunc.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/cputypes.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/amd64/include/float.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/floatingpoint.h | 5 | ||||
-rw-r--r-- | sys/amd64/include/frame.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/pcb.h | 4 | ||||
-rw-r--r-- | sys/amd64/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/proc.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/psl.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/reg.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/segments.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/specialreg.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/sysarch.h | 18 | ||||
-rw-r--r-- | sys/amd64/include/trap.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/tss.h | 6 | ||||
-rw-r--r-- | sys/amd64/include/vmparam.h | 6 |
18 files changed, 93 insertions, 28 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 43a6becdbc02..3fe003f48dbf 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 db5cf95ff750..b105543dec1a 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 b922494be498..c85fe198a708 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 aa0f006ee38b..a3f4064e4cd3 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 d6232a0d385d..fb5967e6eadc 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 c17bd2c60f20..ed47cf683d1c 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 250e5c5e40af..71701d687536 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 96485b44cda9..1090798ed926 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 3fe1248e146e..f9baf221219b 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 0e171645da21..1b9e4a2adebc 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 21de5f7c3cd9..ca5653875c65 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 11d930da8226..46f6b8084419 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 bc775693355d..a7ed23442fc5 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 75382594b8a2..935b1eddda90 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 92abe9c0582a..2649ba5fe211 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 7b19bc7b4b3c..aa832ffc322c 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 fec3db510808..b0430def66d2 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 700b697841ee..a43615da88b7 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_ */ |