Date: Sat, 24 May 2003 16:40:50 -0700 (PDT) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 31829 for review Message-ID: <200305242340.h4ONeoIW012855@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31829 Change 31829 by jmallett@jmallett_dalek on 2003/05/24 16:40:03 Nuke the generic exception vector, as we provide it in mips/exception.S now. Also use .dword not .word for the exception table, even though it will be gone shortly. Affected files ... .. //depot/projects/mips/sys/mips/mips/mips_subr.S#5 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/mips_subr.S#5 (text+ko) ==== @@ -343,47 +343,6 @@ nop _VECTOR_END(MIPSX(intr)) -/* - *---------------------------------------------------------------------------- - * - * mipsN_exception -- - * - * Vector code for the general exception vector 0x80000180 - * on an r4000 or r4400. - * - * This code is copied to the general exception vector address to - * handle most exceptions. - * NOTE: This code should be relocatable and max 32 instructions!!! - *---------------------------------------------------------------------------- - */ -VECTOR(MIPSX(exception), unknown) -/* - * Find out what mode we came from and jump to the proper handler. - */ - .set noat - mfc0 k0, MIPS_COP_0_STATUS #00: get the status register - mfc0 k1, MIPS_COP_0_CAUSE #01: get the cause register - and k0, k0, MIPS3_SR_KSU_USER #02: test for user mode - # sneaky but the bits are - # with us........ - sll k0, k0, 3 #03: shift user bit for cause index - and k1, k1, MIPS3_CR_EXC_CODE #04: mask out the cause bits. - or k1, k1, k0 #05: change index to user table -1: - la k0, MIPSX(excpt_sw) #06: get base of the jump table - addu k0, k0, k1 #07: get the address of the - # function entry. Note that - # the cause is already - # shifted left by 2 bits so - # we dont have to shift. - lw k0, 0(k0) #08: get the function address - #nop # -slip- - - j k0 #09: jump to the function - nop #0a: branch delay slot - .set at -_VECTOR_END(MIPSX(exception)) - /*---------------------------------------------------------------------------- * * slowfault -- @@ -506,6 +465,7 @@ nop nop nop + PRINTF("OMG\n"); jal trap # sw a3, KERNFRAME_RA(sp) # for debugging @@ -2038,78 +1998,78 @@ .globl MIPSX(locoresw) MIPSX(locoresw): - .word MIPSX(cpu_switch_resume) - .word MIPSX(proc_trampoline) - .word mips_idle + .dword MIPSX(cpu_switch_resume) + .dword MIPSX(proc_trampoline) + .dword mips_idle MIPSX(excpt_sw): #### #### The kernel exception handlers. #### - .word MIPSX(KernIntr) # 0 external interrupt - .word MIPSX(KernGenException) # 1 TLB modification - .word MIPSX(TLBInvalidException) # 2 TLB miss (LW/I-fetch) - .word MIPSX(TLBInvalidException) # 3 TLB miss (SW) - .word MIPSX(KernGenException) # 4 address error (LW/I-fetch) - .word MIPSX(KernGenException) # 5 address error (SW) - .word MIPSX(KernGenException) # 6 bus error (I-fetch) - .word MIPSX(KernGenException) # 7 bus error (load or store) - .word MIPSX(KernGenException) # 8 system call - .word MIPSX(KernGenException) # 9 breakpoint - .word MIPSX(KernGenException) # 10 reserved instruction - .word MIPSX(KernGenException) # 11 coprocessor unusable - .word MIPSX(KernGenException) # 12 arithmetic overflow - .word MIPSX(KernGenException) # 13 r4k trap exception - .word MIPSX(KernGenException) # 14 reserved - .word MIPSX(KernGenException) # 15 r4k FP exception - .word MIPSX(KernGenException) # 16 reserved - .word MIPSX(KernGenException) # 17 reserved - .word MIPSX(KernGenException) # 18 reserved - .word MIPSX(KernGenException) # 19 reserved - .word MIPSX(KernGenException) # 20 reserved - .word MIPSX(KernGenException) # 21 reserved - .word MIPSX(KernGenException) # 22 reserved - .word MIPSX(KernGenException) # 23 watch exception - .word MIPSX(KernGenException) # 24 reserved - .word MIPSX(KernGenException) # 25 reserved - .word MIPSX(KernGenException) # 26 reserved - .word MIPSX(KernGenException) # 27 reserved - .word MIPSX(KernGenException) # 28 reserved - .word MIPSX(KernGenException) # 29 reserved - .word MIPSX(KernGenException) # 30 reserved - .word MIPSX(KernGenException) # 31 reserved + .dword MIPSX(KernIntr) # 0 external interrupt + .dword MIPSX(KernGenException) # 1 TLB modification + .dword MIPSX(TLBInvalidException) # 2 TLB miss (LW/I-fetch) + .dword MIPSX(TLBInvalidException) # 3 TLB miss (SW) + .dword MIPSX(KernGenException) # 4 address error (LW/I-fetch) + .dword MIPSX(KernGenException) # 5 address error (SW) + .dword MIPSX(KernGenException) # 6 bus error (I-fetch) + .dword MIPSX(KernGenException) # 7 bus error (load or store) + .dword MIPSX(KernGenException) # 8 system call + .dword MIPSX(KernGenException) # 9 breakpoint + .dword MIPSX(KernGenException) # 10 reserved instruction + .dword MIPSX(KernGenException) # 11 coprocessor unusable + .dword MIPSX(KernGenException) # 12 arithmetic overflow + .dword MIPSX(KernGenException) # 13 r4k trap exception + .dword MIPSX(KernGenException) # 14 reserved + .dword MIPSX(KernGenException) # 15 r4k FP exception + .dword MIPSX(KernGenException) # 16 reserved + .dword MIPSX(KernGenException) # 17 reserved + .dword MIPSX(KernGenException) # 18 reserved + .dword MIPSX(KernGenException) # 19 reserved + .dword MIPSX(KernGenException) # 20 reserved + .dword MIPSX(KernGenException) # 21 reserved + .dword MIPSX(KernGenException) # 22 reserved + .dword MIPSX(KernGenException) # 23 watch exception + .dword MIPSX(KernGenException) # 24 reserved + .dword MIPSX(KernGenException) # 25 reserved + .dword MIPSX(KernGenException) # 26 reserved + .dword MIPSX(KernGenException) # 27 reserved + .dword MIPSX(KernGenException) # 28 reserved + .dword MIPSX(KernGenException) # 29 reserved + .dword MIPSX(KernGenException) # 30 reserved + .dword MIPSX(KernGenException) # 31 reserved ##### ##### The user exception handlers. ##### - .word MIPSX(UserIntr) # 0 - .word MIPSX(UserGenException) # 1 - .word MIPSX(UserGenException) # 2 - .word MIPSX(UserGenException) # 3 - .word MIPSX(UserGenException) # 4 - .word MIPSX(UserGenException) # 5 - .word MIPSX(UserGenException) # 6 - .word MIPSX(UserGenException) # 7 - .word MIPSX(SystemCall) # 8 - .word MIPSX(UserGenException) # 9 - .word MIPSX(UserGenException) # 10 - .word MIPSX(UserGenException) # 11 - .word MIPSX(UserGenException) # 12 - .word MIPSX(UserGenException) # 13 - .word MIPSX(UserGenException) # 14 - .word MIPSX(UserGenException) # 15 - .word MIPSX(UserGenException) # 16 - .word MIPSX(UserGenException) # 17 - .word MIPSX(UserGenException) # 18 - .word MIPSX(UserGenException) # 19 - .word MIPSX(UserGenException) # 20 - .word MIPSX(UserGenException) # 21 - .word MIPSX(UserGenException) # 22 - .word MIPSX(UserGenException) # 23 - .word MIPSX(UserGenException) # 24 - .word MIPSX(UserGenException) # 25 - .word MIPSX(UserGenException) # 26 - .word MIPSX(UserGenException) # 27 - .word MIPSX(UserGenException) # 28 - .word MIPSX(UserGenException) # 29 - .word MIPSX(UserGenException) # 30 - .word MIPSX(UserGenException) # 31 + .dword MIPSX(UserIntr) # 0 + .dword MIPSX(UserGenException) # 1 + .dword MIPSX(UserGenException) # 2 + .dword MIPSX(UserGenException) # 3 + .dword MIPSX(UserGenException) # 4 + .dword MIPSX(UserGenException) # 5 + .dword MIPSX(UserGenException) # 6 + .dword MIPSX(UserGenException) # 7 + .dword MIPSX(SystemCall) # 8 + .dword MIPSX(UserGenException) # 9 + .dword MIPSX(UserGenException) # 10 + .dword MIPSX(UserGenException) # 11 + .dword MIPSX(UserGenException) # 12 + .dword MIPSX(UserGenException) # 13 + .dword MIPSX(UserGenException) # 14 + .dword MIPSX(UserGenException) # 15 + .dword MIPSX(UserGenException) # 16 + .dword MIPSX(UserGenException) # 17 + .dword MIPSX(UserGenException) # 18 + .dword MIPSX(UserGenException) # 19 + .dword MIPSX(UserGenException) # 20 + .dword MIPSX(UserGenException) # 21 + .dword MIPSX(UserGenException) # 22 + .dword MIPSX(UserGenException) # 23 + .dword MIPSX(UserGenException) # 24 + .dword MIPSX(UserGenException) # 25 + .dword MIPSX(UserGenException) # 26 + .dword MIPSX(UserGenException) # 27 + .dword MIPSX(UserGenException) # 28 + .dword MIPSX(UserGenException) # 29 + .dword MIPSX(UserGenException) # 30 + .dword MIPSX(UserGenException) # 31
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305242340.h4ONeoIW012855>