Made all header files idempotent and moved incorrect common data from
headers into a related source file. Added cons.h as first step towards moving i386/i386/cons.h to machine/cons.h where it belongs.
This commit is contained in:
parent
e766e4d9f1
commit
6e393973f5
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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)
|
||||
|
@ -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_ */
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
6
sys/i386/include/cons.h
Normal file
6
sys/i386/include/cons.h
Normal file
@ -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>
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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)
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user