All:
Remove patch kit headers, and add $Id$ This is mostly to align some more code with NetBSD. cpu.h: Remove the old function vs. include configuration stuff that was ifdefed out when we went to inline functions. Remove the define of resettodr that made it a nop, there is already a function that makes it a nop, no need to #define one. Remove the #defines of processor types, they are now defined in cputypes.h, #include that file. Add struct cpu_nameclass for support of cpu types. frame.h: include sys/signal.h, it will be needed in the future. put the sigframe structure here that was in machdep.c pcb.h: Add multiple inclusion protection. Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the user mode ldt.
This commit is contained in:
parent
3409a2f663
commit
09f07fb057
@ -33,7 +33,8 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cpu.h 5.4 (Berkeley) 5/9/91
|
||||
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,18 +49,6 @@
|
||||
*/
|
||||
#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */
|
||||
|
||||
/*
|
||||
* function vs. inline configuration;
|
||||
* these are defined to get generic functions
|
||||
* rather than inline or machine-dependent implementations
|
||||
*/
|
||||
#if 0
|
||||
#define NEED_MINMAX /* need {,i,l,ul}{min,max} functions */
|
||||
#define NEED_FFS /* need ffs function */
|
||||
#define NEED_BCMP /* need bcmp function */
|
||||
#define NEED_STRLEN /* need strlen function */
|
||||
#endif
|
||||
|
||||
#define cpu_exec(p) /* nothing */
|
||||
|
||||
/*
|
||||
@ -73,8 +62,6 @@ typedef struct intrframe clockframe;
|
||||
#define CLKF_BASEPRI(framep) ((framep)->if_ppl == 0)
|
||||
#define CLKF_PC(framep) ((framep)->if_eip)
|
||||
|
||||
#define resettodr() /* no todr to set */
|
||||
|
||||
/*
|
||||
* Preempt the current process if in interrupt from user mode,
|
||||
* or after the current trap/syscall if in system mode.
|
||||
@ -100,11 +87,17 @@ int astpending; /* need to trap before returning to user mode */
|
||||
int want_resched; /* resched() was called */
|
||||
|
||||
/*
|
||||
* Kinds of processor
|
||||
* pull in #defines for kinds of processors
|
||||
*/
|
||||
#include "machine/cputypes.h"
|
||||
|
||||
#define CPU_386SX 0
|
||||
#define CPU_386 1
|
||||
#define CPU_486SX 2
|
||||
#define CPU_486 3
|
||||
#define CPU_586 4
|
||||
struct cpu_nameclass {
|
||||
char *cpu_name;
|
||||
int cpu_class;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
extern int cpu;
|
||||
extern int cpu_class;
|
||||
extern struct cpu_nameclass i386_cpus[];
|
||||
#endif
|
||||
|
@ -33,9 +33,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* from: @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <sys/signal.h>
|
||||
|
||||
/*
|
||||
* System stack frames.
|
||||
*/
|
||||
@ -92,6 +95,20 @@ struct intrframe {
|
||||
int if_ss;
|
||||
};
|
||||
|
||||
/*
|
||||
* Signal frame
|
||||
*/
|
||||
struct sigframe {
|
||||
int sf_signum;
|
||||
int sf_code;
|
||||
struct sigcontext *sf_scp;
|
||||
sig_t sf_handler;
|
||||
int sf_eax;
|
||||
int sf_edx;
|
||||
int sf_ecx;
|
||||
struct sigcontext sf_sc;
|
||||
} ;
|
||||
|
||||
/*
|
||||
* Call Gate/System Call Stack Frame
|
||||
*/
|
||||
|
@ -33,17 +33,13 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)pcb.h 5.10 (Berkeley) 5/12/91
|
||||
*
|
||||
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
|
||||
* -------------------- ----- ----------------------
|
||||
* CURRENT PATCH LEVEL: 1 00154
|
||||
* -------------------- ----- ----------------------
|
||||
*
|
||||
* 20 Apr 93 Bruce Evans New npx-0.5 code
|
||||
*
|
||||
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _I386_PCB_H_
|
||||
#define _I386_PCB_H_
|
||||
|
||||
/*
|
||||
* Intel 386 process control block
|
||||
*/
|
||||
@ -62,6 +58,8 @@ struct pcb {
|
||||
#ifdef notyet
|
||||
u_char pcb_iomap[NPORT/sizeof(u_char)]; /* i/o port bitmap */
|
||||
#endif
|
||||
caddr_t pcb_ldt; /* per process (user) LDT */
|
||||
int pcb_ldt_len; /* number of LDT entries */
|
||||
struct save87 pcb_savefpu; /* floating point state for 287/387 */
|
||||
struct emcsts pcb_saveemc; /* Cyrix EMC state */
|
||||
/*
|
||||
@ -85,3 +83,5 @@ struct pcb {
|
||||
#ifdef KERNEL
|
||||
struct pcb *curpcb; /* our current running pcb */
|
||||
#endif
|
||||
|
||||
#endif /* _I386_PCB_H_ */
|
||||
|
@ -33,7 +33,8 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cpu.h 5.4 (Berkeley) 5/9/91
|
||||
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,18 +49,6 @@
|
||||
*/
|
||||
#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */
|
||||
|
||||
/*
|
||||
* function vs. inline configuration;
|
||||
* these are defined to get generic functions
|
||||
* rather than inline or machine-dependent implementations
|
||||
*/
|
||||
#if 0
|
||||
#define NEED_MINMAX /* need {,i,l,ul}{min,max} functions */
|
||||
#define NEED_FFS /* need ffs function */
|
||||
#define NEED_BCMP /* need bcmp function */
|
||||
#define NEED_STRLEN /* need strlen function */
|
||||
#endif
|
||||
|
||||
#define cpu_exec(p) /* nothing */
|
||||
|
||||
/*
|
||||
@ -73,8 +62,6 @@ typedef struct intrframe clockframe;
|
||||
#define CLKF_BASEPRI(framep) ((framep)->if_ppl == 0)
|
||||
#define CLKF_PC(framep) ((framep)->if_eip)
|
||||
|
||||
#define resettodr() /* no todr to set */
|
||||
|
||||
/*
|
||||
* Preempt the current process if in interrupt from user mode,
|
||||
* or after the current trap/syscall if in system mode.
|
||||
@ -100,11 +87,17 @@ int astpending; /* need to trap before returning to user mode */
|
||||
int want_resched; /* resched() was called */
|
||||
|
||||
/*
|
||||
* Kinds of processor
|
||||
* pull in #defines for kinds of processors
|
||||
*/
|
||||
#include "machine/cputypes.h"
|
||||
|
||||
#define CPU_386SX 0
|
||||
#define CPU_386 1
|
||||
#define CPU_486SX 2
|
||||
#define CPU_486 3
|
||||
#define CPU_586 4
|
||||
struct cpu_nameclass {
|
||||
char *cpu_name;
|
||||
int cpu_class;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
extern int cpu;
|
||||
extern int cpu_class;
|
||||
extern struct cpu_nameclass i386_cpus[];
|
||||
#endif
|
||||
|
@ -33,9 +33,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* from: @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <sys/signal.h>
|
||||
|
||||
/*
|
||||
* System stack frames.
|
||||
*/
|
||||
@ -92,6 +95,20 @@ struct intrframe {
|
||||
int if_ss;
|
||||
};
|
||||
|
||||
/*
|
||||
* Signal frame
|
||||
*/
|
||||
struct sigframe {
|
||||
int sf_signum;
|
||||
int sf_code;
|
||||
struct sigcontext *sf_scp;
|
||||
sig_t sf_handler;
|
||||
int sf_eax;
|
||||
int sf_edx;
|
||||
int sf_ecx;
|
||||
struct sigcontext sf_sc;
|
||||
} ;
|
||||
|
||||
/*
|
||||
* Call Gate/System Call Stack Frame
|
||||
*/
|
||||
|
@ -33,17 +33,13 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)pcb.h 5.10 (Berkeley) 5/12/91
|
||||
*
|
||||
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
|
||||
* -------------------- ----- ----------------------
|
||||
* CURRENT PATCH LEVEL: 1 00154
|
||||
* -------------------- ----- ----------------------
|
||||
*
|
||||
* 20 Apr 93 Bruce Evans New npx-0.5 code
|
||||
*
|
||||
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _I386_PCB_H_
|
||||
#define _I386_PCB_H_
|
||||
|
||||
/*
|
||||
* Intel 386 process control block
|
||||
*/
|
||||
@ -62,6 +58,8 @@ struct pcb {
|
||||
#ifdef notyet
|
||||
u_char pcb_iomap[NPORT/sizeof(u_char)]; /* i/o port bitmap */
|
||||
#endif
|
||||
caddr_t pcb_ldt; /* per process (user) LDT */
|
||||
int pcb_ldt_len; /* number of LDT entries */
|
||||
struct save87 pcb_savefpu; /* floating point state for 287/387 */
|
||||
struct emcsts pcb_saveemc; /* Cyrix EMC state */
|
||||
/*
|
||||
@ -85,3 +83,5 @@ struct pcb {
|
||||
#ifdef KERNEL
|
||||
struct pcb *curpcb; /* our current running pcb */
|
||||
#endif
|
||||
|
||||
#endif /* _I386_PCB_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user