diff options
Diffstat (limited to 'sys/sun4v/include')
-rw-r--r-- | sys/sun4v/include/frame.h | 6 | ||||
-rw-r--r-- | sys/sun4v/include/fsr.h | 4 | ||||
-rw-r--r-- | sys/sun4v/include/intr_machdep.h | 21 | ||||
-rw-r--r-- | sys/sun4v/include/pcb.h | 8 | ||||
-rw-r--r-- | sys/sun4v/include/utrap.h | 2 |
5 files changed, 28 insertions, 13 deletions
diff --git a/sys/sun4v/include/frame.h b/sys/sun4v/include/frame.h index b9b10881cac6..55438ac6a20e 100644 --- a/sys/sun4v/include/frame.h +++ b/sys/sun4v/include/frame.h @@ -33,6 +33,8 @@ #define SPOFF 2047 #define BIAS SPOFF /* XXX - open/netbsd compat */ +#ifndef LOCORE + /* * NOTE: keep this structure in sync with struct reg and struct mcontext. */ @@ -57,7 +59,7 @@ struct trapframe { */ #define tf_sp tf_out[6] - + #define TF_DONE(tf) do { \ tf->tf_tpc = tf->tf_tnpc; \ tf->tf_tnpc += 4; \ @@ -87,4 +89,6 @@ struct thread; int rwindow_save(struct thread *td); int rwindow_load(struct thread *td, struct trapframe *tf, int n); +#endif /* !LOCORE */ + #endif /* !_MACHINE_FRAME_H_ */ diff --git a/sys/sun4v/include/fsr.h b/sys/sun4v/include/fsr.h index 61a81f7ef965..db0039a236e0 100644 --- a/sys/sun4v/include/fsr.h +++ b/sys/sun4v/include/fsr.h @@ -31,6 +31,8 @@ #define FPRS_DU (1 << 1) #define FPRS_FEF (1 << 2) +#ifndef LOCORE + #define FSR_EXC_BITS 5 #define FSR_EXC_MASK ((1UL << FSR_EXC_BITS) - 1) #define FSR_CEXC_SHIFT 0 @@ -105,4 +107,6 @@ #define FSR_CC_GT 2 /* a > b */ #define FSR_CC_UO 3 /* unordered */ +#endif /* !LOCORE */ + #endif /* !_MACHINE_FSR_H_ */ diff --git a/sys/sun4v/include/intr_machdep.h b/sys/sun4v/include/intr_machdep.h index de59b1e4fe32..4c8111c7be9c 100644 --- a/sys/sun4v/include/intr_machdep.h +++ b/sys/sun4v/include/intr_machdep.h @@ -49,6 +49,8 @@ #define PIL_FAST 13 /* fast interrupts */ #define PIL_TICK 14 +#ifndef LOCORE + struct trapframe; typedef void ih_func_t(struct trapframe *); @@ -76,21 +78,23 @@ extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, - void *iva); + void *iva); int inthand_add(const char *name, int vec, void (*handler)(void *), - void *arg, int flags, void **cookiep); + void *arg, int flags, void **cookiep); int inthand_remove(int vec, void *cookie); -void cpu_intrq_init(void); - +void cpu_intrq_init(void); ih_func_t intr_fast; -#define CPU_LIST_SIZE (MAXCPU * sizeof(uint16_t)) +#define CPU_LIST_SIZE (MAXCPU * sizeof(uint16_t)) -#define INTR_REPORT_SIZE 64 #define INTR_CPU_Q_SIZE (cpu_q_entries * INTR_REPORT_SIZE) #define INTR_DEV_Q_SIZE (dev_q_entries * INTR_REPORT_SIZE) +#endif /* !LOCORE */ + +#define INTR_REPORT_SIZE 64 + #define CPU_RQ_ENTRIES 64 #define CPU_NRQ_ENTRIES 64 @@ -99,7 +103,4 @@ ih_func_t intr_fast; #define CPU_NRQ_SIZE (CPU_NRQ_ENTRIES * Q_ENTRY_SIZE) - - - -#endif +#endif /* !_MACHINE_INTR_MACHDEP_H_ */ diff --git a/sys/sun4v/include/pcb.h b/sys/sun4v/include/pcb.h index 9791cd5cb330..ae366e5ae45f 100644 --- a/sys/sun4v/include/pcb.h +++ b/sys/sun4v/include/pcb.h @@ -29,12 +29,16 @@ #ifndef _MACHINE_PCB_H_ #define _MACHINE_PCB_H_ +#ifndef LOCORE #include <machine/frame.h> +#endif #define MAXWIN 8 #define PCB_FEF (1 << 0) +#ifndef LOCORE + /* NOTE: pcb_ufp must be aligned on a 64 byte boundary. */ struct pcb { struct rwindow pcb_rw[MAXWIN]; /* wbuf for page faults during spill / fill trap handling */ @@ -55,8 +59,10 @@ struct pcb { } __aligned(64); #ifdef _KERNEL -void makectx(struct trapframe *, struct pcb *); +void makectx(struct trapframe *tf, struct pcb *pcb); int savectx(struct pcb *pcb); #endif +#endif /* !LOCORE */ + #endif /* !_MACHINE_PCB_H_ */ diff --git a/sys/sun4v/include/utrap.h b/sys/sun4v/include/utrap.h index cea69333b866..45019c8ca9ee 100644 --- a/sys/sun4v/include/utrap.h +++ b/sys/sun4v/include/utrap.h @@ -77,7 +77,7 @@ /* 8 is 32-bit ABI syscall (old solaris syscall?) */ #define ST_BSD_SYSCALL 9 #define ST_FP_RESTORE 10 -#define ST_FPEMU_CONTEXT 11 +#define ST_FPEMU_CONTEXT 11 /* 11-15 are available */ /* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */ /* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */ |