1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 .globl utrap_trap 1 .globl utrap_trap 3 .type utrap_trap,#function 2 .type utrap_trap,#function 4 utrap_trap: /* %g3=handler,%g4=lev 3 utrap_trap: /* %g3=handler,%g4=level */ 5 TRAP_LOAD_THREAD_REG(%g6, %g1) 4 TRAP_LOAD_THREAD_REG(%g6, %g1) 6 ldx [%g6 + TI_UTRAPS], %g1 5 ldx [%g6 + TI_UTRAPS], %g1 7 brnz,pt %g1, invoke_utrap 6 brnz,pt %g1, invoke_utrap 8 nop 7 nop 9 8 10 ba,pt %xcc, etrap 9 ba,pt %xcc, etrap 11 rd %pc, %g7 10 rd %pc, %g7 12 mov %l4, %o1 11 mov %l4, %o1 13 call bad_trap 12 call bad_trap 14 add %sp, PTREGS_OFF, %o0 13 add %sp, PTREGS_OFF, %o0 15 ba,a,pt %xcc, rtrap !! 14 ba,pt %xcc, rtrap >> 15 nop 16 16 17 invoke_utrap: 17 invoke_utrap: 18 sllx %g3, 3, %g3 18 sllx %g3, 3, %g3 19 ldx [%g1 + %g3], %g1 19 ldx [%g1 + %g3], %g1 20 save %sp, -128, %sp 20 save %sp, -128, %sp 21 rdpr %tstate, %l6 21 rdpr %tstate, %l6 22 rdpr %cwp, %l7 22 rdpr %cwp, %l7 23 andn %l6, TSTATE_CWP, %l6 23 andn %l6, TSTATE_CWP, %l6 24 wrpr %l6, %l7, %tstate 24 wrpr %l6, %l7, %tstate 25 rdpr %tpc, %l6 25 rdpr %tpc, %l6 26 rdpr %tnpc, %l7 26 rdpr %tnpc, %l7 27 wrpr %g1, 0, %tnpc 27 wrpr %g1, 0, %tnpc 28 done 28 done 29 .size utrap_trap,.-utrap_tra 29 .size utrap_trap,.-utrap_trap
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.