📄 ivt.s
字号:
shl r18=r18,43 // put sign bit in position (43=64-21) ;; mov r16=cr.ipsr shr r18=r18,39 // sign extend (39=43-4) ;; add r17=r17,r18 // now add the offset ;; mov cr.iip=r17 dep r16=0,r16,41,2 // clear EI ;; mov cr.ipsr=r16 ;; rfi // and go backEND(speculation_vector) .org ia64_ivt+0x5800/////////////////////////////////////////////////////////////////////////////////////////// 0x5800 Entry 28 (size 16 bundles) Reserved DBG_FAULT(28) FAULT(28) .org ia64_ivt+0x5900/////////////////////////////////////////////////////////////////////////////////////////// 0x5900 Entry 29 (size 16 bundles) Debug (16,28,56)ENTRY(debug_vector) DBG_FAULT(29) FAULT(29)END(debug_vector) .org ia64_ivt+0x5a00/////////////////////////////////////////////////////////////////////////////////////////// 0x5a00 Entry 30 (size 16 bundles) Unaligned Reference (57)ENTRY(unaligned_access) DBG_FAULT(30) mov r16=cr.ipsr mov r31=pr // prepare to save predicates ;; br.sptk.many dispatch_unaligned_handlerEND(unaligned_access) .org ia64_ivt+0x5b00/////////////////////////////////////////////////////////////////////////////////////////// 0x5b00 Entry 31 (size 16 bundles) Unsupported Data Reference (57)ENTRY(unsupported_data_reference) DBG_FAULT(31) FAULT(31)END(unsupported_data_reference) .org ia64_ivt+0x5c00/////////////////////////////////////////////////////////////////////////////////////////// 0x5c00 Entry 32 (size 16 bundles) Floating-Point Fault (64)ENTRY(floating_point_fault) DBG_FAULT(32) FAULT(32)END(floating_point_fault) .org ia64_ivt+0x5d00/////////////////////////////////////////////////////////////////////////////////////////// 0x5d00 Entry 33 (size 16 bundles) Floating Point Trap (66)ENTRY(floating_point_trap) DBG_FAULT(33) FAULT(33)END(floating_point_trap) .org ia64_ivt+0x5e00/////////////////////////////////////////////////////////////////////////////////////////// 0x5e00 Entry 34 (size 16 bundles) Lower Privilege Transfer Trap (66)ENTRY(lower_privilege_trap) DBG_FAULT(34) FAULT(34)END(lower_privilege_trap) .org ia64_ivt+0x5f00/////////////////////////////////////////////////////////////////////////////////////////// 0x5f00 Entry 35 (size 16 bundles) Taken Branch Trap (68)ENTRY(taken_branch_trap) DBG_FAULT(35) FAULT(35)END(taken_branch_trap) .org ia64_ivt+0x6000/////////////////////////////////////////////////////////////////////////////////////////// 0x6000 Entry 36 (size 16 bundles) Single Step Trap (69)ENTRY(single_step_trap) DBG_FAULT(36) FAULT(36)END(single_step_trap) .org ia64_ivt+0x6100/////////////////////////////////////////////////////////////////////////////////////////// 0x6100 Entry 37 (size 16 bundles) Reserved DBG_FAULT(37) FAULT(37) .org ia64_ivt+0x6200/////////////////////////////////////////////////////////////////////////////////////////// 0x6200 Entry 38 (size 16 bundles) Reserved DBG_FAULT(38) FAULT(38) .org ia64_ivt+0x6300/////////////////////////////////////////////////////////////////////////////////////////// 0x6300 Entry 39 (size 16 bundles) Reserved DBG_FAULT(39) FAULT(39) .org ia64_ivt+0x6400/////////////////////////////////////////////////////////////////////////////////////////// 0x6400 Entry 40 (size 16 bundles) Reserved DBG_FAULT(40) FAULT(40) .org ia64_ivt+0x6500/////////////////////////////////////////////////////////////////////////////////////////// 0x6500 Entry 41 (size 16 bundles) Reserved DBG_FAULT(41) FAULT(41) .org ia64_ivt+0x6600/////////////////////////////////////////////////////////////////////////////////////////// 0x6600 Entry 42 (size 16 bundles) Reserved DBG_FAULT(42) FAULT(42) .org ia64_ivt+0x6700/////////////////////////////////////////////////////////////////////////////////////////// 0x6700 Entry 43 (size 16 bundles) Reserved DBG_FAULT(43) FAULT(43) .org ia64_ivt+0x6800/////////////////////////////////////////////////////////////////////////////////////////// 0x6800 Entry 44 (size 16 bundles) Reserved DBG_FAULT(44) FAULT(44) .org ia64_ivt+0x6900/////////////////////////////////////////////////////////////////////////////////////////// 0x6900 Entry 45 (size 16 bundles) IA-32 Exeception (17,18,29,41,42,43,44,58,60,61,62,72,73,75,76,77)ENTRY(ia32_exception) DBG_FAULT(45) FAULT(45)END(ia32_exception) .org ia64_ivt+0x6a00/////////////////////////////////////////////////////////////////////////////////////////// 0x6a00 Entry 46 (size 16 bundles) IA-32 Intercept (30,31,59,70,71)ENTRY(ia32_intercept) DBG_FAULT(46)#ifdef CONFIG_IA32_SUPPORT mov r31=pr mov r16=cr.isr ;; extr.u r17=r16,16,8 // get ISR.code mov r18=ar.eflag mov r19=cr.iim // old eflag value ;; cmp.ne p6,p0=2,r17(p6) br.cond.spnt 1f // not a system flag fault xor r16=r18,r19 ;; extr.u r17=r16,18,1 // get the eflags.ac bit ;; cmp.eq p6,p0=0,r17(p6) br.cond.spnt 1f // eflags.ac bit didn't change ;; mov pr=r31,-1 // restore predicate registers rfi1:#endif // CONFIG_IA32_SUPPORT FAULT(46)END(ia32_intercept) .org ia64_ivt+0x6b00/////////////////////////////////////////////////////////////////////////////////////////// 0x6b00 Entry 47 (size 16 bundles) IA-32 Interrupt (74)ENTRY(ia32_interrupt) DBG_FAULT(47)#ifdef CONFIG_IA32_SUPPORT mov r31=pr br.sptk.many dispatch_to_ia32_handler#else FAULT(47)#endifEND(ia32_interrupt) .org ia64_ivt+0x6c00/////////////////////////////////////////////////////////////////////////////////////////// 0x6c00 Entry 48 (size 16 bundles) Reserved DBG_FAULT(48) FAULT(48) .org ia64_ivt+0x6d00/////////////////////////////////////////////////////////////////////////////////////////// 0x6d00 Entry 49 (size 16 bundles) Reserved DBG_FAULT(49) FAULT(49) .org ia64_ivt+0x6e00/////////////////////////////////////////////////////////////////////////////////////////// 0x6e00 Entry 50 (size 16 bundles) Reserved DBG_FAULT(50) FAULT(50) .org ia64_ivt+0x6f00/////////////////////////////////////////////////////////////////////////////////////////// 0x6f00 Entry 51 (size 16 bundles) Reserved DBG_FAULT(51) FAULT(51) .org ia64_ivt+0x7000/////////////////////////////////////////////////////////////////////////////////////////// 0x7000 Entry 52 (size 16 bundles) Reserved DBG_FAULT(52) FAULT(52) .org ia64_ivt+0x7100/////////////////////////////////////////////////////////////////////////////////////////// 0x7100 Entry 53 (size 16 bundles) Reserved DBG_FAULT(53) FAULT(53) .org ia64_ivt+0x7200/////////////////////////////////////////////////////////////////////////////////////////// 0x7200 Entry 54 (size 16 bundles) Reserved DBG_FAULT(54) FAULT(54) .org ia64_ivt+0x7300/////////////////////////////////////////////////////////////////////////////////////////// 0x7300 Entry 55 (size 16 bundles) Reserved DBG_FAULT(55) FAULT(55) .org ia64_ivt+0x7400/////////////////////////////////////////////////////////////////////////////////////////// 0x7400 Entry 56 (size 16 bundles) Reserved DBG_FAULT(56) FAULT(56) .org ia64_ivt+0x7500/////////////////////////////////////////////////////////////////////////////////////////// 0x7500 Entry 57 (size 16 bundles) Reserved DBG_FAULT(57) FAULT(57) .org ia64_ivt+0x7600/////////////////////////////////////////////////////////////////////////////////////////// 0x7600 Entry 58 (size 16 bundles) Reserved DBG_FAULT(58) FAULT(58) .org ia64_ivt+0x7700/////////////////////////////////////////////////////////////////////////////////////////// 0x7700 Entry 59 (size 16 bundles) Reserved DBG_FAULT(59) FAULT(59) .org ia64_ivt+0x7800/////////////////////////////////////////////////////////////////////////////////////////// 0x7800 Entry 60 (size 16 bundles) Reserved DBG_FAULT(60) FAULT(60) .org ia64_ivt+0x7900/////////////////////////////////////////////////////////////////////////////////////////// 0x7900 Entry 61 (size 16 bundles) Reserved DBG_FAULT(61) FAULT(61) .org ia64_ivt+0x7a00/////////////////////////////////////////////////////////////////////////////////////////// 0x7a00 Entry 62 (size 16 bundles) Reserved DBG_FAULT(62) FAULT(62) .org ia64_ivt+0x7b00/////////////////////////////////////////////////////////////////////////////////////////// 0x7b00 Entry 63 (size 16 bundles) Reserved DBG_FAULT(63) FAULT(63) .org ia64_ivt+0x7c00/////////////////////////////////////////////////////////////////////////////////////////// 0x7c00 Entry 64 (size 16 bundles) Reserved DBG_FAULT(64) FAULT(64) .org ia64_ivt+0x7d00/////////////////////////////////////////////////////////////////////////////////////////// 0x7d00 Entry 65 (size 16 bundles) Reserved DBG_FAULT(65) FAULT(65) .org ia64_ivt+0x7e00/////////////////////////////////////////////////////////////////////////////////////////// 0x7e00 Entry 66 (size 16 bundles) Reserved DBG_FAULT(66) FAULT(66) .org ia64_ivt+0x7f00/////////////////////////////////////////////////////////////////////////////////////////// 0x7f00 Entry 67 (size 16 bundles) Reserved DBG_FAULT(67) FAULT(67)#ifdef CONFIG_IA32_SUPPORT /* * There is no particular reason for this code to be here, other than that * there happens to be space here that would go unused otherwise. If this * fault ever gets "unreserved", simply moved the following code to a more * suitable spot... */ // IA32 interrupt entry pointENTRY(dispatch_to_ia32_handler) SAVE_MIN ;; mov r14=cr.isr ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interruption collection is on ;;(p15) ssm psr.i adds r3=8,r2 // Base pointer for SAVE_REST ;; SAVE_REST ;; mov r15=0x80 shr r14=r14,16 // Get interrupt number ;; cmp.ne p6,p0=r14,r15(p6) br.call.dpnt.many b6=non_ia32_syscall adds r14=IA64_PT_REGS_R8_OFFSET + 16,sp // 16 byte hole per SW conventions adds r15=IA64_PT_REGS_R1_OFFSET + 16,sp ;; cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 ld8 r8=[r14] // get r8 ;; st8 [r15]=r8 // save original EAX in r1 (IA32 procs don't use the GP) ;; alloc r15=ar.pfs,0,0,6,0 // must first in an insn group ;; ld4 r8=[r14],8 // r8 == eax (syscall number) mov r15=IA32_NR_syscalls ;; cmp.ltu.unc p6,p7=r8,r15 ld4 out1=[r14],8 // r9 == ecx ;; ld4 out2=[r14],8 // r10 == edx ;; ld4 out0=[r14] // r11 == ebx adds r14=(IA64_PT_REGS_R13_OFFSET) + 16,sp ;; ld4 out5=[r14],PT(R14)-PT(R13) // r13 == ebp ;; ld4 out3=[r14],PT(R15)-PT(R14) // r14 == esi adds r2=TI_FLAGS+IA64_TASK_SIZE,r13 ;; ld4 out4=[r14] // r15 == edi movl r16=ia32_syscall_table ;;(p6) shladd r16=r8,3,r16 // force ni_syscall if not valid syscall number ld4 r2=[r2] // r2 = current_thread_info()->flags ;; ld8 r16=[r16] and r2=_TIF_SYSCALL_TRACEAUDIT,r2 // mask trace or audit ;; mov b6=r16 movl r15=ia32_ret_from_syscall cmp.eq p8,p0=r2,r0 ;; mov rp=r15(p8) br.call.sptk.many b6=b6 br.cond.sptk ia32_trace_syscallnon_ia32_syscall: alloc r15=ar.pfs,0,0,2,0 mov out0=r14 // interrupt # add out1=16,sp // pointer to pt_regs ;; // avoid WAW on CFM br.call.sptk.many rp=ia32_bad_interrupt.ret1: movl r15=ia64_leave_kernel ;; mov rp=r15 br.ret.sptk.many rpEND(dispatch_to_ia32_handler)#endif /* CONFIG_IA32_SUPPORT */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -