Lines Matching +full:user +full:- +full:level
4 * This file contains all exception vectors (user, kernel, and double),
13 * Copyright (C) 2005 - 2008 Tensilica, Inc.
20 * We use a two-level table approach. The user and kernel exception vectors
21 * use a first-level dispatch table to dispatch the exception to a registered
23 * The default handler sets up a C-stack and dispatches the exception to a
24 * registerd C handler in the second-level dispatch table.
41 * Note: Neither the kernel nor the user exception handler generate literals.
50 #include <asm/asm-offsets.h>
60 * User exception vector. (Exceptions with PS.UM == 1, PS.EXCM == 0)
63 * We switch to the kernel stack and jump to the first level handler
92 * jump to the first-level handler associated with the exception cause.
103 addi a2, a1, -16 - PT_KERNEL_SIZE # adjust stack pointer
119 * to read data from an invalid address in user space.
121 * Note that this vector is never invoked for level-1 interrupts, because such
126 * cases go through the double exception vector than through the user and
130 * happens when accessing user-space memory with the user's permissions
138 * EXC_TABLE_FIXUP is non-zero, this handler jumps to that address. A value of
139 * zero indicates to use the default kernel/user exception handler.
153 * - The original stack pointer (in a1) must not be modified. The fast
156 * - If the fast handler manipulates the stack pointer (in a2), it has to
159 * - The handler can use any other generic register from a3 to a15, but it
162 * - These registers must be saved before a double exception can occur.
164 * - If we ever implement handling signals while in double exceptions, the
170 * - Fixup entry conditions differ from regular exceptions:
179 * - When the kernel enters the fixup handler, it still assumes it is in a
181 * The fixup handler, therefore, has to re-register itself as the fixup
184 * - Fixup handler can share the same exception frame with the fast handler.
187 * - Fixup handlers can jump to the default kernel and user exception
191 * it instead of the exception address, so it can re-register itself as
252 * We return to the instruction in user space that caused the window
295 addi a3, a3, -EXCCAUSE_DTLB_MISS
334 addi a2, a2, -PT_USER_SIZE
361 * We return to the instruction in user space that caused the window
382 extui a2, a0, 0, 6 # get offset into 64-byte vector handler
385 addi a0, a0, -128
393 * a9/a13 gets a 2nd-level miss exception (not hardware TLB refill).
406 l32e a0, a9, -16
415 l32e a0, a13, -16
444 rotw -2
447 * We are now in the user code's original window frame.
448 * Process the exception as a user exception as if it was
449 * taken by the user code.
451 * This is similar to the user exception vector,
464 addi a0, a0, -EXCCAUSE_UNALIGNED
477 rotw -1
482 rotw -3
497 * - go to the original window retaining a0 value;
498 * - set up exception stack to return back to appropriate a0 restore code
501 * - handle the exception;
502 * - go to the window that was being spilled;
503 * - set up window_overflow_restore_a0_fixup as a fixup routine;
504 * - reload a0;
505 * - restore the original window;
506 * - reset the default fixup routine;
507 * - return to user. By the time we get to this fixup handler all information
536 rotw -\n
572 l32e a0, a9, -16
575 l32e a0, a13, -16
577 rotw -\n
625 * Medium priority level interrupt vectors
633 * common_exception code gets current IRQ level in PS.INTLEVEL
637 .macro irq_entry_level level
639 .if XCHAL_EXCM_LEVEL >= \level
640 .section .Level\level\()InterruptVector.text, "ax"
641 ENTRY(_Level\level\()InterruptVector)
643 rsr a0, epc\level
645 .if \level <= LOCKLEVEL
651 rsr a0, eps\level
652 # branch to user or kernel vector
676 bbsi.l a0, PS_UM_BIT, 1f # branch if user mode
680 j _UserExceptionVector # simulate user vector exception
686 * handlers underflow-4 to underflow-12, then the overflow handlers
687 * overflow-4 to overflow-12.
703 /* 4-Register Window Overflow Vector (Handler) */
707 s32e a0, a5, -16
708 s32e a1, a5, -12
709 s32e a2, a5, -8
710 s32e a3, a5, -4
715 /* 4-Register Window Underflow Vector (Handler) */
719 l32e a0, a5, -16
720 l32e a1, a5, -12
721 l32e a2, a5, -8
722 l32e a3, a5, -4
727 /* 8-Register Window Overflow Vector (Handler) */
731 s32e a0, a9, -16
732 l32e a0, a1, -12
733 s32e a2, a9, -8
734 s32e a1, a9, -12
735 s32e a3, a9, -4
736 s32e a4, a0, -32
737 s32e a5, a0, -28
738 s32e a6, a0, -24
739 s32e a7, a0, -20
744 /* 8-Register Window Underflow Vector (Handler) */
748 l32e a1, a9, -12
749 l32e a0, a9, -16
750 l32e a7, a1, -12
751 l32e a2, a9, -8
752 l32e a4, a7, -32
753 l32e a3, a9, -4
754 l32e a5, a7, -28
755 l32e a6, a7, -24
756 l32e a7, a7, -20
761 /* 12-Register Window Overflow Vector (Handler) */
765 s32e a0, a13, -16
766 l32e a0, a1, -12
767 s32e a1, a13, -12
768 s32e a2, a13, -8
769 s32e a3, a13, -4
770 s32e a4, a0, -48
771 s32e a5, a0, -44
772 s32e a6, a0, -40
773 s32e a7, a0, -36
774 s32e a8, a0, -32
775 s32e a9, a0, -28
776 s32e a10, a0, -24
777 s32e a11, a0, -20
782 /* 12-Register Window Underflow Vector (Handler) */
786 l32e a1, a13, -12
787 l32e a0, a13, -16
788 l32e a11, a1, -12
789 l32e a2, a13, -8
790 l32e a4, a11, -48
791 l32e a8, a11, -32
792 l32e a3, a13, -4
793 l32e a5, a11, -44
794 l32e a6, a11, -40
795 l32e a7, a11, -36
796 l32e a9, a11, -28
797 l32e a10, a11, -24
798 l32e a11, a11, -20