Module Name: src Committed By: matt Date: Wed Dec 29 00:39:40 UTC 2010
Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: locore.h src/sys/arch/mips/mips [matt-nb5-mips64]: locore_mips1.S mipsX_subr.S mips_machdep.c vm_machdep.c Log Message: Janitorial work. Move emulation prototypes here and get rid of StudLyCaps. Remove kludgery for lwp/setfunc trampoline and just grab them of the damn structure. Make mips_locore_jumpvec contain the routines that don't get reassigned and move wbflush to mips_locoresw since it does get overridden. To generate a diff of this commit: cvs rdiff -u -r1.78.36.1.2.26 -r1.78.36.1.2.27 \ src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.64.26.1.2.10 -r1.64.26.1.2.11 \ src/sys/arch/mips/mips/locore_mips1.S cvs rdiff -u -r1.26.36.1.2.37 -r1.26.36.1.2.38 \ src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.205.4.1.2.1.2.50 -r1.205.4.1.2.1.2.51 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.121.6.1.2.17 -r1.121.6.1.2.18 \ src/sys/arch/mips/mips/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.26 src/sys/arch/mips/include/locore.h:1.78.36.1.2.27 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.26 Wed Dec 22 06:13:36 2010 +++ src/sys/arch/mips/include/locore.h Wed Dec 29 00:39:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.78.36.1.2.26 2010/12/22 06:13:36 matt Exp $ */ +/* $NetBSD: locore.h,v 1.78.36.1.2.27 2010/12/29 00:39:39 matt Exp $ */ /* * This file should not be included by MI code!!! @@ -36,6 +36,53 @@ #include <mips/reg.h> struct tlbmask; +struct trapframe; + +void trap(uint32_t, uint32_t, vaddr_t, vaddr_t, struct trapframe *); +void ast(void); + +void mips_fpu_trap(vaddr_t, struct trapframe *); +void mips_fpu_intr(vaddr_t, struct trapframe *); + +vaddr_t mips_emul_branch(struct trapframe *, vaddr_t, uint32_t, bool); +void mips_emul_inst(uint32_t, uint32_t, vaddr_t, struct trapframe *); + +void mips_emul_fp(uint32_t, struct trapframe *, uint32_t); +void mips_emul_branchdelayslot(uint32_t, struct trapframe *, uint32_t); + +void mips_emul_lwc0(uint32_t, struct trapframe *, uint32_t); +void mips_emul_swc0(uint32_t, struct trapframe *, uint32_t); +void mips_emul_special(uint32_t, struct trapframe *, uint32_t); +void mips_emul_special3(uint32_t, struct trapframe *, uint32_t); + +void mips_emul_lwc1(uint32_t, struct trapframe *, uint32_t); +void mips_emul_swc1(uint32_t, struct trapframe *, uint32_t); +void mips_emul_ldc1(uint32_t, struct trapframe *, uint32_t); +void mips_emul_sdc1(uint32_t, struct trapframe *, uint32_t); + +void mips_emul_lb(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lbu(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lh(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lhu(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lw(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lwl(uint32_t, struct trapframe *, uint32_t); +void mips_emul_lwr(uint32_t, struct trapframe *, uint32_t); +#if defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) +void mips_emul_lwu(uint32_t, struct trapframe *, uint32_t); +void mips_emul_ld(uint32_t, struct trapframe *, uint32_t); +void mips_emul_ldl(uint32_t, struct trapframe *, uint32_t); +void mips_emul_ldr(uint32_t, struct trapframe *, uint32_t); +#endif +void mips_emul_sb(uint32_t, struct trapframe *, uint32_t); +void mips_emul_sh(uint32_t, struct trapframe *, uint32_t); +void mips_emul_sw(uint32_t, struct trapframe *, uint32_t); +void mips_emul_swl(uint32_t, struct trapframe *, uint32_t); +void mips_emul_swr(uint32_t, struct trapframe *, uint32_t); +#if defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) +void mips_emul_sd(uint32_t, struct trapframe *, uint32_t); +void mips_emul_sdl(uint32_t, struct trapframe *, uint32_t); +void mips_emul_sdr(uint32_t, struct trapframe *, uint32_t); +#endif uint32_t mips_cp0_cause_read(void); void mips_cp0_cause_write(uint32_t); @@ -78,40 +125,31 @@ int tlb_update(vaddr_t, uint32_t); void tlb_enter(size_t, vaddr_t, uint32_t); void tlb_read_indexed(size_t, struct tlbmask *); +void tlb_write_indexed(size_t, const struct tlbmask *); void wbflush(void); #ifdef MIPS1 void mips1_tlb_invalidate_all(void); -void mips1_lwp_trampoline(void); -void mips1_setfunc_trampoline(void); uint32_t tx3900_cp0_config_read(void); #endif #if defined(MIPS3) || defined(MIPS4) void mips3_tlb_invalidate_all(void); -void mips3_lwp_trampoline(void); -void mips3_setfunc_trampoline(void); void mips3_pagezero(void *dst); #ifdef MIPS3_5900 void mips5900_tlb_invalidate_all(void); -void mips5900_lwp_trampoline(void); -void mips5900_setfunc_trampoline(void); void mips5900_pagezero(void *dst); #endif #endif /* MIPS3 || MIPS4 */ #ifdef MIPS32 void mips32_tlb_invalidate_all(void); -void mips32_lwp_trampoline(void); -void mips32_setfunc_trampoline(void); #endif #ifdef MIPS64 void mips64_tlb_invalidate_all(void); -void mips64_lwp_trampoline(void); -void mips64_setfunc_trampoline(void); void mips64_pagezero(void *dst); #endif @@ -291,6 +329,9 @@ * locore function, and macros which jump through it. */ typedef struct { + void (*ljv_cpu_switch_resume)(struct lwp *); + intptr_t ljv_lwp_trampoline; + intptr_t ljv_setfunc_trampoline; void (*ljv_tlb_set_asid)(uint32_t pid); void (*ljv_tlb_invalidate_asids)(uint32_t, uint32_t); void (*ljv_tlb_invalidate_addr)(vaddr_t); @@ -300,7 +341,7 @@ int (*ljv_tlb_update)(vaddr_t, uint32_t); void (*ljv_tlb_enter)(size_t, vaddr_t, uint32_t); void (*ljv_tlb_read_indexed)(size_t, struct tlbmask *); - void (*ljv_wbflush)(void); + void (*ljv_tlb_write_indexed)(size_t, const struct tlbmask *); } mips_locore_jumpvec_t; void mips_set_wbflush(void (*)(void)); @@ -310,10 +351,8 @@ void logstacktrace(void); struct locoresw { - void (*lsw_cpu_switch_resume)(struct lwp *); - uintptr_t lsw_lwp_trampoline; + void (*lsw_wbflush)(void); void (*lsw_cpu_idle)(void); - uintptr_t lsw_setfunc_trampoline; int (*lsw_send_ipi)(struct cpu_info *, int); void (*lsw_cpu_offline_md)(void); void (*lsw_cpu_init)(struct cpu_info *); @@ -331,31 +370,9 @@ */ extern mips_locore_jumpvec_t mips_locore_jumpvec; extern struct locoresw mips_locoresw; +struct lwpsw; extern void mips_vector_init(const struct splsw *); -#if defined(MIPS1) && !defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64) -#define lwp_trampoline mips1_lwp_trampoline -#define setfunc_trampoline mips1_setfunc_trampoline -#elif !defined(MIPS1) && defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64) && !defined(MIPS3_5900) -#define lwp_trampoline mips3_lwp_trampoline -#define setfunc_trampoline mips3_setfunc_trampoline -#elif !defined(MIPS1) && !defined(MIPS3) && defined(MIPS32) && !defined(MIPS64) -#define lwp_trampoline mips32_lwp_trampoline -#define setfunc_trampoline mips32_setfunc_trampoline -#elif !defined(MIPS1) && !defined(MIPS3) && !defined(MIPS32) && defined(MIPS64) - /* all common with mips3 */ -#define lwp_trampoline mips64_lwp_trampoline -#define setfunc_trampoline mips64_setfunc_trampoline -#elif !defined(MIPS1) && defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64) && defined(MIPS3_5900) -#define lwp_trampoline mips5900_lwp_trampoline -#define setfunc_trampoline mips5900_setfunc_trampoline -#else -#define lwp_trampoline mips_locoresw.lsw_lwp_trampoline -#define setfunc_trampoline mips_locoresw.lsw_setfunc_trampoline -#endif - -#define CPU_IDLE mips_locoresw.lsw_cpu_idle - /* cpu_switch_resume is called inside locore.S */ /* Index: src/sys/arch/mips/mips/locore_mips1.S diff -u src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.10 src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.11 --- src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.10 Fri Dec 24 07:21:12 2010 +++ src/sys/arch/mips/mips/locore_mips1.S Wed Dec 29 00:39:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_mips1.S,v 1.64.26.1.2.10 2010/12/24 07:21:12 matt Exp $ */ +/* $NetBSD: locore_mips1.S,v 1.64.26.1.2.11 2010/12/29 00:39:39 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -1636,96 +1636,97 @@ .globl _C_LABEL(MIPSX(locore_vec)) _C_LABEL(MIPSX(locore_vec)): - .word _C_LABEL(MIPSX(tlb_set_asid)) - .word _C_LABEL(MIPSX(tlb_invalidate_asids)) - .word _C_LABEL(MIPSX(tlb_invalidate_addr)) - .word _C_LABEL(nullop) - .word _C_LABEL(MIPSX(tlb_invalidate_all)) - .word _C_LABEL(MIPSX(tlb_record_asids)) - .word _C_LABEL(MIPSX(tlb_update)) - .word _C_LABEL(MIPSX(tlb_enter)) - .word _C_LABEL(MIPSX(tlb_read_indexed)) - .word _C_LABEL(MIPSX(wbflush)) + PTR_WORD _C_LABEL(MIPSX(cpu_switch_resume)) + PTR_WORD _C_LABEL(MIPSX(lwp_trampoline)) + PTR_WORD _C_LABEL(MIPSX(setfunc_trampoline)) + PTR_WORD _C_LABEL(MIPSX(tlb_set_asid)) + PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_asids)) + PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_addr)) + PTR_WORD _C_LABEL(nullop) # tlb_invalidate_globals + PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_all)) + PTR_WORD _C_LABEL(MIPSX(tlb_record_asids)) + PTR_WORD _C_LABEL(MIPSX(tlb_update)) + PTR_WORD _C_LABEL(MIPSX(tlb_enter)) + PTR_WORD _C_LABEL(MIPSX(tlb_read_indexed)) + PTR_WORD _C_LABEL(nullop) # tlb_write_indexed .globl _C_LABEL(MIPSX(locoresw)) _C_LABEL(MIPSX(locoresw)): - .word _C_LABEL(MIPSX(cpu_switch_resume)) - .word _C_LABEL(MIPSX(lwp_trampoline)) - .word _C_LABEL(nullop) # idle - .word _C_LABEL(MIPSX(setfunc_trampoline)) - .word _C_LABEL(nullop) # send ipi - .word _C_LABEL(nullop) # cpu_offline_md - .word _C_LABEL(nullop) # spare - .word _C_LABEL(nullop) # spare + PTR_WORD _C_LABEL(MIPSX(wbflush)) # wbflush + PTR_WORD _C_LABEL(nullop) # idle + PTR_WORD _C_LABEL(nullop) # send ipi + PTR_WORD _C_LABEL(nullop) # cpu_offline_md + PTR_WORD _C_LABEL(nullop) # spare + PTR_WORD _C_LABEL(nullop) # spare MIPSX(excpt_sw): #### #### The kernel exception handlers. #### - .word _C_LABEL(MIPSX(kern_intr)) # 0 external interrupt - .word _C_LABEL(MIPSX(kern_gen_exception))# 1 TLB modification - .word _C_LABEL(MIPSX(kernel_tlb_miss)) # 2 TLB miss (LW/I-fetch) - .word _C_LABEL(MIPSX(kernel_tlb_miss)) # 3 TLB miss (SW) - .word _C_LABEL(MIPSX(kern_gen_exception))# 4 address error (LW/I-fetch) - .word _C_LABEL(MIPSX(kern_gen_exception))# 5 address error (SW) - .word _C_LABEL(MIPSX(kern_gen_exception))# 6 bus error (I-fetch) - .word _C_LABEL(MIPSX(kern_gen_exception))# 7 bus error (load or store) - .word _C_LABEL(MIPSX(kern_gen_exception))# 8 system call - .word _C_LABEL(MIPSX(kern_gen_exception))# 9 breakpoint - .word _C_LABEL(MIPSX(kern_gen_exception))# 10 reserved instruction - .word _C_LABEL(MIPSX(kern_gen_exception))# 11 coprocessor unusable - .word _C_LABEL(MIPSX(kern_gen_exception))# 12 arithmetic overflow - .word _C_LABEL(MIPSX(kern_gen_exception))# 13 r3k reserved - .word _C_LABEL(MIPSX(kern_gen_exception))# 14 r3k reserved - .word _C_LABEL(MIPSX(kern_gen_exception))# 15 r3k reserved - .word _C_LABEL(MIPSX(kern_gen_exception))# 16 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 17 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 18 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 19 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 20 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 21 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 22 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 23 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 24 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 25 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 26 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 27 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 28 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 29 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 30 never happens w/ MIPS1 - .word _C_LABEL(MIPSX(kern_gen_exception))# 31 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_intr)) # 0 external interrupt + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 1 TLB modification + PTR_WORD _C_LABEL(MIPSX(kernel_tlb_miss)) # 2 TLB miss (LW/I-fetch) + PTR_WORD _C_LABEL(MIPSX(kernel_tlb_miss)) # 3 TLB miss (SW) + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 4 address error (LW/I-fetch) + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 5 address error (SW) + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 6 bus error (I-fetch) + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 7 bus error (load or store) + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 8 system call + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 9 breakpoint + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 10 reserved instruction + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 11 coprocessor unusable + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 12 arithmetic overflow + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 13 r3k reserved + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 14 r3k reserved + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 15 r3k reserved + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 16 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 17 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 18 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 19 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 20 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 21 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 22 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 23 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 24 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 25 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 26 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 27 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 28 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 29 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 30 never happens w/ MIPS1 + PTR_WORD _C_LABEL(MIPSX(kern_gen_exception))# 31 never happens w/ MIPS1 ##### ##### The user exception handlers. ##### - .word _C_LABEL(MIPSX(user_intr)) # 0 - .word _C_LABEL(MIPSX(user_gen_exception))# 1 - .word _C_LABEL(MIPSX(user_gen_exception))# 2 - .word _C_LABEL(MIPSX(user_gen_exception))# 3 - .word _C_LABEL(MIPSX(user_gen_exception))# 4 - .word _C_LABEL(MIPSX(user_gen_exception))# 5 - .word _C_LABEL(MIPSX(user_gen_exception))# 6 - .word _C_LABEL(MIPSX(user_gen_exception))# 7 - .word _C_LABEL(MIPSX(systemcall)) # 8 - .word _C_LABEL(MIPSX(user_gen_exception))# 9 - .word _C_LABEL(MIPSX(user_gen_exception))# 10 - .word _C_LABEL(MIPSX(user_gen_exception))# 11 - .word _C_LABEL(MIPSX(user_gen_exception))# 12 - .word _C_LABEL(MIPSX(user_gen_exception))# 13 - .word _C_LABEL(MIPSX(user_gen_exception))# 14 - .word _C_LABEL(MIPSX(user_gen_exception))# 15 - .word _C_LABEL(MIPSX(user_gen_exception))# 16 - .word _C_LABEL(MIPSX(user_gen_exception))# 17 - .word _C_LABEL(MIPSX(user_gen_exception))# 18 - .word _C_LABEL(MIPSX(user_gen_exception))# 19 - .word _C_LABEL(MIPSX(user_gen_exception))# 20 - .word _C_LABEL(MIPSX(user_gen_exception))# 21 - .word _C_LABEL(MIPSX(user_gen_exception))# 22 - .word _C_LABEL(MIPSX(user_gen_exception))# 23 - .word _C_LABEL(MIPSX(user_gen_exception))# 24 - .word _C_LABEL(MIPSX(user_gen_exception))# 25 - .word _C_LABEL(MIPSX(user_gen_exception))# 26 - .word _C_LABEL(MIPSX(user_gen_exception))# 27 - .word _C_LABEL(MIPSX(user_gen_exception))# 28 - .word _C_LABEL(MIPSX(user_gen_exception))# 29 - .word _C_LABEL(MIPSX(user_gen_exception))# 20 - .word _C_LABEL(MIPSX(user_gen_exception))# 31 + PTR_WORD _C_LABEL(MIPSX(user_intr)) # 0 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 1 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 2 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 3 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 4 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 5 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 6 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 7 + PTR_WORD _C_LABEL(MIPSX(systemcall)) # 8 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 9 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 10 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 11 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 12 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 13 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 14 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 15 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 16 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 17 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 18 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 19 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 20 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 21 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 22 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 23 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 24 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 25 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 26 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 27 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 28 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 29 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 20 + PTR_WORD _C_LABEL(MIPSX(user_gen_exception))# 31 Index: src/sys/arch/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.37 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.38 --- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.37 Fri Dec 24 07:21:12 2010 +++ src/sys/arch/mips/mips/mipsX_subr.S Wed Dec 29 00:39:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.37 2010/12/24 07:21:12 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.38 2010/12/29 00:39:39 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2465,7 +2465,7 @@ #if defined(ENABLE_MIPS3_WIRED_MAP) /*-------------------------------------------------------------------------- * - * mipsN_TLBWriteIndexedVPS -- + * mipsN_tlb_write_indexed -- * * Write the given entry into the TLB at the given index. * Pass full R4000 style TLB info including variable page size mask. @@ -2480,7 +2480,7 @@ * *-------------------------------------------------------------------------- */ -LEAF(MIPSX(tlb_write_indexed_VPS)) +LEAF(MIPSX(tlb_write_indexed)) mfc0 v1, MIPS_COP_0_STATUS # Save the status register. RESET_EXCEPTION_LEVEL_DISABLE_INTERRUPTS(v0) COP0_SYNC @@ -2521,7 +2521,7 @@ nop j ra mtc0 v1, MIPS_COP_0_STATUS # Restore the status register -END(MIPSX(tlb_write_indexed_VPS)) +END(MIPSX(tlb_write_indexed)) #endif /* ENABLE_MIPS3_WIRED_MAP */ #if defined(MIPS3) && !defined(MIPS3_5900) @@ -2642,6 +2642,9 @@ .globl _C_LABEL(MIPSX(locore_vec)) _C_LABEL(MIPSX(locore_vec)): + PTR_WORD _C_LABEL(MIPSX(cpu_switch_resume)) + PTR_WORD _C_LABEL(MIPSX(lwp_trampoline)) + PTR_WORD _C_LABEL(MIPSX(setfunc_trampoline)) PTR_WORD _C_LABEL(MIPSX(tlb_set_asid)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_asids)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_addr)) @@ -2651,14 +2654,16 @@ PTR_WORD _C_LABEL(MIPSX(tlb_update)) PTR_WORD _C_LABEL(MIPSX(tlb_enter)) PTR_WORD _C_LABEL(MIPSX(tlb_read_indexed)) - PTR_WORD _C_LABEL(MIPSX(wbflush)) +#if defined(ENABLE_MIPS3_WIRED_MAP) + PTR_WORD _C_LABEL(MIPSX(tlb_write_indexed)) +#else + PTR_WORD _C_LABEL(nullop) +#endif .globl _C_LABEL(MIPSX(locoresw)) _C_LABEL(MIPSX(locoresw)): - PTR_WORD _C_LABEL(MIPSX(cpu_switch_resume)) - PTR_WORD _C_LABEL(MIPSX(lwp_trampoline)) + PTR_WORD _C_LABEL(MIPSX(wbflush)) # wbflush PTR_WORD _C_LABEL(nullop) # cpu_idle - PTR_WORD _C_LABEL(MIPSX(setfunc_trampoline)) PTR_WORD _C_LABEL(nullop) # send ipi PTR_WORD _C_LABEL(nullop) # cpu_offline_md PTR_WORD _C_LABEL(nullop) # cpu_init_md Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.50 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.51 --- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.50 Fri Dec 24 07:21:12 2010 +++ src/sys/arch/mips/mips/mips_machdep.c Wed Dec 29 00:39:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.50 2010/12/24 07:21:12 matt Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.51 2010/12/29 00:39:40 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.50 2010/12/24 07:21:12 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.51 2010/12/29 00:39:40 matt Exp $"); #define __INTR_PRIVATE @@ -1028,8 +1028,7 @@ void mips_set_wbflush(void (*flush_fn)(void)) { -#undef wbflush - mips_locore_jumpvec.ljv_wbflush = flush_fn; + mips_locoresw.lsw_wbflush = flush_fn; (*flush_fn)(); } Index: src/sys/arch/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.17 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.18 --- src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.17 Wed Dec 22 05:57:13 2010 +++ src/sys/arch/mips/mips/vm_machdep.c Wed Dec 29 00:39:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.17 2010/12/22 05:57:13 matt Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.121.6.1.2.18 2010/12/29 00:39:40 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -80,7 +80,7 @@ #include "opt_coredump.h" #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.17 2010/12/22 05:57:13 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.121.6.1.2.18 2010/12/29 00:39:40 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -177,7 +177,8 @@ pcb->pcb_context.val[_L_S1] = (intptr_t)arg; /* S1 */ pcb->pcb_context.val[MIPS_CURLWP_LABEL] = (intptr_t)l2; /* T8 */ pcb->pcb_context.val[_L_SP] = (intptr_t)tf; /* SP */ - pcb->pcb_context.val[_L_RA] = (intptr_t)lwp_trampoline; /* RA */ + pcb->pcb_context.val[_L_RA] = + mips_locore_jumpvec.ljv_lwp_trampoline; /* RA */ #ifdef _LP64 KASSERT(pcb->pcb_context.val[_L_SR] & MIPS_SR_KX); #endif @@ -200,7 +201,8 @@ pcb->pcb_context.val[_L_S1] = (intptr_t)arg; /* S1 */ pcb->pcb_context.val[MIPS_CURLWP_LABEL] = (intptr_t)l; /* T8 */ pcb->pcb_context.val[_L_SP] = (intptr_t)tf; /* SP */ - pcb->pcb_context.val[_L_RA] = (intptr_t)setfunc_trampoline; /* RA */ + pcb->pcb_context.val[_L_RA] = + mips_locore_jumpvec.ljv_setfunc_trampoline; /* RA */ #ifdef _LP64 KASSERT(pcb->pcb_context.val[_L_SR] & MIPS_SR_KX); #endif