diff options
Diffstat (limited to 'sys/arch/mvme88k/include')
25 files changed, 578 insertions, 999 deletions
diff --git a/sys/arch/mvme88k/include/asm.h b/sys/arch/mvme88k/include/asm.h index cb550dec00a..528264bd4ae 100644 --- a/sys/arch/mvme88k/include/asm.h +++ b/sys/arch/mvme88k/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.17 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: asm.h,v 1.18 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System @@ -36,11 +36,6 @@ #define _C_LABEL(name) _/**/name #endif -/* Define EH_DEBUG to be non-zero to compile-in various debugging things */ -#ifndef EH_DEBUG -#define EH_DEBUG 0 -#endif EH_DEBUG - #define _ASM_LABEL(name) name #define _ENTRY(name) \ @@ -214,7 +209,6 @@ #define FLAG_187 9 /* bit number 9 */ #define FLAG_188 10 /* bit number 10 */ #define FLAG_197 11 /* bit number 11 */ -#define FLAG_TBE 12 /* bit number 12 */ /* REGister OFFset into the E.F. (exception frame) */ #define REG_OFF(reg_num) ((reg_num) * 4) /* (num * sizeof(register int)) */ @@ -242,21 +236,12 @@ /* * Info about the PSR */ -#define PSR_SHADOW_FREEZE_BIT 0 -#define PSR_INTERRUPT_DISABLE_BIT 1 -#define PSR_FPU_DISABLE_BIT 3 -#define PSR_BIG_ENDIAN_MODE 30 -#define PSR_SUPERVISOR_MODE_BIT 31 -/* - * mc88110 PSR bit definitions (MVME197) - */ -#define PSR_GRAPHICS_DISABLE_BIT 4 -#define PSR_SERIAL_MODE_BIT 29 -#define PSR_CARRY_BIT 28 -#define PSR_SERIALIZE_BIT 25 +#define PSR_SHADOW_FREEZE_BIT 0 +#define PSR_INTERRUPT_DISABLE_BIT 1 +#define PSR_FPU_DISABLE_BIT 3 +#define PSR_BIG_ENDIAN_MODE 30 +#define PSR_SUPERVISOR_MODE_BIT 31 -#define DSR_TBE 21 -#define DCTL_MEN 5 /* * Status bits for an SXIP/SNIP/SFIP address. */ diff --git a/sys/arch/mvme88k/include/asm_macro.h b/sys/arch/mvme88k/include/asm_macro.h index 43921667f0d..0d548208676 100644 --- a/sys/arch/mvme88k/include/asm_macro.h +++ b/sys/arch/mvme88k/include/asm_macro.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm_macro.h,v 1.17 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: asm_macro.h,v 1.18 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -89,16 +89,6 @@ static __inline__ void set_psr(m88k_psr_type psr) } /* - * Gets the PSR. See comments above. - */ -static __inline__ m88k_psr_type get_psr(void) -{ - m88k_psr_type psr; - __asm__ __volatile__ ("ldcr %0, cr1" : "=r" (psr)); - return psr; -} - -/* * Enables interrupts. */ static __inline__ m88k_psr_type enable_interrupts_return_psr(void) diff --git a/sys/arch/mvme88k/include/board.h b/sys/arch/mvme88k/include/board.h index 024c84ec304..b2fac596c7a 100644 --- a/sys/arch/mvme88k/include/board.h +++ b/sys/arch/mvme88k/include/board.h @@ -1,4 +1,4 @@ -/* $OpenBSD: board.h,v 1.12 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: board.h,v 1.13 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -108,20 +108,13 @@ #define FPUP_BIT 0x400 /* FPU precise exception */ #define FPUI_BIT 0x800 /* FPU imprecise exception */ -/* machine dependant definitions */ - #if defined(MVME187) || defined(MVME197) #include <machine/mvme1x7.h> #endif -#ifdef MVME187 -#include <machine/mvme187.h> -#endif + #ifdef MVME188 #include <machine/mvme188.h> #endif -#ifdef MVME197 -#include <machine/mvme197.h> -#endif #endif /* __MACHINE_BOARD_H__ */ diff --git a/sys/arch/mvme88k/include/cmmu.h b/sys/arch/mvme88k/include/cmmu.h index fcbf197fb0a..cb81f1f55ad 100644 --- a/sys/arch/mvme88k/include/cmmu.h +++ b/sys/arch/mvme88k/include/cmmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.h,v 1.8 2001/12/14 04:30:11 smurph Exp $ */ +/* $OpenBSD: cmmu.h,v 1.9 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -28,8 +28,6 @@ #ifndef _MACHINE_CMMU_H_ #define _MACHINE_CMMU_H_ -#include <machine/mmu.h> - /* Area Description */ #define AREA_D_WT 0x00000200 /* write through */ #define AREA_D_G 0x00000080 /* global */ @@ -60,106 +58,70 @@ extern unsigned cpu_sets[MAX_CPUS]; extern int cpu_cmmu_ratio; extern unsigned number_cpus, master_cpu; extern unsigned cache_policy; -extern unsigned number_cpus; -extern unsigned master_cpu; -extern int max_cpus, max_cmmus; +extern int max_cpus, max_cmmus; + +#ifdef CMMU_DEBUG +void show_apr(unsigned value); +void show_sctr(unsigned value); +#endif -/* - * This lock protects the cmmu SAR and SCR's; other ports - * can be accessed without locking it - * - * May be used from "db_interface.c". - */ -extern struct simplelock cmmu_cpu_lock; - -#define CMMU_LOCK simple_lock(&cmmu_cpu_lock) -#define CMMU_UNLOCK simple_unlock(&cmmu_cpu_lock) - -/* machine dependant cmmu function pointer structure */ -struct cmmu_p { - void (*cmmu_init_func) __P((void)); - void (*show_apr_func) __P((unsigned)); - void (*setup_board_config_func) __P((void)); - void (*setup_cmmu_config_func) __P((void)); - void (*cmmu_dump_config_func) __P((void)); - void (*cpu_configuration_print_func) __P((int)); - void (*cmmu_shutdown_now_func) __P((void)); - void (*cmmu_parity_enable_func) __P((void)); - unsigned (*cmmu_cpu_number_func) __P((void)); - unsigned (*cmmu_get_idr_func) __P((unsigned)); - void (*cmmu_set_sapr_func) __P((unsigned)); - void (*cmmu_remote_set_sapr_func) __P((unsigned, unsigned)); - void (*cmmu_set_uapr_func) __P((unsigned)); - void (*cmmu_set_batc_entry_func) __P((unsigned, unsigned, unsigned, unsigned)); - void (*cmmu_set_pair_batc_entry_func) __P((unsigned, unsigned, unsigned)); - void (*cmmu_flush_remote_tlb_func) __P((unsigned, unsigned, vm_offset_t, int)); - void (*cmmu_flush_tlb_func) __P((unsigned, vm_offset_t, int)); - void (*cmmu_pmap_activate_func) __P((unsigned, unsigned, - batc_template_t i_batc[BATC_MAX], - batc_template_t d_batc[BATC_MAX])); - void (*cmmu_flush_remote_cache_func) __P((int, vm_offset_t, int)); - void (*cmmu_flush_cache_func) __P((vm_offset_t, int)); - void (*cmmu_flush_remote_inst_cache_func) __P((int, vm_offset_t, int)); - void (*cmmu_flush_inst_cache_func) __P((vm_offset_t, int)); - void (*cmmu_flush_remote_data_cache_func) __P((int, vm_offset_t, int)); - void (*cmmu_flush_data_cache_func) __P((vm_offset_t, int)); - void (*dma_cachectl_func) __P((vm_offset_t, int, int)); -#ifdef DDB - unsigned (*cmmu_get_by_mode_func) __P((int, int)); - void (*cmmu_show_translation_func) __P((unsigned, unsigned, unsigned, int)); - void (*cmmu_cache_state_func) __P((unsigned, unsigned)); - void (*show_cmmu_info_func) __P((unsigned)); -#endif /* end if DDB */ -}; - -/* THE pointer! */ -extern struct cmmu_p *cmmu; - -extern struct cmmu_p cmmu88110; -extern struct cmmu_p cmmu8820x; - -/* The macros... */ -#define cmmu_init (cmmu->cmmu_init_func) -#define show_apr(ap) (cmmu->show_apr_func)(ap) -#define setup_board_config (cmmu->setup_board_config_func) -#define setup_cmmu_config (cmmu->setup_cmmu_config_func) -#define cmmu_dump_config (cmmu->cmmu_dump_config_func) -#define cpu_configuration_print(a) (cmmu->cpu_configuration_print_func)(a) -#define cmmu_shutdown_now (cmmu->cmmu_shutdown_now_func) -#define cmmu_parity_enable (cmmu->cmmu_parity_enable_func) -#define cmmu_cpu_number (cmmu->cmmu_cpu_number_func) -#define cmmu_get_idr(a) (cmmu->cmmu_get_idr_func)(a) -#define cmmu_set_sapr(a) (cmmu->cmmu_set_sapr_func)(a) -#define cmmu_remote_set_sapr(a, b) (cmmu->cmmu_remote_set_sapr_func)(a, b) -#define cmmu_set_uapr(a) (cmmu->cmmu_set_uapr_func)(a) -#define cmmu_set_batc_entry(a, b, c, d) (cmmu->cmmu_set_batc_entry_func)(a, b, c, d) -#define cmmu_set_pair_batc_entry(a, b, c) (cmmu->cmmu_set_pair_batc_entry_func)(a, b, c) -#define cmmu_flush_remote_tlb(a, b, c, d) (cmmu->cmmu_flush_remote_tlb_func)(a, b, c, d) -#define cmmu_flush_tlb(a, b, c) (cmmu->cmmu_flush_tlb_func)(a, b, c) -#define cmmu_pmap_activate(a, b, c, d) (cmmu->cmmu_pmap_activate_func)(a, b, c, d) -#define cmmu_flush_remote_cache(a, b, c) (cmmu->cmmu_flush_remote_cache_func)(a, b, c) -#define cmmu_flush_cache(a, b) (cmmu->cmmu_flush_cache_func)(a, b) -#define cmmu_flush_remote_inst_cache(a, b, c) (cmmu->cmmu_flush_remote_inst_cache_func)(a, b, c) -#define cmmu_flush_inst_cache(a, b) (cmmu->cmmu_flush_inst_cache_func)(a, b) -#define cmmu_flush_remote_data_cache(a, b, c) (cmmu->cmmu_flush_remote_data_cache_func)(a, b, c) -#define cmmu_flush_data_cache(a, b) (cmmu->cmmu_flush_data_cache_func)(a, b) -#define dma_cachectl(a, b, c) (cmmu->dma_cachectl_func)(a, b, c) #ifdef DDB -#define cmmu_get_by_mode(a, b) (cmmu->cmmu_get_by_mode_func)(a, b) -#define cmmu_show_translation(a, b, c, d) (cmmu->cmmu_show_translation_func)(a, b, c, d) -#define cmmu_cache_state(a, b) (cmmu->cmmu_cache_state_func)(a, b) -#define show_cmmu_info(a) (cmmu->show_cmmu_info_func)(a) -#endif /* end if DDB */ +void cmmu_show_translation(unsigned, unsigned, unsigned, int); +void cmmu_cache_state(unsigned, unsigned); +void show_cmmu_info(unsigned); +#endif -#endif /* _LOCORE */ +/* + * Prototypes from "mvme88k/mvme88k/cmmu.c" + */ -#ifdef M88100 -#include <machine/m8820x.h> -#endif /* M88100 */ -#ifdef M88110 -#include <machine/m88110.h> -#include <machine/m88410.h> -#endif /* M88110 */ +unsigned cmmu_cpu_number(void); +unsigned cmmu_remote_get(unsigned cpu, unsigned r, unsigned data); +unsigned cmmu_get_idr(unsigned data); +void cmmu_init(void); +void cmmu_shutdown_now(void); +void cmmu_parity_enable(void); +void setup_board_config(void); +void setup_cmmu_config(void); +void cmmu_dump_config(void); +unsigned cmmu_get_by_mode(int cpu, int mode); +void cpu_configuration_print(int master); +void dma_cachectl(vm_offset_t va, int size, int op); +void cmmu_remote_set(unsigned cpu, unsigned r, unsigned data, unsigned x); +void cmmu_set_sapr(unsigned ap); +void cmmu_remote_set_sapr(unsigned cpu, unsigned ap); +void cmmu_set_uapr(unsigned ap); +void cmmu_flush_tlb(unsigned kernel, vm_offset_t vaddr, int size); +void cmmu_flush_remote_cache(int cpu, vm_offset_t physaddr, int size); +void cmmu_flush_cache(vm_offset_t physaddr, int size); +void cmmu_flush_remote_inst_cache(int cpu, vm_offset_t physaddr, int size); +void cmmu_flush_inst_cache(vm_offset_t physaddr, int size); +void cmmu_flush_remote_data_cache(int cpu, vm_offset_t physaddr, int size); +void cmmu_flush_data_cache(vm_offset_t physaddr, int size); + +void cmmu_pmap_activate( + unsigned cpu, + unsigned uapr, + batc_template_t i_batc[BATC_MAX], + batc_template_t d_batc[BATC_MAX]); + +void cmmu_flush_remote_tlb( + unsigned cpu, + unsigned kernel, + vm_offset_t vaddr, + int size); + +void cmmu_set_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned data, /* 1 = data, 0 = instruction */ + unsigned value); /* the value to stuff into the batc */ + +void cmmu_set_pair_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned value); /* the value to stuff into the batc */ -#endif /* _MACHINE_CMMU_H_ */ +#endif /* _LOCORE */ +#endif /* _MACHINE_CMMU_H_ */ diff --git a/sys/arch/mvme88k/include/cpu.h b/sys/arch/mvme88k/include/cpu.h index 333ed474c1b..1206fe23b69 100644 --- a/sys/arch/mvme88k/include/cpu.h +++ b/sys/arch/mvme88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.14 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: cpu.h,v 1.15 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -184,23 +184,18 @@ struct switchframe { void *sf_proc; /* proc pointer */ }; -/* This struct defines the machine dependant pointers */ -struct md_p { +/* This struct defines the machine dependant function pointers */ + +struct funcp { void (*clock_init_func) __P((void)); /* interval clock init function */ void (*statclock_init_func) __P((void)); /* statistics clock init function */ void (*delayclock_init_func) __P((void)); /* delay clock init function */ void (*delay_func) __P((void)); /* delay clock function */ - void (*interrupt_func) __P((u_int, struct m88100_saved_state *)); /* interrupt func */ - void (*fp_precise_func) __P((void)); /* floating point precise function */ - void (*trap_func) __P((unsigned, struct m88100_saved_state *)); - void (*syscall_func) __P((register_t, struct m88100_saved_state *)); - volatile u_char *intr_mask; - volatile u_char *intr_ipl; - volatile u_char *intr_src; + void (*interrupt_func) __P((u_int, struct m88100_saved_state *)); /* interrupt func */ + void (*fp_precise_func) __P((void)); /* floating point precise function */ }; -extern struct md_p md; - +extern struct funcp mdfp; int badvaddr __P((vm_offset_t va, int size)); void nmihand __P((void *framep)); diff --git a/sys/arch/mvme88k/include/cpu_number.h b/sys/arch/mvme88k/include/cpu_number.h index 410e2614592..51bd18ce32e 100644 --- a/sys/arch/mvme88k/include/cpu_number.h +++ b/sys/arch/mvme88k/include/cpu_number.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu_number.h,v 1.7 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: cpu_number.h,v 1.8 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System @@ -39,7 +39,8 @@ static unsigned cpu_number __P((void)); static __inline__ unsigned cpu_number(void) { register unsigned cpu; - if (brdtyp != BRD_188 || number_cpus == 1) return 0; + + if (cputyp != CPU_188 || number_cpus == 1) return 0; __asm__ ("ldcr %0, cr18" : "=r" (cpu)); return (cpu & 3); } diff --git a/sys/arch/mvme88k/include/cpus.h b/sys/arch/mvme88k/include/cpus.h index 1eccf65b3ad..aecc8d49114 100644 --- a/sys/arch/mvme88k/include/cpus.h +++ b/sys/arch/mvme88k/include/cpus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpus.h,v 1.9 2001/12/13 19:59:15 miod Exp $ */ +/* $OpenBSD: cpus.h,v 1.10 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -24,41 +24,42 @@ * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ - +/* + * + * HISTORY + */ /* - * Identifiers for 88k family chips + Versions Idents for 88k family chips */ -#ifndef _MACHINE_CPUS_H_ -#define _MACHINE_CPUS_H_ +#ifndef __MACHINE_CPUS_H__ +#define __MACHINE_CPUS_H__ /* * cpu Processor Identification Register (PID). */ #ifndef _LOCORE - union cpupid { - unsigned cpupid; - struct { - unsigned - /*empty*/:16, - arc:8, - version:7, - master:1; - } m88100; - struct { - unsigned - id:8, - type:3, - version:5, - /*empty*/:16; - } m88200; + unsigned cpupid; + struct { + unsigned + /*empty*/:16, + arc:8, + version:7, + master:1; + } m88100; + struct { + unsigned + id:8, + type:3, + version:5, + /*empty*/:16; + } m88200; }; - #endif /* _LOCORE */ -#define M88100_ID 0 -#define M88200_ID 5 -#define M88204_ID 6 +#define M88100 0 +#define M88200 5 +#define M88204 6 -#endif /* _MACHINE_CPUS_H_ */ +#endif /* __MACHINE_CPUS_H__ */ diff --git a/sys/arch/mvme88k/include/db_machdep.h b/sys/arch/mvme88k/include/db_machdep.h index aa6ba3669fd..0cc38b7a625 100644 --- a/sys/arch/mvme88k/include/db_machdep.h +++ b/sys/arch/mvme88k/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.17 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.18 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -49,8 +49,7 @@ #include <uvm/uvm_param.h> -#define INTERNAL_SSTEP /* Use local Single Step routines */ -#define BKPT_SIZE (4) /* number of bytes in bkpt inst. */ +#define BKPT_SIZE (4) /* number of bytes in bkpt inst. */ #define BKPT_INST (0xF000D000 | DDB_ENTRY_BKPT_NO) /* tb0, 0,r0, vector 130 */ #define BKPT_SET(inst) (BKPT_INST) @@ -72,9 +71,7 @@ extern db_regs_t ddb_regs; /* register state */ ({ \ int ret; \ \ - if (cputyp == CPU_88110) \ - ret = regs->sxip & ~3; \ - else if (regs->sxip & 2) /* is valid */ \ + if (regs->sxip & 2) /* is valid */ \ ret = regs->sxip & ~3; \ else if (regs->snip & 2) \ ret = regs->snip & ~3; \ @@ -88,15 +85,12 @@ extern db_regs_t ddb_regs; /* register state */ * This is an actual function due to the fact that the sxip * or snip could be nooped out due to a jmp or rte */ -#define PC_REGS(regs) cputyp == CPU_88110 ? (regs->exip & ~3) :\ - ((regs->sxip & 2) ? regs->sxip & ~3 : \ +#define PC_REGS(regs) ((regs->sxip & 2) ? regs->sxip & ~3 : \ (regs->snip & 2 ? regs->snip & ~3 : regs->sfip & ~3)) -#define l_PC_REGS(regs) cputyp == CPU_88110 ? (regs->exip & ~3) :\ - ((regs->sxip & 2) ? regs->sxip : \ +#define l_PC_REGS(regs) ((regs->sxip & 2) ? regs->sxip : \ (regs->snip & 2 ? regs->snip : regs->sfip )) -#define pC_REGS(regs) cputyp == CPU_88110 ? (regs->exip & ~3) :\ - (regs->sxip & 2) ? regs->sxip : (regs->snip & 2 ? \ +#define pC_REGS(regs) (regs->sxip & 2) ? regs->sxip : (regs->snip & 2 ? \ regs->snip : regs->sfip) extern int db_noisy; #define NOISY(x) if (db_noisy) x @@ -130,14 +124,8 @@ int ddb_entry_trap __P((int level, db_regs_t *eframe)); /* we don't want coff support */ #define DB_NO_COFF 1 -#ifdef INTERNAL_SSTEP -extern register_t getreg_val __P((db_regs_t *, int)); -void db_set_single_step __P((register db_regs_t *)); -void db_clear_single_step __P((register db_regs_t *)); -#else /* need software single step */ -#define SOFTWARE_SSTEP 1 /* we need this for mc88100 */ -#endif +#define SOFTWARE_SSTEP 1 /* we need this XXX nivas */ /* * Debugger can get to any address space diff --git a/sys/arch/mvme88k/include/exception_vectors2.h b/sys/arch/mvme88k/include/exception_vectors2.h index d3bef68b320..1e5ee0b11db 100644 --- a/sys/arch/mvme88k/include/exception_vectors2.h +++ b/sys/arch/mvme88k/include/exception_vectors2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exception_vectors2.h,v 1.4 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: exception_vectors2.h,v 1.5 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991, 1992 Carnegie Mellon University @@ -25,145 +25,143 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/*#define M88110_UNDEFINED PREDEFINED_BY_ROM*/ +/*#define M197_UNDEFINED PREDEFINED_BY_ROM*/ #ifndef __MACHINE_EXECPTION_VECTORS2_H__ #define __MACHINE_EXECPTION_VECTORS2_H__ -#ifndef M88110_UNDEFINED -#define M88110_UNDEFINED _m88110_unknown_handler +#ifndef M197_M197_UNDEFINED +#define M197_UNDEFINED _m197_unknown_handler #endif - -/* vector 0x00 (#0) */ word _m88110_reset_handler -/* vector 0x01 (#1) */ word _m88110_interrupt_handler -/* vector 0x02 (#2) */ word _m88110_instruction_access_handler -/* vector 0x03 (#3) */ word _m88110_data_exception_handler -/* vector 0x04 (#4) */ word _m88110_misaligned_handler -/* vector 0x05 (#5) */ word _m88110_unimplemented_handler -/* vector 0x06 (#6) */ word _m88110_privilege_handler -/* vector 0x07 (#7) */ word _m88110_bounds_handler -/* vector 0x08 (#8) */ word _m88110_divide_handler -/* vector 0x09 (#9) */ word _m88110_overflow_handler -/* vector 0x0a (#10) */ word _m88110_error_handler -/* vector 0x0b (#11) */ word _m88110_nonmaskable -/* vector 0x0c (#12) */ word _m88110_data_read_miss -/* vector 0x0d (#13) */ word _m88110_data_write_miss -/* vector 0x0e (#14) */ word _m88110_inst_atc_miss -/* vector 0x0f (#15) */ word _m88110_trace -/* vector 0x10 (#16) */ word M88110_UNDEFINED -/* vector 0x11 (#17) */ word M88110_UNDEFINED -/* vector 0x12 (#18) */ word M88110_UNDEFINED -/* vector 0x13 (#19) */ word M88110_UNDEFINED -/* vector 0x14 (#20) */ word M88110_UNDEFINED -/* vector 0x15 (#21) */ word M88110_UNDEFINED -/* vector 0x16 (#22) */ word M88110_UNDEFINED -/* vector 0x17 (#23) */ word M88110_UNDEFINED -/* vector 0x18 (#24) */ word M88110_UNDEFINED -/* vector 0x19 (#25) */ word M88110_UNDEFINED -/* vector 0x1a (#26) */ word M88110_UNDEFINED -/* vector 0x1b (#27) */ word M88110_UNDEFINED -/* vector 0x1c (#28) */ word M88110_UNDEFINED -/* vector 0x1d (#29) */ word M88110_UNDEFINED -/* vector 0x1e (#30) */ word M88110_UNDEFINED -/* vector 0x1f (#31) */ word M88110_UNDEFINED -/* vector 0x20 (#32) */ word M88110_UNDEFINED -/* vector 0x21 (#33) */ word M88110_UNDEFINED -/* vector 0x22 (#34) */ word M88110_UNDEFINED -/* vector 0x23 (#35) */ word M88110_UNDEFINED -/* vector 0x24 (#36) */ word M88110_UNDEFINED -/* vector 0x25 (#37) */ word M88110_UNDEFINED -/* vector 0x26 (#38) */ word M88110_UNDEFINED -/* vector 0x27 (#39) */ word M88110_UNDEFINED -/* vector 0x28 (#40) */ word M88110_UNDEFINED -/* vector 0x29 (#41) */ word M88110_UNDEFINED -/* vector 0x2a (#42) */ word M88110_UNDEFINED -/* vector 0x2b (#43) */ word M88110_UNDEFINED -/* vector 0x2c (#44) */ word M88110_UNDEFINED -/* vector 0x2d (#45) */ word M88110_UNDEFINED -/* vector 0x2e (#46) */ word M88110_UNDEFINED -/* vector 0x2f (#47) */ word M88110_UNDEFINED -/* vector 0x30 (#48) */ word M88110_UNDEFINED -/* vector 0x31 (#49) */ word M88110_UNDEFINED -/* vector 0x32 (#50) */ word M88110_UNDEFINED -/* vector 0x33 (#51) */ word M88110_UNDEFINED -/* vector 0x34 (#52) */ word M88110_UNDEFINED -/* vector 0x35 (#53) */ word M88110_UNDEFINED -/* vector 0x36 (#54) */ word M88110_UNDEFINED -/* vector 0x37 (#55) */ word M88110_UNDEFINED -/* vector 0x38 (#56) */ word M88110_UNDEFINED -/* vector 0x39 (#57) */ word M88110_UNDEFINED -/* vector 0x3a (#58) */ word M88110_UNDEFINED -/* vector 0x3b (#59) */ word M88110_UNDEFINED -/* vector 0x3c (#60) */ word M88110_UNDEFINED -/* vector 0x3d (#61) */ word M88110_UNDEFINED -/* vector 0x3e (#62) */ word M88110_UNDEFINED -/* vector 0x3f (#63) */ word M88110_UNDEFINED -/* vector 0x40 (#64) */ word M88110_UNDEFINED -/* vector 0x41 (#65) */ word M88110_UNDEFINED -/* vector 0x42 (#66) */ word M88110_UNDEFINED -/* vector 0x43 (#67) */ word M88110_UNDEFINED -/* vector 0x44 (#68) */ word M88110_UNDEFINED -/* vector 0x45 (#69) */ word M88110_UNDEFINED -/* vector 0x46 (#70) */ word M88110_UNDEFINED -/* vector 0x47 (#71) */ word M88110_UNDEFINED -/* vector 0x48 (#72) */ word M88110_UNDEFINED -/* vector 0x49 (#73) */ word M88110_UNDEFINED -/* vector 0x4a (#74) */ word M88110_UNDEFINED -/* vector 0x4b (#75) */ word M88110_UNDEFINED -/* vector 0x4c (#76) */ word M88110_UNDEFINED -/* vector 0x4d (#77) */ word M88110_UNDEFINED -/* vector 0x4e (#78) */ word M88110_UNDEFINED -/* vector 0x4f (#79) */ word M88110_UNDEFINED -/* vector 0x50 (#80) */ word M88110_UNDEFINED -/* vector 0x51 (#81) */ word M88110_UNDEFINED -/* vector 0x52 (#82) */ word M88110_UNDEFINED -/* vector 0x53 (#83) */ word M88110_UNDEFINED -/* vector 0x54 (#84) */ word M88110_UNDEFINED -/* vector 0x55 (#85) */ word M88110_UNDEFINED -/* vector 0x56 (#86) */ word M88110_UNDEFINED -/* vector 0x57 (#87) */ word M88110_UNDEFINED -/* vector 0x58 (#88) */ word M88110_UNDEFINED -/* vector 0x59 (#89) */ word M88110_UNDEFINED -/* vector 0x5a (#90) */ word M88110_UNDEFINED -/* vector 0x5b (#91) */ word M88110_UNDEFINED -/* vector 0x5c (#92) */ word M88110_UNDEFINED -/* vector 0x5d (#93) */ word M88110_UNDEFINED -/* vector 0x5e (#94) */ word M88110_UNDEFINED -/* vector 0x5f (#95) */ word M88110_UNDEFINED -/* vector 0x60 (#96) */ word M88110_UNDEFINED -/* vector 0x61 (#97) */ word M88110_UNDEFINED -/* vector 0x62 (#98) */ word M88110_UNDEFINED -/* vector 0x63 (#99) */ word M88110_UNDEFINED -/* vector 0x64 (#100) */ word M88110_UNDEFINED -/* vector 0x65 (#101) */ word M88110_UNDEFINED -/* vector 0x66 (#102) */ word M88110_UNDEFINED -/* vector 0x67 (#103) */ word M88110_UNDEFINED -/* vector 0x68 (#104) */ word M88110_UNDEFINED -/* vector 0x69 (#105) */ word M88110_UNDEFINED -/* vector 0x6a (#106) */ word M88110_UNDEFINED -/* vector 0x6b (#107) */ word M88110_UNDEFINED -/* vector 0x6c (#108) */ word M88110_UNDEFINED -/* vector 0x6d (#109) */ word M88110_UNDEFINED -/* vector 0x6e (#110) */ word M88110_UNDEFINED -/* vector 0x6f (#111) */ word M88110_UNDEFINED -/* vector 0x70 (#112) */ word M88110_UNDEFINED -/* vector 0x71 (#113) */ word M88110_UNDEFINED -/* vector 0x72 (#114) */ word _m88110_fp_precise_handler -/* vector 0x73 (#115) */ word M88110_UNDEFINED -/* vector 0x74 (#116) */ word _m88110_unimplemented_handler -/* vector 0x75 (#117) */ word M88110_UNDEFINED -/* vector 0x76 (#118) */ word _m88110_unimplemented_handler -/* vector 0x77 (#119) */ word M88110_UNDEFINED -/* vector 0x78 (#120) */ word _m88110_unimplemented_handler -/* vector 0x79 (#121) */ word M88110_UNDEFINED -/* vector 0x7a (#122) */ word _m88110_unimplemented_handler -/* vector 0x7b (#123) */ word M88110_UNDEFINED -/* vector 0x7c (#124) */ word _m88110_unimplemented_handler -/* vector 0x7d (#125) */ word M88110_UNDEFINED -/* vector 0x7e (#126) */ word _m88110_unimplemented_handler -/* vector 0x7f (#127) */ word M88110_UNDEFINED -/* vector 0x80 (#128) */ word _m88110_syscall_handler -/* vector 0x81 (#129) */ word _m88110_syscall_handler -/* vector 0x82 (#130) */ word _m88110_break -/* vector 0x83 (#131) */ word _m88110_trace -/* vector 0x84 (#132) */ word _m88110_entry +/* vector 0x00 (#0) */ word _m197_reset_handler +/* vector 0x01 (#1) */ word _m197_interrupt_handler +/* vector 0x02 (#2) */ word _m197_instruction_access_handler +/* vector 0x03 (#3) */ word _m197_data_exception_handler +/* vector 0x04 (#4) */ word _m197_misaligned_handler +/* vector 0x05 (#5) */ word _m197_unimplemented_handler +/* vector 0x06 (#6) */ word _m197_privilege_handler +/* vector 0x07 (#7) */ word _m197_bounds_handler +/* vector 0x08 (#8) */ word _m197_divide_handler +/* vector 0x09 (#9) */ word _m197_overflow_handler +/* vector 0x0a (#10) */ word _m197_error_handler +/* vector 0x0b (#11) */ word _m197_nonmaskable +/* vector 0x0c (#12) */ word _m197_data_read_miss +/* vector 0x0d (#13) */ word _m197_data_write_miss +/* vector 0x0e (#14) */ word _m197_inst_atc_miss +/* vector 0x0f (#15) */ word _m197_trace +/* vector 0x10 (#16) */ word M197_UNDEFINED +/* vector 0x11 (#17) */ word M197_UNDEFINED +/* vector 0x12 (#18) */ word M197_UNDEFINED +/* vector 0x13 (#19) */ word M197_UNDEFINED +/* vector 0x14 (#20) */ word M197_UNDEFINED +/* vector 0x15 (#21) */ word M197_UNDEFINED +/* vector 0x16 (#22) */ word M197_UNDEFINED +/* vector 0x17 (#23) */ word M197_UNDEFINED +/* vector 0x18 (#24) */ word M197_UNDEFINED +/* vector 0x19 (#25) */ word M197_UNDEFINED +/* vector 0x1a (#26) */ word M197_UNDEFINED +/* vector 0x1b (#27) */ word M197_UNDEFINED +/* vector 0x1c (#28) */ word M197_UNDEFINED +/* vector 0x1d (#29) */ word M197_UNDEFINED +/* vector 0x1e (#30) */ word M197_UNDEFINED +/* vector 0x1f (#31) */ word M197_UNDEFINED +/* vector 0x20 (#32) */ word M197_UNDEFINED +/* vector 0x21 (#33) */ word M197_UNDEFINED +/* vector 0x22 (#34) */ word M197_UNDEFINED +/* vector 0x23 (#35) */ word M197_UNDEFINED +/* vector 0x24 (#36) */ word M197_UNDEFINED +/* vector 0x25 (#37) */ word M197_UNDEFINED +/* vector 0x26 (#38) */ word M197_UNDEFINED +/* vector 0x27 (#39) */ word M197_UNDEFINED +/* vector 0x28 (#40) */ word M197_UNDEFINED +/* vector 0x29 (#41) */ word M197_UNDEFINED +/* vector 0x2a (#42) */ word M197_UNDEFINED +/* vector 0x2b (#43) */ word M197_UNDEFINED +/* vector 0x2c (#44) */ word M197_UNDEFINED +/* vector 0x2d (#45) */ word M197_UNDEFINED +/* vector 0x2e (#46) */ word M197_UNDEFINED +/* vector 0x2f (#47) */ word M197_UNDEFINED +/* vector 0x30 (#48) */ word M197_UNDEFINED +/* vector 0x31 (#49) */ word M197_UNDEFINED +/* vector 0x32 (#50) */ word M197_UNDEFINED +/* vector 0x33 (#51) */ word M197_UNDEFINED +/* vector 0x34 (#52) */ word M197_UNDEFINED +/* vector 0x35 (#53) */ word M197_UNDEFINED +/* vector 0x36 (#54) */ word M197_UNDEFINED +/* vector 0x37 (#55) */ word M197_UNDEFINED +/* vector 0x38 (#56) */ word M197_UNDEFINED +/* vector 0x39 (#57) */ word M197_UNDEFINED +/* vector 0x3a (#58) */ word M197_UNDEFINED +/* vector 0x3b (#59) */ word M197_UNDEFINED +/* vector 0x3c (#60) */ word M197_UNDEFINED +/* vector 0x3d (#61) */ word M197_UNDEFINED +/* vector 0x3e (#62) */ word M197_UNDEFINED +/* vector 0x3f (#63) */ word M197_UNDEFINED +/* vector 0x40 (#64) */ word M197_UNDEFINED +/* vector 0x41 (#65) */ word M197_UNDEFINED +/* vector 0x42 (#66) */ word M197_UNDEFINED +/* vector 0x43 (#67) */ word M197_UNDEFINED +/* vector 0x44 (#68) */ word M197_UNDEFINED +/* vector 0x45 (#69) */ word M197_UNDEFINED +/* vector 0x46 (#70) */ word M197_UNDEFINED +/* vector 0x47 (#71) */ word M197_UNDEFINED +/* vector 0x48 (#72) */ word M197_UNDEFINED +/* vector 0x49 (#73) */ word M197_UNDEFINED +/* vector 0x4a (#74) */ word M197_UNDEFINED +/* vector 0x4b (#75) */ word M197_UNDEFINED +/* vector 0x4c (#76) */ word M197_UNDEFINED +/* vector 0x4d (#77) */ word M197_UNDEFINED +/* vector 0x4e (#78) */ word M197_UNDEFINED +/* vector 0x4f (#79) */ word M197_UNDEFINED +/* vector 0x50 (#80) */ word M197_UNDEFINED +/* vector 0x51 (#81) */ word M197_UNDEFINED +/* vector 0x52 (#82) */ word M197_UNDEFINED +/* vector 0x53 (#83) */ word M197_UNDEFINED +/* vector 0x54 (#84) */ word M197_UNDEFINED +/* vector 0x55 (#85) */ word M197_UNDEFINED +/* vector 0x56 (#86) */ word M197_UNDEFINED +/* vector 0x57 (#87) */ word M197_UNDEFINED +/* vector 0x58 (#88) */ word M197_UNDEFINED +/* vector 0x59 (#89) */ word M197_UNDEFINED +/* vector 0x5a (#90) */ word M197_UNDEFINED +/* vector 0x5b (#91) */ word M197_UNDEFINED +/* vector 0x5c (#92) */ word M197_UNDEFINED +/* vector 0x5d (#93) */ word M197_UNDEFINED +/* vector 0x5e (#94) */ word M197_UNDEFINED +/* vector 0x5f (#95) */ word M197_UNDEFINED +/* vector 0x60 (#96) */ word M197_UNDEFINED +/* vector 0x61 (#97) */ word M197_UNDEFINED +/* vector 0x62 (#98) */ word M197_UNDEFINED +/* vector 0x63 (#99) */ word M197_UNDEFINED +/* vector 0x64 (#100) */ word M197_UNDEFINED +/* vector 0x65 (#101) */ word M197_UNDEFINED +/* vector 0x66 (#102) */ word M197_UNDEFINED +/* vector 0x67 (#103) */ word M197_UNDEFINED +/* vector 0x68 (#104) */ word M197_UNDEFINED +/* vector 0x69 (#105) */ word M197_UNDEFINED +/* vector 0x6a (#106) */ word M197_UNDEFINED +/* vector 0x6b (#107) */ word M197_UNDEFINED +/* vector 0x6c (#108) */ word M197_UNDEFINED +/* vector 0x6d (#109) */ word M197_UNDEFINED +/* vector 0x6e (#110) */ word M197_UNDEFINED +/* vector 0x6f (#111) */ word M197_UNDEFINED +/* vector 0x70 (#112) */ word M197_UNDEFINED +/* vector 0x71 (#113) */ word M197_UNDEFINED +/* vector 0x72 (#114) */ word _m197_fp_precise_handler +/* vector 0x73 (#115) */ word M197_UNDEFINED +/* vector 0x74 (#116) */ word _m197_unimplemented_handler +/* vector 0x75 (#117) */ word M197_UNDEFINED +/* vector 0x76 (#118) */ word _m197_unimplemented_handler +/* vector 0x77 (#119) */ word M197_UNDEFINED +/* vector 0x78 (#120) */ word _m197_unimplemented_handler +/* vector 0x79 (#121) */ word M197_UNDEFINED +/* vector 0x7a (#122) */ word _m197_unimplemented_handler +/* vector 0x7b (#123) */ word M197_UNDEFINED +/* vector 0x7c (#124) */ word _m197_unimplemented_handler +/* vector 0x7d (#125) */ word M197_UNDEFINED +/* vector 0x7e (#126) */ word _m197_unimplemented_handler +/* vector 0x7f (#127) */ word M197_UNDEFINED +/* vector 0x80 (#128) */ word _m197_syscall_handler +/* vector 0x81 (#129) */ word _m197_syscall_handler +/* vector 0x82 (#130) */ word _m197_break +/* vector 0x83 (#131) */ word _m197_trace +/* vector 0x84 (#132) */ word _m197_entry #endif /* __MACHINE_EXECPTION_VECTORS2_H__ */ - diff --git a/sys/arch/mvme88k/include/intr.h b/sys/arch/mvme88k/include/intr.h index ca550ab6de9..7c936f48dc3 100644 --- a/sys/arch/mvme88k/include/intr.h +++ b/sys/arch/mvme88k/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.5 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: intr.h,v 1.6 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (C) 2000 Steve Murphree, Jr. * All rights reserved. @@ -71,8 +71,9 @@ extern int intrcnt[M88K_NIRQ]; #define IPL_SOFTNET 1 #define IPL_BIO 2 #define IPL_NET 3 +#define IPL_IMP 3 #define IPL_TTY 3 -#define IPL_IMP 4 +#define IPL_VM 3 #define IPL_CLOCK 5 #define IPL_STATCLOCK 5 #define IPL_HIGH 6 @@ -113,7 +114,7 @@ above... #define splclock() setipl(IPL_CLOCK) #define splstatclock() setipl(IPL_STATCLOCK) #define splimp() setipl(IPL_IMP) -#define splvm() setipl(IPL_IMP) +#define splvm() setipl(IPL_VM) #define splhigh() setipl(IPL_HIGH) #define splx(x) ((x) ? setipl((x)) : spl0()) diff --git a/sys/arch/mvme88k/include/locore.h b/sys/arch/mvme88k/include/locore.h index 1ac3656a9dc..317348f906e 100644 --- a/sys/arch/mvme88k/include/locore.h +++ b/sys/arch/mvme88k/include/locore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.h,v 1.12 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: locore.h,v 1.13 2001/12/16 23:49:46 miod Exp $ */ #ifndef _MACHINE_LOCORE_H_ #define _MACHINE_LOCORE_H_ @@ -40,16 +40,25 @@ int db_are_interrupts_disabled __P((void)); void fubail __P((void)); void subail __P((void)); +#if defined(MVME187) || defined(MVME188) int guarded_access __P((volatile unsigned char *address, unsigned len, u_char *vec)); +#endif + /* locore_c_routines.c */ -#ifdef M88100 +#if defined(MVME187) || defined(MVME188) void dae_print __P((unsigned *eframe)); void data_access_emulation __P((unsigned *eframe)); #endif - +#ifdef MVME188 +unsigned int safe_level __P((unsigned mask, unsigned curlevel)); +#if 0 +void block_obio_interrupt __P((unsigned mask)); +void unblock_obio_interrupt __P((unsigned mask)); +#endif +#endif unsigned spl __P((void)); unsigned getipl __P((void)); #ifdef DDB @@ -71,35 +80,32 @@ void dosoftint __P((void)); void MY_info __P((struct trapframe *f, caddr_t p, int flags, char *s)); void MY_info_done __P((struct trapframe *f, int flags)); void mvme_bootstrap __P((void)); -#ifdef MVME187 -void m187_ext_int __P((u_int v, struct m88100_saved_state *eframe)); -#endif #ifdef MVME188 void m188_reset __P((void)); void m188_ext_int __P((u_int v, struct m88100_saved_state *eframe)); -unsigned int safe_level __P((unsigned mask, unsigned curlevel)); #endif -#ifdef MVME197 -void m197_ext_int __P((u_int v, struct m88100_saved_state *eframe)); +#if defined(MVME187) || defined(MVME197) +void sbc_ext_int __P((u_int v, struct m88100_saved_state *eframe)); #endif + /* eh.S */ struct proc; void proc_do_uret __P((struct proc *)); -#ifdef M88100 +#if defined(MVME187) || defined(MVME188) void sigsys __P((void)); void sigtrap __P((void)); void stepbpt __P((void)); void userbpt __P((void)); void syscall_handler __P((void)); #endif -#ifdef M88110 -void m88110_sigsys __P((void)); -void m88110_sigtrap __P((void)); -void m88110_stepbpt __P((void)); -void m88110_userbpt __P((void)); -void m88110_syscall_handler __P((void)); +#if defined(MVME197) +void m197_sigsys __P((void)); +void m197_sigtrap __P((void)); +void m197_stepbpt __P((void)); +void m197_userbpt __P((void)); +void m197_syscall_handler __P((void)); #endif /* process.S */ diff --git a/sys/arch/mvme88k/include/m88110.h b/sys/arch/mvme88k/include/m88110.h index 7b39dbfa99f..7be6627c784 100644 --- a/sys/arch/mvme88k/include/m88110.h +++ b/sys/arch/mvme88k/include/m88110.h @@ -1,13 +1,16 @@ -/* $OpenBSD: m88110.h,v 1.9 2001/12/14 04:30:11 smurph Exp $ */ +/* $OpenBSD: m88110.h,v 1.10 2001/12/16 23:49:46 miod Exp $ */ #ifndef __MACHINE_M88110_H__ #define __MACHINE_M88110_H__ -#include <uvm/uvm_extern.h> #ifndef _LOCORE -#include <machine/mmu.h> /* batc_template_t */ +# include <machine/mmu.h> /* batc_template_t */ #endif +#include <machine/board.h> +#include <machine/cmmu.h> +#include <uvm/uvm_extern.h> + /* * 88110 CMMU definitions */ @@ -76,11 +79,6 @@ #define CMMU_DCMD_INV_SATC 0x00A /* Invalidate All Supervisor ATCs */ #define CMMU_DCMD_INV_UATC 0x00B /* Invalidate All User ATCs */ -#define CMMU_DCTL_RSVD7 0x40000 /* Reserved */ -#define CMMU_DCTL_RSVD6 0x20000 /* Reserved */ -#define CMMU_DCTL_RSVD5 0x10000 /* Reserved */ -#define CMMU_DCTL_RSVD4 0x8000 /* Reserved */ -#define CMMU_DCTL_RSVD3 0x4000 /* Reserved */ #define CMMU_DCTL_XMEM 0x2000 /* store -> load sequence */ #define CMMU_DCTL_DEN 0x1000 /* Decoupled Cache Access Enable */ #define CMMU_DCTL_FWT 0x0800 /* Force Write Through */ @@ -90,9 +88,6 @@ #define CMMU_DCTL_FRZ1 0x0080 /* Data Cache Freeze Bank 1 */ #define CMMU_DCTL_HTEN 0x0040 /* Hardware Table Search Enable */ #define CMMU_DCTL_MEN 0x0020 /* Data MMU Enable */ -#define CMMU_DCTL_RSVD2 0x0010 /* Reserved */ -#define CMMU_DCTL_ADS 0x0008 /* Allocat Disable */ -#define CMMU_DCTL_RSVD1 0x0004 /* Reserved */ #define CMMU_DCTL_SEN 0x0002 /* Data Cache Snoop Enable */ #define CMMU_DCTL_CEN 0x0001 /* Data Cache Enable */ @@ -115,205 +110,126 @@ #define CMMU_DATA 1 #define CMMU_INST 0 -/* definitions for use of the BATC */ -#define BATC_512K (0x00 << 19) -#define BATC_1M (0x01 << 19) -#define BATC_2M (0x03 << 19) -#define BATC_4M (0x07 << 19) -#define BATC_8M (0x0F << 19) -#define BATC_16M (0x1F << 19) -#define BATC_32M (0x3F << 19) -#define BATC_64M (0x7F << 19) -#define BATC_ADDR_MASK 0xFFF80000 -#define BATC_ADDR_SHIFT 13 -#define BATC_LBA_SHIFT 19 -#define BATC_PBA_SHIFT 6 -#define BATC_SU 0x20 -#define BATC_WT 0x10 -#define BATC_G 0x08 -#define BATC_CI 0x04 -#define BATC_WP 0x02 -#define BATC_V 0x01 - -#define CLINE_MASK 0x1F -#define CLINE_SIZE (8 * 32) - #ifndef _LOCORE - /* - * Prototypes from "mvme88k/mvme88k/m88110_cmmu.c" + * Prototypes from "mvme88k/mvme88k/m197_cmmu.c" */ -void m88110_show_apr __P((unsigned)); -void m88110_show_sctr __P((unsigned)); -void m88110_setup_board_config __P((void)); -void m88110_setup_cmmu_config __P((void)); -void m88110_cmmu_dump_config __P((void)); -void m88110_cpu_configuration_print __P((int)); -void m88110_cmmu_shutdown_now __P((void)); -void m88110_cmmu_parity_enable __P((void)); -unsigned m88110_cmmu_cpu_number __P((void)); -unsigned m88110_cmmu_get_idr __P((unsigned)); -void m88110_cmmu_set_sapr __P((unsigned)); -void m88110_cmmu_remote_set_sapr __P((unsigned, unsigned)); -void m88110_cmmu_set_uapr __P((unsigned)); -void m88110_cmmu_set_batc_entry __P((unsigned, unsigned, unsigned, unsigned)); -void m88110_cmmu_set_pair_batc_entry __P((unsigned, unsigned, unsigned)); -void m88110_cmmu_flush_remote_tlb __P((unsigned, unsigned, vm_offset_t, int)); -void m88110_cmmu_flush_tlb __P((unsigned, vm_offset_t, int)); -void m88110_cmmu_pmap_activate __P((unsigned, unsigned, - batc_template_t i_batc[BATC_MAX], - batc_template_t d_batc[BATC_MAX])); -void m88110_cmmu_flush_remote_cache __P((int, vm_offset_t, int)); -void m88110_cmmu_flush_cache __P((vm_offset_t, int)); -void m88110_cmmu_flush_remote_inst_cache __P((int, vm_offset_t, int)); -void m88110_cmmu_flush_inst_cache __P((vm_offset_t, int)); -void m88110_cmmu_flush_remote_data_cache __P((int, vm_offset_t, int)); -void m88110_cmmu_flush_data_cache __P((vm_offset_t, int)); -void m88110_dma_cachectl __P((vm_offset_t, int, int)); -#if DDB -unsigned m88110_cmmu_get_by_mode __P((int, int)); -void m88110_cmmu_show_translation __P((unsigned, unsigned, unsigned, int)); -void m88110_cmmu_cache_state __P((unsigned, unsigned)); -void m88110_show_cmmu_info __P((unsigned)); -#endif +#ifdef DDB +void m197_cmmu_show_translation(unsigned, unsigned, unsigned, int); +void m197_cmmu_cache_state(unsigned, unsigned); +void m197_show_cmmu_info(unsigned); +#endif -void m88110_cmmu_init __P((void)); -int m88110_table_search __P((pmap_t, vm_offset_t, int, int, int)); +#ifdef CMMU_DEBUG +void m197_show_apr(unsigned value); +void m197_show_sctr(unsigned value); +#endif -void set_icmd __P((unsigned value)); -void set_ictl __P((unsigned value)); -void set_isar __P((unsigned value)); -void set_isap __P((unsigned value)); -void set_iuap __P((unsigned value)); -void set_iir __P((unsigned value)); -void set_ibp __P((unsigned value)); -void set_ippu __P((unsigned value)); -void set_ippl __P((unsigned value)); -void set_isr __P((unsigned value)); -void set_ilar __P((unsigned value)); -void set_ipar __P((unsigned value)); -void set_dcmd __P((unsigned value)); -void set_dctl __P((unsigned value)); -void set_dsar __P((unsigned value)); -void set_dsap __P((unsigned value)); -void set_duap __P((unsigned value)); -void set_dir __P((unsigned value)); -void set_dbp __P((unsigned value)); -void set_dppu __P((unsigned value)); -void set_dppl __P((unsigned value)); -void set_dsr __P((unsigned value)); -void set_dlar __P((unsigned value)); -void set_dpar __P((unsigned value)); +unsigned m197_cmmu_cpu_number(void); +unsigned m197_cmmu_remote_get(unsigned cpu, unsigned r, unsigned data); +unsigned m197_cmmu_get_idr(unsigned data); +void m197_cmmu_init(void); +void m197_cmmu_shutdown_now(void); +void m197_cmmu_parity_enable(void); +void m197_setup_board_config(void); +void m197_setup_cmmu_config(void); +void m197_cmmu_dump_config(void); +unsigned m197_cmmu_get_by_mode(int cpu, int mode); +void m197_cpu_configuration_print(int master); +void m197_dma_cachectl(vm_offset_t va, int size, int op); +void m197_cmmu_remote_set(unsigned cpu, unsigned r, unsigned data, unsigned x); +void m197_cmmu_set_sapr(unsigned ap); +void m197_cmmu_remote_set_sapr(unsigned cpu, unsigned ap); +void m197_cmmu_set_uapr(unsigned ap); +void m197_cmmu_flush_tlb(unsigned kernel, vm_offset_t vaddr, int size); +void m197_cmmu_flush_remote_cache(int cpu, vm_offset_t physaddr, int size); +void m197_cmmu_flush_cache(vm_offset_t physaddr, int size); +void m197_cmmu_flush_remote_inst_cache(int cpu, vm_offset_t physaddr, int size); +void m197_cmmu_flush_inst_cache(vm_offset_t physaddr, int size); +void m197_cmmu_flush_remote_data_cache(int cpu, vm_offset_t physaddr, int size); +void m197_cmmu_flush_data_cache(vm_offset_t physaddr, int size); + +void m197_cmmu_pmap_activate( + unsigned cpu, + unsigned uapr, + batc_template_t i_batc[BATC_MAX], + batc_template_t d_batc[BATC_MAX]); + +void m197_cmmu_flush_remote_tlb( + unsigned cpu, + unsigned kernel, + vm_offset_t vaddr, + int size); + +void m197_cmmu_set_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned data, /* 1 = data, 0 = instruction */ + unsigned value); /* the value to stuff into the batc */ + +void m197_cmmu_set_pair_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned value); /* the value to stuff into the batc */ + +int m197_table_search( + pmap_t map, + vm_offset_t virt, + int write, + int user, int data); + +void set_icmd (unsigned value); +void set_ictl (unsigned value); +void set_isar (unsigned value); +void set_isap (unsigned value); +void set_iuap (unsigned value); +void set_iir (unsigned value); +void set_ibp (unsigned value); +void set_ippu (unsigned value); +void set_ippl (unsigned value); +void set_isr (unsigned value); +void set_ilar (unsigned value); +void set_ipar (unsigned value); +void set_dcmd (unsigned value); +void set_dctl (unsigned value); +void set_dsar (unsigned value); +void set_dsap (unsigned value); +void set_duap (unsigned value); +void set_dir (unsigned value); +void set_dbp (unsigned value); +void set_dppu (unsigned value); +void set_dppl (unsigned value); +void set_dsr (unsigned value); +void set_dlar (unsigned value); +void set_dpar (unsigned value); /* get routines */ -unsigned get_icmd __P((void)); -unsigned get_ictl __P((void)); -unsigned get_isar __P((void)); -unsigned get_isap __P((void)); -unsigned get_iuap __P((void)); -unsigned get_iir __P((void)); -unsigned get_ibp __P((void)); -unsigned get_ippu __P((void)); -unsigned get_ippl __P((void)); -unsigned get_isr __P((void)); -unsigned get_ilar __P((void)); -unsigned get_ipar __P((void)); -unsigned get_dcmd __P((void)); -unsigned get_dctl __P((void)); -unsigned get_dsar __P((void)); -unsigned get_dsap __P((void)); -unsigned get_duap __P((void)); -unsigned get_dir __P((void)); -unsigned get_dbp __P((void)); -unsigned get_dppu __P((void)); -unsigned get_dppl __P((void)); -unsigned get_dsr __P((void)); -unsigned get_dlar __P((void)); -unsigned get_dpar __P((void)); - -/* Cache inlines */ - -#define line_addr(x) (vm_offset_t)((x) & ~CLINE_MASK) -#define page_addr(x) (vm_offset_t)((x) & ~PAGE_MASK) - -static __inline__ void mc88110_flush_data_line(vm_offset_t x) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(line_addr(x)); - set_dcmd(CMMU_DCMD_FLUSH_LINE); - } -} - -static __inline__ void mc88110_flush_data_page(vm_offset_t x) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(page_addr(x)); - set_dcmd(CMMU_DCMD_FLUSH_PG); - } -} - -static __inline__ void mc88110_flush_data(void) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(0x00); - set_dcmd(CMMU_DCMD_FLUSH_ALL); - } -} - -static __inline__ void mc88110_inval_data_line(vm_offset_t x) -{ - set_dsar(line_addr(x)); - set_dcmd(CMMU_DCMD_INV_LINE); -} - -static __inline__ void mc88110_inval_data(void) -{ - set_dsar(0x00); - set_dcmd(CMMU_DCMD_INV_ALL); -} - -static __inline__ void mc88110_sync_data_line(vm_offset_t x) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(line_addr(x)); - set_dcmd(CMMU_DCMD_FLUSH_LINE_INV); - } -} - -static __inline__ void mc88110_sync_data_page(vm_offset_t x) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(page_addr(x)); - set_dcmd(CMMU_DCMD_FLUSH_PG_INV); - } -} - -static __inline__ void mc88110_sync_data(void) -{ - unsigned dctl = get_dctl(); - if (dctl & CMMU_DCTL_CEN){ - set_dsar(0x00); - set_dcmd(CMMU_DCMD_FLUSH_ALL_INV); - } -} - -static __inline__ void mc88110_inval_inst_line(vm_offset_t x) -{ - set_isar(line_addr(x)); - set_icmd(CMMU_ICMD_INV_LINE); -} - -static __inline__ void mc88110_inval_inst(void) -{ - set_isar(0x00); - set_icmd(CMMU_ICMD_INV_ITIC); -} +unsigned get_icmd (void); +unsigned get_ictl (void); +unsigned get_isar (void); +unsigned get_isap (void); +unsigned get_iuap (void); +unsigned get_iir (void); +unsigned get_ibp (void); +unsigned get_ippu (void); +unsigned get_ippl (void); +unsigned get_isr (void); +unsigned get_ilar (void); +unsigned get_ipar (void); +unsigned get_dcmd (void); +unsigned get_dctl (void); +unsigned get_dsar (void); +unsigned get_dsap (void); +unsigned get_duap (void); +unsigned get_dir (void); +unsigned get_dbp (void); +unsigned get_dppu (void); +unsigned get_dppl (void); +unsigned get_dsr (void); +unsigned get_dlar (void); +unsigned get_dpar (void); #endif /* _LOCORE */ + #endif /* __MACHINE_M88110_H__ */ diff --git a/sys/arch/mvme88k/include/m8820x.h b/sys/arch/mvme88k/include/m882xx.h index 70ada9ee2e4..f97c7758582 100644 --- a/sys/arch/mvme88k/include/m8820x.h +++ b/sys/arch/mvme88k/include/m882xx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.h,v 1.2 2001/12/14 04:30:11 smurph Exp $ */ +/* $OpenBSD: m882xx.h,v 1.10 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -30,8 +30,15 @@ */ -#ifndef __MACHINE_M8820X_H__ -#define __MACHINE_M8820X_H__ +#ifndef __MACHINE_M882XX_H__ +#define __MACHINE_M882XX_H__ + +#ifndef _LOCORE +# include <machine/mmu.h> /* batc_template_t */ +#endif + +#include <machine/board.h> +#include <machine/cmmu.h> /* * 88200 CMMU definitions @@ -126,43 +133,65 @@ #ifndef _LOCORE /* - * Prototypes from "mvme88k/mvme88k/m8820x.c" + * Prototypes from "mvme88k/mvme88k/m18x_cmmu.c" */ -void m8820x_show_apr __P((unsigned)); -void m8820x_setup_board_config __P((void)); -void m8820x_setup_cmmu_config __P((void)); -void m8820x_cmmu_dump_config __P((void)); -void m8820x_cpu_configuration_print __P((int)); -void m8820x_cmmu_shutdown_now __P((void)); -void m8820x_cmmu_parity_enable __P((void)); -unsigned m8820x_cmmu_cpu_number __P((void)); -unsigned m8820x_cmmu_get_idr __P((unsigned)); -void m8820x_cmmu_set_sapr __P((unsigned)); -void m8820x_cmmu_remote_set_sapr __P((unsigned, unsigned)); -void m8820x_cmmu_set_uapr __P((unsigned)); -void m8820x_cmmu_set_batc_entry __P((unsigned, unsigned, unsigned, unsigned)); -void m8820x_cmmu_set_pair_batc_entry __P((unsigned, unsigned, unsigned)); -void m8820x_cmmu_flush_remote_tlb __P((unsigned, unsigned, vm_offset_t, int)); -void m8820x_cmmu_flush_tlb __P((unsigned, vm_offset_t, int)); -void m8820x_cmmu_pmap_activate __P((unsigned, unsigned, - batc_template_t i_batc[BATC_MAX], - batc_template_t d_batc[BATC_MAX])); -void m8820x_cmmu_flush_remote_cache __P((int, vm_offset_t, int)); -void m8820x_cmmu_flush_cache __P((vm_offset_t, int)); -void m8820x_cmmu_flush_remote_inst_cache __P((int, vm_offset_t, int)); -void m8820x_cmmu_flush_inst_cache __P((vm_offset_t, int)); -void m8820x_cmmu_flush_remote_data_cache __P((int, vm_offset_t, int)); -void m8820x_cmmu_flush_data_cache __P((vm_offset_t, int)); -void m8820x_dma_cachectl __P((vm_offset_t, int, int)); - -#if DDB -unsigned m8820x_cmmu_get_by_mode __P((int, int)); -void m8820x_cmmu_show_translation __P((unsigned, unsigned, unsigned, int)); -void m8820x_cmmu_cache_state __P((unsigned, unsigned)); -void m8820x_show_cmmu_info __P((unsigned)); +#ifdef DDB +void m18x_cmmu_show_translation(unsigned, unsigned, unsigned, int); +void m18x_cmmu_cache_state(unsigned, unsigned); +void m18x_show_cmmu_info(unsigned); #endif -void m8820x_cmmu_init __P((void)); +#ifdef CMMU_DEBUG +void m18x_show_apr(unsigned value); +void m18x_show_sctr(unsigned value); +#endif + +unsigned m18x_cmmu_cpu_number(void); +unsigned m18x_cmmu_remote_get(unsigned cpu, unsigned r, unsigned data); +unsigned m18x_cmmu_get_idr(unsigned data); +void m18x_cmmu_init(void); +void m18x_cmmu_shutdown_now(void); +void m18x_cmmu_parity_enable(void); +void m18x_setup_board_config(void); +void m18x_setup_cmmu_config(void); +void m18x_cmmu_dump_config(void); +unsigned m18x_cmmu_get_by_mode(int cpu, int mode); +void m18x_cpu_configuration_print(int master); +void m18x_dma_cachectl(vm_offset_t va, int size, int op); +void m18x_cmmu_remote_set(unsigned cpu, unsigned r, unsigned data, unsigned x); +void m18x_cmmu_set_sapr(unsigned ap); +void m18x_cmmu_remote_set_sapr(unsigned cpu, unsigned ap); +void m18x_cmmu_set_uapr(unsigned ap); +void m18x_cmmu_flush_tlb(unsigned kernel, vm_offset_t vaddr, int size); +void m18x_cmmu_flush_remote_cache(int cpu, vm_offset_t physaddr, int size); +void m18x_cmmu_flush_cache(vm_offset_t physaddr, int size); +void m18x_cmmu_flush_remote_inst_cache(int cpu, vm_offset_t physaddr, int size); +void m18x_cmmu_flush_inst_cache(vm_offset_t physaddr, int size); +void m18x_cmmu_flush_remote_data_cache(int cpu, vm_offset_t physaddr, int size); +void m18x_cmmu_flush_data_cache(vm_offset_t physaddr, int size); + +void m18x_cmmu_pmap_activate( + unsigned cpu, + unsigned uapr, + batc_template_t i_batc[BATC_MAX], + batc_template_t d_batc[BATC_MAX]); + +void m18x_cmmu_flush_remote_tlb( + unsigned cpu, + unsigned kernel, + vm_offset_t vaddr, + int size); + +void m18x_cmmu_set_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned data, /* 1 = data, 0 = instruction */ + unsigned value); /* the value to stuff into the batc */ + +void m18x_cmmu_set_pair_batc_entry( + unsigned cpu, + unsigned entry_no, + unsigned value); /* the value to stuff into the batc */ #endif /* _LOCORE */ @@ -216,4 +245,4 @@ void m8820x_cmmu_init __P((void)); #define NBSG (4*1024*1024) /* segment size */ -#endif /* __MACHINE_M8820X_H__ */ +#endif /* __MACHINE_M882XX_H__ */ diff --git a/sys/arch/mvme88k/include/m88410.h b/sys/arch/mvme88k/include/m88410.h deleted file mode 100644 index 9857c0f8f39..00000000000 --- a/sys/arch/mvme88k/include/m88410.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $OpenBSD: m88410.h,v 1.1 2001/12/13 08:55:51 smurph Exp $ */ - -#ifndef __MACHINE_M88410_H__ -#define __MACHINE_M88410_H__ - -/* - * mc88410 External Cache Controller definitions - * This is only available on MVME197DP/SP models. - */ - -#ifndef _LOCORE - -#include <machine/asm_macro.h> -#include <machine/psl.h> -#ifdef _KERNEL -#include <mvme88k/dev/busswreg.h> -#endif - -#define XCC_NOP "0x0" -#define XCC_FLUSH_PAGE "0x1" -#define XCC_FLUSH_ALL "0x2" -#define XCC_INVAL_ALL "0x3" -#define XCC_ADDR 0xFF800000 - -static __inline__ void mc88410_flush_page(vm_offset_t physaddr) -{ - vm_offset_t xccaddr = XCC_ADDR | (physaddr >> PGSHIFT); - m88k_psr_type psr; - struct bussw_reg *bs = (struct bussw_reg *)BS_BASE; - u_short bs_gcsr = bs->bs_gcsr; - u_short bs_romcr = bs->bs_romcr; - - psr = get_psr(); - /* mask misaligned exceptions */ - set_psr(psr | PSR_MXM); - /* clear WEN0 and WEN1 in ROMCR (disables writes to FLASH) */ - bs->bs_romcr &= ~(BS_ROMCR_WEN0 | BS_ROMCR_WEN0) ; - /* set XCC bit in GCSR (0xFF8xxxxx now decodes to mc88410) */ - bs->bs_gcsr |= BS_GCSR_XCC; - - /* load the value of upper32 into r2 */ - __asm__ __volatile__("or r2,r0," XCC_FLUSH_PAGE); - /* load the value of lower32 into r3 (always 0) */ - __asm__ __volatile__("or r3,r0,r0"); - /* load the value of xccaddr into r4 */ - __asm__ __volatile__("or.u r5,r0,hi16(%0)" : : "r" (xccaddr)); - __asm__ __volatile__("ld r4,r5,lo16(%0)" : : "r" (xccaddr)); - /* make the double write. bang! */ - __asm__ __volatile__("st.d r2,r4,0"); - - /* spin until the operation starts */ - while (!bs->bs_xccr & BS_XCC_FBSY) - ; - - /* restore PSR and friends */ - set_psr(psr); - flush_pipeline(); - bs->bs_gcsr = bs_gcsr; - bs->bs_romcr = bs_romcr; -} - -static __inline__ void mc88410_flush(void) -{ - m88k_psr_type psr; - struct bussw_reg *bs = (struct bussw_reg *)BS_BASE; - u_short bs_gcsr = bs->bs_gcsr; - u_short bs_romcr = bs->bs_romcr; - - psr = get_psr(); - /* mask misaligned exceptions */ - set_psr(psr | PSR_MXM); - /* clear WEN0 and WEN1 in ROMCR (disables writes to FLASH) */ - bs->bs_romcr &= ~(BS_ROMCR_WEN0 | BS_ROMCR_WEN0) ; - /* set XCC bit in GCSR (0xFF8xxxxx now decodes to mc88410) */ - bs->bs_gcsr |= BS_GCSR_XCC; - - /* load the value of upper32 into r2 */ - __asm__ __volatile__("or r2,r0," XCC_FLUSH_ALL); - /* load the value of lower32 into r3 (always 0) */ - __asm__ __volatile__("or r3,r0,r0"); - /* load the value of xccaddr into r4 */ - __asm__ __volatile__("or.u r5,r0,hi16(0xFF800000)"); - __asm__ __volatile__("or r4,r5,r0"); /* r4 is now 0xFF800000 */ - /* make the double write. bang! */ - __asm__ __volatile__("st.d r2,r4,0"); - - /* spin until the operation starts */ - while (!bs->bs_xccr & BS_XCC_FBSY) - ; - - /* restore PSR and friends */ - set_psr(psr); - flush_pipeline(); - bs->bs_gcsr = bs_gcsr; - bs->bs_romcr = bs_romcr; -} - -static __inline__ void mc88410_inval(void) -{ - m88k_psr_type psr; - struct bussw_reg *bs = (struct bussw_reg *)BS_BASE; - u_short bs_gcsr = bs->bs_gcsr; - u_short bs_romcr = bs->bs_romcr; - - psr = get_psr(); - /* mask misaligned exceptions */ - set_psr(psr | PSR_MXM); - /* clear WEN0 and WEN1 in ROMCR (disables writes to FLASH) */ - bs->bs_romcr &= ~(BS_ROMCR_WEN0 | BS_ROMCR_WEN0) ; - /* set XCC bit in GCSR (0xFF8xxxxx now decodes to mc88410) */ - bs->bs_gcsr |= BS_GCSR_XCC; - - /* load the value of upper32 into r2 */ - __asm__ __volatile__("or r2,r0," XCC_INVAL_ALL); - /* load the value of lower32 into r3 (always 0) */ - __asm__ __volatile__("or r3,r0,r0"); - /* load the value of xccaddr into r4 */ - __asm__ __volatile__("or.u r5,r0,hi16(0xFF800000)"); - __asm__ __volatile__("or r4,r5,r0"); /* r4 is now 0xFF800000 */ - /* make the double write. bang! */ - __asm__ __volatile__("st.d r2,r4,0"); - - /* spin until the operation starts */ - while (!bs->bs_xccr & BS_XCC_FBSY) - ; - - /* restore PSR and friends */ - set_psr(psr); - flush_pipeline(); - bs->bs_gcsr = bs_gcsr; - bs->bs_romcr = bs_romcr; -} - -static __inline__ void mc88410_sync(void) -{ - mc88410_flush(); - mc88410_inval(); -} - -#endif /* _LOCORE */ - -#endif __MACHINE_M88410_H__ diff --git a/sys/arch/mvme88k/include/mmu.h b/sys/arch/mvme88k/include/mmu.h index dfa6bb9a219..82e9e5ffdef 100644 --- a/sys/arch/mvme88k/include/mmu.h +++ b/sys/arch/mvme88k/include/mmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mmu.h,v 1.13 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: mmu.h,v 1.14 2001/12/16 23:49:46 miod Exp $ */ #ifndef __MACHINE_MMU_H__ #define __MACHINE_MMU_H__ @@ -60,7 +60,7 @@ typedef union sdt_entry_template { typedef struct pt_entry { unsigned long pfn:20, /* page frame address */ - rsvA:1, /* reserved (U1 on mc88110) */ + rsvA:1, /* reserved */ wired:1, /* wired bit <<software>> */ wt:1, /* writethrough (cache control) */ sup:1, /* supervisor protection */ @@ -70,16 +70,10 @@ typedef struct pt_entry { modified:1, /* modified */ pg_used:1, /* used (referenced) */ prot:1, /* write protect */ - dtype:2; /* descriptor type (bit 2 only on mc88110) */ + rsvC:1, /* reserved */ + dtype:1; /* valid */ } pt_entry_t; -/* mc88110 indirect descriptors */ -typedef struct pt_ind_entry { - unsigned long - pda:30, /* page descriptor address */ - dtype:2; /* valid */ -} pt_ind_entry_t; - typedef union pte_template { pt_entry_t pte; unsigned long bits; @@ -143,8 +137,6 @@ typedef union batc_template { */ #define DT_INVALID 0 #define DT_VALID 1 -#define DT_IND_MASKED 2 -#define DT_IND_UMASKED 3 /* * Number of entries in a page table. @@ -251,6 +243,7 @@ extern u_int kvtop __P((vm_offset_t)); #define DMA_CACHE_SYNC 0x1 #define DMA_CACHE_SYNC_INVAL 0x2 #define DMA_CACHE_INV 0x3 +extern void dma_cachectl(vm_offset_t, int, int); #endif /* __MACHINE_MMU_H__ */ diff --git a/sys/arch/mvme88k/include/mvme187.h b/sys/arch/mvme88k/include/mvme187.h deleted file mode 100644 index fa03d4bf01d..00000000000 --- a/sys/arch/mvme88k/include/mvme187.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $OpenBSD: mvme187.h,v 1.2 2001/12/14 04:30:11 smurph Exp $ */ -/* - * Copyright (c) 1996 Nivas Madhur - * Copyright (c) 1999 Steve Murphree, Jr. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Nivas Madhur. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -/* - * Mach Operating System - * Copyright (c) 1991 Carnegie Mellon University - * Copyright (c) 1991 OMRON Corporation - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - */ -#ifndef __MACHINE_MVME187_H__ -#define __MACHINE_MVME187_H__ -/* - * VME187 CPU board constants - derived from Luna88k - * This file is include from <machine/board.h> - */ - -/* - * Something to put append a 'U' to a long constant if it's C so that - * it'll be unsigned in both ANSI and traditional. - */ -#ifndef UDEFINED -#if defined(_LOCORE) -# define U(num) num -#else -# if defined(__STDC__) -# define U(num) num ## U -# else -# define U(num) num/**/U -# endif -#endif -#endif - -#define SBC_CMMU_I U(0xFFF77000) /* Single Board Computer code CMMU */ -#define SBC_CMMU_D U(0xFFF7F000) /* Single Board Computer data CMMU */ - -#define M187_ILEVEL U(0xFFF4203E) /* interrupt priority level */ -#define M187_IMASK U(0xFFF4203F) /* interrupt mask level */ -#define M187_ISRC U(0x00000000) /* interrupt mask src (NULL) */ -#define M187_IACK U(0xFFFE0000) /* interrupt ACK base */ - -#endif __MACHINE_MVME187_H__ diff --git a/sys/arch/mvme88k/include/mvme188.h b/sys/arch/mvme88k/include/mvme188.h index 973bffe825a..e5e2aab757d 100644 --- a/sys/arch/mvme88k/include/mvme188.h +++ b/sys/arch/mvme88k/include/mvme188.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mvme188.h,v 1.8 2001/12/14 04:30:11 smurph Exp $ */ +/* $OpenBSD: mvme188.h,v 1.9 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -62,14 +62,6 @@ #endif #endif -#define VME_CMMU_I0 U(0xFFF7E000) /* MVME188 code CMMU 0 */ -#define VME_CMMU_I1 U(0xFFF7D000) /* MVME188 code CMMU 1 */ -#define VME_CMMU_I2 U(0xFFF7B000) /* MVME188 code CMMU 2 */ -#define VME_CMMU_I3 U(0xFFF77000) /* MVME188 code CMMU 3 */ -#define VME_CMMU_D0 U(0xFFF6F000) /* MVME188 data CMMU 0 */ -#define VME_CMMU_D1 U(0xFFF5F000) /* MVME188 data CMMU 1 */ -#define VME_CMMU_D2 U(0xFFF3F000) /* MVME188 data CMMU 2 */ -#define VME_CMMU_D3 U(0xFFF7F000) /* MVME188 data CMMU 3 */ #define MVME188_EPROM U(0xFFC00000) #define MVME188_EPROM_SIZE U(0x00080000) diff --git a/sys/arch/mvme88k/include/mvme197.h b/sys/arch/mvme88k/include/mvme197.h deleted file mode 100644 index dd98facbde8..00000000000 --- a/sys/arch/mvme88k/include/mvme197.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $OpenBSD: mvme197.h,v 1.1 2001/12/13 08:55:51 smurph Exp $ */ -/* - * Copyright (c) 1996 Nivas Madhur - * Copyright (c) 1999 Steve Murphree, Jr. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Nivas Madhur. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -/* - * Mach Operating System - * Copyright (c) 1991 Carnegie Mellon University - * Copyright (c) 1991 OMRON Corporation - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - */ -#ifndef __MACHINE_MVME197_H__ -#define __MACHINE_MVME197_H__ -/* - * VME187 CPU board constants - derived from Luna88k - * This file is include from <machine/board.h> - */ - -/* - * Something to put append a 'U' to a long constant if it's C so that - * it'll be unsigned in both ANSI and traditional. - */ -#ifndef UDEFINED -#if defined(_LOCORE) -# define U(num) num -#else -# if defined(__STDC__) -# define U(num) num ## U -# else -# define U(num) num/**/U -# endif -#endif -#endif - -#define M197_ILEVEL U(0xFFF00064) /* interrupt priority level */ -#define M197_IMASK U(0xFFF00065) /* interrupt mask level */ -#define M197_ISRC U(0xFFF0006F) /* interrupt SRC */ -#define M197_IACK U(0xFFF00100) /* interrupt ACK base */ - -#endif __MACHINE_MVME197_H__ diff --git a/sys/arch/mvme88k/include/mvme1x7.h b/sys/arch/mvme88k/include/mvme1x7.h index 7a131177bac..c74499204f7 100644 --- a/sys/arch/mvme88k/include/mvme1x7.h +++ b/sys/arch/mvme88k/include/mvme1x7.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mvme1x7.h,v 1.7 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: mvme1x7.h,v 1.8 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1999 Steve Murphree, Jr. @@ -79,6 +79,7 @@ #define LOCAL_IO_DEVS U(0xFFF00000) /* local IO devices */ +#define PCC2_ADDR U(0xFFF42000) /* PCCchip2 Regs */ #define UTIL_ADDR U(0xFFC02000) /* PCCchip2 Regs */ #define MEM_CTLR U(0xFFF43000) /* MEMC040 mem controller */ #define SCC_ADDR U(0xFFF45000) /* Cirrus Chip */ @@ -96,5 +97,7 @@ #define TOD_CAL_MON U(0xFFFC1FFE) /* months */ #define TOD_CAL_YEAR U(0xFFFC1FFF) /* years */ -#endif __MACHINE_MVME1X7_H__ +#define M187_IACK U(0xFFFE0000) +#define M197_IACK U(0xFFF00100) +#endif /* __MACHINE_MVME1X7_H__ */ diff --git a/sys/arch/mvme88k/include/param.h b/sys/arch/mvme88k/include/param.h index d666d83b04f..f5349e16a24 100644 --- a/sys/arch/mvme88k/include/param.h +++ b/sys/arch/mvme88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.24 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: param.h,v 1.25 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1988 University of Utah. @@ -173,30 +173,16 @@ extern int delay __P((int)); #define DELAY(x) delay(x) extern int cputyp; -extern int brdtyp; extern int cpumod; #endif /* - * Values for the brdtyp variable. - */ -#define BRD_187 0x187 -#define BRD_188 0x188 -#define BRD_197 0x197 -#define BRD_8120 0x8120 - -/* * Values for the cputyp variable. */ -#define CPU_88100 0x100 -#define CPU_88110 0x110 - -/* - * Values for the cpumod variable. - */ -#define MOD_LE 0x01 -#define MOD_SP 0x02 -#define MOD_DP 0x03 +#define CPU_187 0x187 +#define CPU_188 0x188 +#define CPU_197 0x197 +#define CPU_8120 0x8120 #endif /* !_MACHINE_PARAM_H_ */ diff --git a/sys/arch/mvme88k/include/pmap.h b/sys/arch/mvme88k/include/pmap.h index c4d8dc9542f..0e19df740e9 100644 --- a/sys/arch/mvme88k/include/pmap.h +++ b/sys/arch/mvme88k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.21 2001/12/12 19:33:38 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.22 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -70,8 +70,9 @@ extern pmap_t kernel_pmap; extern struct pmap kernel_pmap_store; extern caddr_t vmmap; -#define pmap_kernel() (&kernel_pmap_store) -#define pmap_resident_count(pmap) ((pmap)->stats.resident_count) +#define pmap_kernel() (&kernel_pmap_store) +#define pmap_resident_count(pmap) ((pmap)->stats.resident_count) +/* Used in builtin/device_pager.c */ #define pmap_phys_address(frame) ((vm_offset_t) (ptoa(frame))) #define pmap_update(pmap) /* nothing (yet) */ @@ -79,9 +80,8 @@ extern caddr_t vmmap; #define PMAP_ACTIVATE(proc) pmap_activate(proc) #define PMAP_DEACTIVATE(proc) pmap_deactivate(proc) #define PMAP_CONTEXT(pmap, thread) - /* - * Modes used when calling pmap_cache_flush(). + * Modes used when calling pmap_cache_fulsh(). */ #define FLUSH_CACHE 0 #define FLUSH_CODE_CACHE 1 @@ -90,10 +90,73 @@ extern caddr_t vmmap; #define FLUSH_LOCAL_CODE_CACHE 4 #define FLUSH_LOCAL_DATA_CACHE 5 -void pmap_bootstrap __P((vm_offset_t, vm_offset_t *, vm_offset_t *, - vm_offset_t *, vm_offset_t *)); -void pmap_cache_ctrl __P((pmap_t, vm_offset_t, vm_offset_t, unsigned)); - +/**************************************************************************/ +/*** Prototypes for public functions defined in pmap.c ********************/ +/**************************************************************************/ + +vm_offset_t pmap_map( + vm_offset_t virt, + vm_offset_t start, + vm_offset_t end, + vm_prot_t prot); + +vm_offset_t pmap_map_batc( + vm_offset_t virt, + vm_offset_t start, + vm_offset_t end, + vm_prot_t prot, + unsigned cmode); + +void pmap_bootstrap( + vm_offset_t load_start, /* IN */ + vm_offset_t *phys_start, /* IN/OUT */ + vm_offset_t *phys_end, /* IN */ + vm_offset_t *virt_start, /* OUT */ + vm_offset_t *virt_end); /* OUT */ + +pt_entry_t *pmap_pte(pmap_t map, vm_offset_t virt); +void pmap_cache_ctrl(pmap_t pmap, vm_offset_t s, vm_offset_t e, unsigned mode); +void pmap_zero_page(vm_offset_t phys); +void pmap_remove_all(vm_offset_t phys); +vm_offset_t pmap_extract_unlocked(pmap_t pmap, vm_offset_t va); +void copy_to_phys(vm_offset_t srcva, vm_offset_t dstpa, int bytecount); +void copy_from_phys(vm_offset_t srcpa, vm_offset_t dstva, int bytecount); +void pmap_redzone(pmap_t pmap, vm_offset_t va); +void icache_flush(vm_offset_t pa); +void pmap_dcache_flush(pmap_t pmap, vm_offset_t va); +void pmap_cache_flush(pmap_t pmap, vm_offset_t virt, int bytes, int mode); +void pmap_print (pmap_t pmap); +void pmap_print_trace (pmap_t pmap, vm_offset_t va, boolean_t long_format); + +#if 0 +#ifdef OMRON_PMAP + void pmap_set_batc( + pmap_t pmap, + boolean_t data, + int i, + vm_offset_t va, + vm_offset_t pa, + boolean_t super, + boolean_t wt, + boolean_t global, + boolean_t ci, + boolean_t wp, + boolean_t valid); + + void use_batc( + task_t task, + boolean_t data, /* for data-cmmu ? */ + int i, /* batc number */ + vm_offset_t va, /* virtual address */ + vm_offset_t pa, /* physical address */ + boolean_t s, /* for super-mode ? */ + boolean_t wt, /* is writethrough */ + boolean_t g, /* is global ? */ + boolean_t ci, /* is cache inhibited ? */ + boolean_t wp, /* is write-protected ? */ + boolean_t v); /* is valid ? */ +#endif +#endif /* 0 */ #endif /* _KERNEL */ -#endif /* _MACHINE_PMAP_H_ */ +#endif /* endif _MACHINE_PMAP_H_ */ diff --git a/sys/arch/mvme88k/include/psl.h b/sys/arch/mvme88k/include/psl.h index 46220d9fab0..76dbc0a12fe 100644 --- a/sys/arch/mvme88k/include/psl.h +++ b/sys/arch/mvme88k/include/psl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psl.h,v 1.10 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: psl.h,v 1.11 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -59,16 +59,11 @@ /* * processor status register */ - #define PSR_MODE 0x80000000U /* supervisor/user mode */ #define PSR_BO 0x40000000U /* byte-ordering 0:big 1:little */ -#define PSR_SER 0x20000000U /* 88110 serial mode */ +#define PSR_SER 0x20000000U /* serial mode */ #define PSR_C 0x10000000U /* carry */ -#define PSR_SGN 0x04000000U /* 88110 Signed Immediate mode */ -#define PSR_SRM 0x02000000U /* 88110 Serialize Memory */ -#define PSR_TRACE 0x00800000U /* 88110 hardware trace */ -#define PSR_SFD 0x000003E0U /* SFU disable */ -#define PSR_SFD2 0x00000010U /* 88110 SFU2 (Graphics) disable */ +#define PSR_SFD 0x000003F0U /* SFU disable */ #define PSR_SFD1 0x00000008U /* SFU1 (FPU) disable */ #define PSR_MXM 0x00000004U /* misaligned access enable */ #define PSR_IND 0x00000002U /* interrupt disable */ @@ -87,16 +82,10 @@ struct psr { unsigned psr_mode: 1, psr_bo : 1, - psr_ser : 1, /* mc88110 */ + psr_ser : 1, psr_c : 1, - : 1, - psr_sgn : 1, /* mc88110 */ - psr_srm : 1, /* mc88110 */ - : 1, - psr_trc : 1, /* mc88110 */ - :13, - psr_sfd : 5, - psr_sfd2: 1, /* mc88110 */ + :18, + psr_sfd : 6, psr_sfd1: 1, psr_mxm : 1, psr_ind : 1, diff --git a/sys/arch/mvme88k/include/reg.h b/sys/arch/mvme88k/include/reg.h index a695b1fbdcc..b68adfc6428 100644 --- a/sys/arch/mvme88k/include/reg.h +++ b/sys/arch/mvme88k/include/reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reg.h,v 1.9 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: reg.h,v 1.10 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -41,30 +41,20 @@ struct reg { unsigned fpsr; unsigned fpcr; unsigned sxip; -#define exip sxip /* mc88110 */ +#define exip sxip unsigned snip; -#define enip snip /* mc88110 */ +#define enip snip unsigned sfip; unsigned ssbr; -#define duap ssbr /* mc88110 */ unsigned dmt0; -#define dsr dmt0 /* mc88110 */ unsigned dmd0; -#define dlar dmd0 /* mc88110 */ unsigned dma0; -#define dpar dma0 /* mc88110 */ unsigned dmt1; -#define isr dmt1 /* mc88110 */ unsigned dmd1; -#define ilar dmd1 /* mc88110 */ unsigned dma1; -#define ipar dma1 /* mc88110 */ unsigned dmt2; -#define isap dmt2 /* mc88110 */ unsigned dmd2; -#define dsap dmd2 /* mc88110 */ unsigned dma2; -#define iuap dma2 /* mc88110 */ unsigned fpecr; unsigned fphs1; unsigned fpls1; @@ -80,6 +70,12 @@ struct reg { unsigned scratch1; /* used by locore trap handling code */ unsigned ipfsr; /* P BUS status - used in inst fault handling */ unsigned dpfsr; /* P BUS status - used in data fault handling */ + unsigned dsr; /* MVME197 */ + unsigned dlar; /* MVME197 */ + unsigned dpar; /* MVME197 */ + unsigned isr; /* MVME197 */ + unsigned ilar; /* MVME197 */ + unsigned ipar; /* MVME197 */ unsigned cpu; /* cpu number */ }; diff --git a/sys/arch/mvme88k/include/signal.h b/sys/arch/mvme88k/include/signal.h index 618f3a694c8..faf251b5874 100644 --- a/sys/arch/mvme88k/include/signal.h +++ b/sys/arch/mvme88k/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.7 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: signal.h,v 1.8 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -55,25 +55,15 @@ struct sigcontext { int sc_fpsr; int sc_fpcr; int sc_ssbr; -#define sc_duap sc_ssbr /* mc88110 */ int sc_dmt0; -#define sc_dsr sc_dmt0 /* mc88110 */ int sc_dmd0; -#define sc_dlar sc_dmd0 /* mc88110 */ int sc_dma0; -#define sc_dpar sc_dma0 /* mc88110 */ int sc_dmt1; -#define sc_isr sc_dmt1 /* mc88110 */ int sc_dmd1; -#define sc_ilar sc_dmd1 /* mc88110 */ int sc_dma1; -#define sc_ipar sc_dma1 /* mc88110 */ int sc_dmt2; -#define sc_isap sc_dmt2 /* mc88110 */ int sc_dmd2; -#define sc_dsap sc_dmd2 /* mc88110 */ int sc_dma2; -#define sc_iuap sc_dma2 /* mc88110 */ int sc_fpecr; int sc_fphs1; int sc_fpls1; @@ -83,6 +73,6 @@ struct sigcontext { int sc_fprh; int sc_fprl; int sc_fpit; - int sc_xxxx; /* pad to double word boundary */ + int sc_xxxx; /* padd to double word boundary */ }; #endif /* __MACHINE_SIGNAL_H__ */ diff --git a/sys/arch/mvme88k/include/trap.h b/sys/arch/mvme88k/include/trap.h index 475c9e8ab99..379760b4ae0 100644 --- a/sys/arch/mvme88k/include/trap.h +++ b/sys/arch/mvme88k/include/trap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.h,v 1.13 2001/12/13 08:55:51 smurph Exp $ */ +/* $OpenBSD: trap.h,v 1.14 2001/12/16 23:49:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1992 Carnegie Mellon University @@ -88,19 +88,14 @@ int ss_inst_delayed(unsigned ins); unsigned ss_next_instr_address(struct proc *p, unsigned pc, unsigned delay_slot); int cpu_singlestep(register struct proc *p); -#ifdef M88100 -void m88100_trap __P((unsigned, struct m88100_saved_state *)); -void m88100_syscall __P((register_t, struct m88100_saved_state *)); -#endif /* M88100 */ - -#ifdef M88110 -void m88110_trap __P((unsigned, struct m88100_saved_state *)); -void m88110_syscall __P((register_t, struct m88100_saved_state *)); -#endif /* M88110 */ - -/* machine dependant trap and syscall macros */ -#define trap(type, frame) (*md.interrupt_func)(type, frame) -#define syscall(code, frame) (*md.syscall_func)(code, frame) +#if defined(MVME187) || defined(MVME188) +void syscall(register_t code, struct m88100_saved_state *tf); +void trap18x(unsigned type, struct m88100_saved_state *frame); +#endif /* defined(MVME187) || defined(MVME188) */ +#ifdef MVME197 +void m197_syscall(register_t code, struct m88100_saved_state *tf); +void trap197(unsigned type, struct m88100_saved_state *frame); +#endif /* MVME197 */ #endif /* _LOCORE */ |