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_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
251 * We return to the instruction in user space that caused the window
290 addi a3, a3, -EXCCAUSE_DTLB_MISS
329 addi a2, a2, -PT_USER_SIZE
355 * We return to the instruction in user space that caused the window
376 extui a2, a0, 0, 6 # get offset into 64-byte vector handler
379 addi a0, a0, -128
387 * a9/a13 gets a 2nd-level miss exception (not hardware TLB refill).
400 l32e a0, a9, -16
409 l32e a0, a13, -16
438 rotw -2
441 * We are now in the user code's original window frame.
442 * Process the exception as a user exception as if it was
443 * taken by the user code.
445 * This is similar to the user exception vector,
458 addi a0, a0, -EXCCAUSE_UNALIGNED
471 rotw -1
476 rotw -3
488 * - go to the original window retaining a0 value;
489 * - set up exception stack to return back to appropriate a0 restore code
492 * - handle the exception;
493 * - go to the window that was being spilled;
494 * - set up window_overflow_restore_a0_fixup as a fixup routine;
495 * - reload a0;
496 * - restore the original window;
497 * - reset the default fixup routine;
498 * - return to user. By the time we get to this fixup handler all information
527 rotw -\n
563 l32e a0, a9, -16
566 l32e a0, a13, -16
568 rotw -\n
614 * Medium priority level interrupt vectors
622 * common_exception code gets current IRQ level in PS.INTLEVEL
626 .macro irq_entry_level level argument
628 .if XCHAL_EXCM_LEVEL >= \level
629 .section .Level\level\()InterruptVector.text, "ax"
630 ENTRY(_Level\level\()InterruptVector)
632 rsr a0, epc\level
634 .if \level <= LOCKLEVEL
640 rsr a0, eps\level
641 # branch to user or kernel vector
656 * handlers underflow-4 to underflow-12, then the overflow handlers
657 * overflow-4 to overflow-12.
671 /* 4-Register Window Overflow Vector (Handler) */
675 s32e a0, a5, -16
676 s32e a1, a5, -12
677 s32e a2, a5, -8
678 s32e a3, a5, -4
685 /* Not a window vector - but a convenient location
696 bbsi.l a0, PS_UM_BIT, 1f # branch if user mode
700 j _UserExceptionVector # simulate user vector exception
704 /* 4-Register Window Underflow Vector (Handler) */
708 l32e a0, a5, -16
709 l32e a1, a5, -12
710 l32e a2, a5, -8
711 l32e a3, a5, -4
716 /* 8-Register Window Overflow Vector (Handler) */
720 s32e a0, a9, -16
721 l32e a0, a1, -12
722 s32e a2, a9, -8
723 s32e a1, a9, -12
724 s32e a3, a9, -4
725 s32e a4, a0, -32
726 s32e a5, a0, -28
727 s32e a6, a0, -24
728 s32e a7, a0, -20
733 /* 8-Register Window Underflow Vector (Handler) */
737 l32e a1, a9, -12
738 l32e a0, a9, -16
739 l32e a7, a1, -12
740 l32e a2, a9, -8
741 l32e a4, a7, -32
742 l32e a3, a9, -4
743 l32e a5, a7, -28
744 l32e a6, a7, -24
745 l32e a7, a7, -20
750 /* 12-Register Window Overflow Vector (Handler) */
754 s32e a0, a13, -16
755 l32e a0, a1, -12
756 s32e a1, a13, -12
757 s32e a2, a13, -8
758 s32e a3, a13, -4
759 s32e a4, a0, -48
760 s32e a5, a0, -44
761 s32e a6, a0, -40
762 s32e a7, a0, -36
763 s32e a8, a0, -32
764 s32e a9, a0, -28
765 s32e a10, a0, -24
766 s32e a11, a0, -20
771 /* 12-Register Window Underflow Vector (Handler) */
775 l32e a1, a13, -12
776 l32e a0, a13, -16
777 l32e a11, a1, -12
778 l32e a2, a13, -8
779 l32e a4, a11, -48
780 l32e a8, a11, -32
781 l32e a3, a13, -4
782 l32e a5, a11, -44
783 l32e a6, a11, -40
784 l32e a7, a11, -36
785 l32e a9, a11, -28
786 l32e a10, a11, -24
787 l32e a11, a11, -20