📄 ivt.s
字号:
;; SAVE_REST mov rp=r15 ;; br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM and ignore return addr ;; .align 1024/////////////////////////////////////////////////////////////////////////////////////////// 0x4800 Entry 18 (size 64 bundles) Reserved FAULT(18) // 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...dispatch_unaligned_handler: SAVE_MIN_WITH_COVER ;; // // we can't have the alloc while psr.ic is cleared because // we might get a mandatory RSE (when you reach the end of the // rotating partition when doing the alloc) spill which could cause // a page fault on the kernel virtual address and the handler // wouldn't get the state to recover. // mov r15=cr.ifa ssm psr.ic ;; srlz.i // guarantee that interrupt collection is enabled ;;(p15) ssm psr.i // restore psr.i adds r3=8,r2 // set up second base pointer ;; SAVE_REST ;; alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first in insn group!) ;; // avoid WAW on r14 movl r14=ia64_leave_kernel mov out0=r15 // out0 = faulting address adds out1=16,sp // out1 = pointer to pt_regs ;; mov rp=r14 br.sptk.many ia64_prepare_handle_unaligned ;; .align 1024/////////////////////////////////////////////////////////////////////////////////////////// 0x4c00 Entry 19 (size 64 bundles) Reserved FAULT(19) // 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...dispatch_to_fault_handler: // // Input: // psr.ic: off // r19: fault vector number (e.g., 24 for General Exception) // r31: contains saved predicates (pr) // SAVE_MIN_WITH_COVER_R19 // // Copy control registers to temporary registers, then turn on psr bits, // then copy the temporary regs to the output regs. We have to do this // because the "alloc" can cause a mandatory store which could lead to // an "Alt DTLB" fault which we can handle only if psr.ic is on. // mov r8=cr.isr mov r9=cr.ifa mov r10=cr.iim mov r11=cr.itir ;; ssm psr.ic ;; srlz.i // guarantee that interrupt collection is enabled ;;(p15) ssm psr.i // restore psr.i adds r3=8,r2 // set up second base pointer for SAVE_REST ;; alloc r14=ar.pfs,0,0,5,0 // must be first in insn group mov out0=r15 mov out1=r8 mov out2=r9 mov out3=r10 mov out4=r11 ;; SAVE_REST movl r14=ia64_leave_kernel ;; mov rp=r14 br.call.sptk.many b6=ia64_fault ;;//// --- End of long entries, Beginning of short entries// .align 1024/////////////////////////////////////////////////////////////////////////////////////////// 0x5000 Entry 20 (size 16 bundles) Page Not Present (10,22,49) mov r16=cr.ifa rsm psr.dt // The Linux page fault handler doesn't expect non-present pages to be in // the TLB. Flush the existing entry now, so we meet that expectation. mov r17=_PAGE_SIZE_4K<<2 ;; ptc.l r16,r17 ;; mov r31=pr srlz.d br.sptk.many page_fault ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5100 Entry 21 (size 16 bundles) Key Permission (13,25,52) mov r16=cr.ifa rsm psr.dt mov r31=pr ;; srlz.d br.sptk.many page_fault ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5200 Entry 22 (size 16 bundles) Instruction Access Rights (26) mov r16=cr.ifa rsm psr.dt mov r31=pr ;; srlz.d br.sptk.many page_fault ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5300 Entry 23 (size 16 bundles) Data Access Rights (14,53) mov r16=cr.ifa rsm psr.dt mov r31=pr ;; srlz.d br.sptk.many page_fault ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5400 Entry 24 (size 16 bundles) General Exception (5,32,34,36,38,39) mov r16=cr.isr mov r31=pr ;; cmp4.eq p6,p0=0,r16(p6) br.sptk dispatch_illegal_op_fault ;; mov r19=24 // fault number br.sptk.many dispatch_to_fault_handler ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5500 Entry 25 (size 16 bundles) Disabled FP-Register (35) rsm psr.dfh // ensure we can access fph ;; srlz.d mov r31=pr mov r19=25 br.sptk.many dispatch_to_fault_handler ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5600 Entry 26 (size 16 bundles) Nat Consumption (11,23,37,50) FAULT(26) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5700 Entry 27 (size 16 bundles) Speculation (40) // // A [f]chk.[as] instruction needs to take the branch to // the recovery code but this part of the architecture is // not implemented in hardware on some CPUs, such as Itanium. // Thus, in general we need to emulate the behavior. // IIM contains the relative target (not yet sign extended). // So after sign extending it we simply add it to IIP. // We also need to reset the EI field of the IPSR to zero, // i.e., the slot to restart into. // // cr.imm contains zero_ext(imm21) // mov r18=cr.iim ;; mov r17=cr.iip 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 back ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5800 Entry 28 (size 16 bundles) Reserved FAULT(28) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5900 Entry 29 (size 16 bundles) Debug (16,28,56) FAULT(29) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5a00 Entry 30 (size 16 bundles) Unaligned Reference (57) mov r16=cr.ipsr mov r31=pr // prepare to save predicates ;; br.sptk.many dispatch_unaligned_handler ;; .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5b00 Entry 31 (size 16 bundles) Unsupported Data Reference (57) FAULT(31) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5c00 Entry 32 (size 16 bundles) Floating-Point Fault (64) FAULT(32) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5d00 Entry 33 (size 16 bundles) Floating Point Trap (66) FAULT(33) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5e00 Entry 34 (size 16 bundles) Lower Privilege Tranfer Trap (66) FAULT(34) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x5f00 Entry 35 (size 16 bundles) Taken Branch Trap (68) FAULT(35) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6000 Entry 36 (size 16 bundles) Single Step Trap (69) FAULT(36) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6100 Entry 37 (size 16 bundles) Reserved FAULT(37) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6200 Entry 38 (size 16 bundles) Reserved FAULT(38) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6300 Entry 39 (size 16 bundles) Reserved FAULT(39) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6400 Entry 40 (size 16 bundles) Reserved FAULT(40) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6500 Entry 41 (size 16 bundles) Reserved FAULT(41) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6600 Entry 42 (size 16 bundles) Reserved FAULT(42) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6700 Entry 43 (size 16 bundles) Reserved FAULT(43) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6800 Entry 44 (size 16 bundles) Reserved FAULT(44) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 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) FAULT(45) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6a00 Entry 46 (size 16 bundles) IA-32 Intercept (30,31,59,70,71)#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 p2,p0=2,r17(p2) 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 p2,p0=0,r17(p2) br.cond.spnt 1f // eflags.ac bit didn't change ;; mov pr=r31,-1 // restore predicate registers rfi ;;1:#endif // CONFIG_IA32_SUPPORT FAULT(46) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6b00 Entry 47 (size 16 bundles) IA-32 Interrupt (74)#ifdef CONFIG_IA32_SUPPORT mov r31=pr br.sptk.many dispatch_to_ia32_handler ;;#else FAULT(47)#endif .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6c00 Entry 48 (size 16 bundles) Reserved FAULT(48) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6d00 Entry 49 (size 16 bundles) Reserved FAULT(49) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6e00 Entry 50 (size 16 bundles) Reserved FAULT(50) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x6f00 Entry 51 (size 16 bundles) Reserved FAULT(51) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7000 Entry 52 (size 16 bundles) Reserved FAULT(52) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7100 Entry 53 (size 16 bundles) Reserved FAULT(53) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7200 Entry 54 (size 16 bundles) Reserved FAULT(54) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7300 Entry 55 (size 16 bundles) Reserved FAULT(55) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7400 Entry 56 (size 16 bundles) Reserved FAULT(56) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7500 Entry 57 (size 16 bundles) Reserved FAULT(57) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7600 Entry 58 (size 16 bundles) Reserved FAULT(58) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7700 Entry 59 (size 16 bundles) Reserved FAULT(59) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7800 Entry 60 (size 16 bundles) Reserved FAULT(60) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7900 Entry 61 (size 16 bundles) Reserved FAULT(61) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7a00 Entry 62 (size 16 bundles) Reserved FAULT(62) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7b00 Entry 63 (size 16 bundles) Reserved FAULT(63) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7c00 Entry 64 (size 16 bundles) Reserved FAULT(64) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7d00 Entry 65 (size 16 bundles) Reserved FAULT(65) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7e00 Entry 66 (size 16 bundles) Reserved FAULT(66) .align 256/////////////////////////////////////////////////////////////////////////////////////////// 0x7f00 Entry 67 (size 16 bundles) Reserved FAULT(67)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -