Lines Matching +full:critical +full:- +full:action

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.
50 #include <asm/asm-offsets.h>
92 * jump to the first-level handler associated with the exception cause.
103 addi a2, a1, -16 - PT_KERNEL_SIZE # adjust stack pointer
121 * Note that this vector is never invoked for level-1 interrupts, because such
124 * We decode the exception and take the appropriate action. However, the
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
141 * label, the kernel is in trouble. This mechanism is used to protect critical
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
180 * critical section, so EXC_TABLE_FIXUP variable is set to exc_table.
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
194 * In case of a critical condition where the kernel cannot recover, we jump
225 /* Note: We don't need to indicate that we enter a critical section. */
295 addi a3, a3, -EXCCAUSE_DTLB_MISS
303 /* Critical! We can't handle this situation. PANIC! */
316 .Lfixup:/* Check for a fixup handler or if we were in a critical section. */
320 /* Enter critical section. */
324 beq a2, a3, .Lunrecoverable_fixup # critical section
334 addi a2, a2, -PT_USER_SIZE
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
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
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