aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-08-22 05:56:45 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-08-31 01:20:27 +0000
commitbf71e2e2674547dd2ef554c37de86ee30a54eb50 (patch)
tree56ffd729b6f4bb2c94b906655b78cea3a5485a34 /sys/i386
parent79ceb5107b3ba5d917d529221f00b6087b6dc64d (diff)
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/exception.s17
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s
index 90c3182f9b13..4e347642cc0f 100644
--- a/sys/i386/i386/exception.s
+++ b/sys/i386/i386/exception.s
@@ -236,27 +236,24 @@ irettraps:
jne 2f
/* -8 because exception did not switch ring */
movl $(2 * TF_SZ - TF_EIP - 8), %ecx
- jmp 6f
+ jmp 5f
2: leal (doreti_popl_ds - 1b)(%ebx), %edx
cmpl %edx, TF_EIP(%esp)
jne 3f
movl $(2 * TF_SZ - TF_DS - 8), %ecx
- jmp 6f
+ jmp 5f
3: leal (doreti_popl_es - 1b)(%ebx), %edx
cmpl %edx, TF_EIP(%esp)
jne 4f
movl $(2 * TF_SZ - TF_ES - 8), %ecx
- jmp 6f
+ jmp 5f
4: leal (doreti_popl_fs - 1b)(%ebx), %edx
cmpl %edx, TF_EIP(%esp)
- jne 5f
+ jne calltrap
movl $(2 * TF_SZ - TF_FS - 8), %ecx
jmp 6f
- /* kernel mode, normal */
-5: FAKE_MCOUNT(TF_EIP(%esp))
- jmp calltrap
-6: cmpl $PMAP_TRM_MIN_ADDRESS, %esp /* trampoline stack ? */
- jb 5b /* if not, no need to change stacks */
+5: cmpl $PMAP_TRM_MIN_ADDRESS, %esp /* trampoline stack ? */
+ jb calltrap /* if not, no need to change stacks */
movl (tramp_idleptd - 1b)(%ebx), %eax
movl %eax, %cr3
movl PCPU(KESP0), %edx
@@ -265,7 +262,7 @@ irettraps:
movl %esp, %esi
rep; movsb
movl %edx, %esp
- FAKE_MCOUNT(TF_EIP(%esp))
+ /* kernel mode, normal */
jmp calltrap
/*