Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/exception.s
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||||||
IDTVEC(stk) | IDTVEC(stk) | ||||||||
pushl $T_STKFLT | pushl $T_STKFLT | ||||||||
jmp irettraps | jmp irettraps | ||||||||
IDTVEC(prot) | IDTVEC(prot) | ||||||||
pushl $T_PROTFLT | pushl $T_PROTFLT | ||||||||
jmp irettraps | jmp irettraps | ||||||||
IDTVEC(page) | IDTVEC(page) | ||||||||
testl $PSL_VM, TF_EFLAGS-TF_ERR(%esp) | testl $PSL_VM, TF_EFLAGS-TF_ERR(%esp) | ||||||||
jnz 1f | jnz 4f | ||||||||
testb $SEL_RPL_MASK, TF_CS-TF_ERR(%esp) | testb $SEL_RPL_MASK, TF_CS-TF_ERR(%esp) | ||||||||
jnz 1f | jnz 4f | ||||||||
cmpl $PMAP_TRM_MIN_ADDRESS, TF_EIP-TF_ERR(%esp) | cmpl $PMAP_TRM_MIN_ADDRESS, TF_EIP-TF_ERR(%esp) | ||||||||
jb 1f | jb 4f | ||||||||
pushl %eax | |||||||||
movl TF_EIP-TF_ERR+4(%esp), %eax | |||||||||
addl $1f, %eax | |||||||||
call 5f | |||||||||
1: cmpl $pf_x1, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x2, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x3, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x4, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x5, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x6, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x7, %eax | |||||||||
je 2f | |||||||||
cmpl $pf_x8, %eax | |||||||||
jne 3f | |||||||||
2: popl %eax | |||||||||
movl %ebx, %cr3 | movl %ebx, %cr3 | ||||||||
movl %edx, TF_EIP-TF_ERR(%esp) | movl %edx, TF_EIP-TF_ERR(%esp) | ||||||||
addl $4, %esp | addl $4, %esp | ||||||||
iret | iret | ||||||||
1: pushl $T_PAGEFLT | 3: popl %eax | ||||||||
4: pushl $T_PAGEFLT | |||||||||
jmp alltraps | jmp alltraps | ||||||||
5: subl (%esp), %eax | |||||||||
retl | |||||||||
IDTVEC(rsvd_pti) | IDTVEC(rsvd_pti) | ||||||||
IDTVEC(rsvd) | IDTVEC(rsvd) | ||||||||
pushl $0; TRAP(T_RESERVED) | pushl $0; TRAP(T_RESERVED) | ||||||||
IDTVEC(fpu) | IDTVEC(fpu) | ||||||||
pushl $0; TRAP(T_ARITHTRAP) | pushl $0; TRAP(T_ARITHTRAP) | ||||||||
IDTVEC(align) | IDTVEC(align) | ||||||||
TRAP(T_ALIGNFLT) | TRAP(T_ALIGNFLT) | ||||||||
IDTVEC(xmm) | IDTVEC(xmm) | ||||||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | irettraps: | ||||||||
SET_KERNEL_SREGS | SET_KERNEL_SREGS | ||||||||
cld | cld | ||||||||
call 1f | call 1f | ||||||||
1: popl %ebx | 1: popl %ebx | ||||||||
leal (doreti_iret - 1b)(%ebx), %edx | leal (doreti_iret - 1b)(%ebx), %edx | ||||||||
cmpl %edx, TF_EIP(%esp) | cmpl %edx, TF_EIP(%esp) | ||||||||
jne 2f | jne 2f | ||||||||
movl $(2 * TF_SZ - TF_EIP), %ecx | movl $(2 * TF_SZ - TF_EIP), %ecx | ||||||||
jmp 6f | jmp 6f | ||||||||
jhbUnsubmitted Done Inline Actions
jhb: | |||||||||
2: leal (doreti_popl_ds - 1b)(%ebx), %edx | 2: leal (doreti_popl_ds - 1b)(%ebx), %edx | ||||||||
cmpl %edx, TF_EIP(%esp) | cmpl %edx, TF_EIP(%esp) | ||||||||
jne 3f | jne 3f | ||||||||
movl $(2 * TF_SZ - TF_DS), %ecx | movl $(2 * TF_SZ - TF_DS), %ecx | ||||||||
jmp 6f | jmp 6f | ||||||||
3: leal (doreti_popl_es - 1b)(%ebx), %edx | 3: leal (doreti_popl_es - 1b)(%ebx), %edx | ||||||||
cmpl %edx, TF_EIP(%esp) | cmpl %edx, TF_EIP(%esp) | ||||||||
jne 4f | jne 4f | ||||||||
▲ Show 20 Lines • Show All 425 Lines • Show Last 20 Lines |