diff options
author | peter <peter@FreeBSD.org> | 2002-07-28 00:27:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-28 00:27:51 +0000 |
commit | f34d68bd30d9966bde9e47c025fd5e56fb0d24fa (patch) | |
tree | b089356a269b80c0c74051d75508571b1fe52082 /sys/amd64 | |
parent | f1f241d7d09cd8620719e52c2ce53cf4ca34a43d (diff) | |
download | FreeBSD-src-f34d68bd30d9966bde9e47c025fd5e56fb0d24fa.zip FreeBSD-src-f34d68bd30d9966bde9e47c025fd5e56fb0d24fa.tar.gz |
Unwind the syscall_with_err_pushed tweak that jake did some time back.
OK'ed by: jake
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/db_trace.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/exception.S | 16 | ||||
-rw-r--r-- | sys/amd64/amd64/exception.s | 16 |
3 files changed, 31 insertions, 5 deletions
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index f34747c..8ac4c01 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -226,7 +226,9 @@ db_nextframe(fp, ip, p) } else if (!strncmp(name, "Xintr", 5) || !strncmp(name, "Xfastintr", 9)) { frame_type = INTERRUPT; - } else if (!strcmp(name, "syscall_with_err_pushed")) { + } else if (!strcmp(name, "Xlcall_syscall")) { + frame_type = SYSCALL; + } else if (!strcmp(name, "Xint0x80_syscall")) { frame_type = SYSCALL; } } diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index 89bfb13..8eeacbc 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -191,7 +191,20 @@ IDTVEC(lcall_syscall) pushfl /* save eflags */ popl 8(%esp) /* shuffle into tf_eflags */ pushl $7 /* sizeof "lcall 7,0" */ - jmp syscall_with_err_pushed + subl $4,%esp /* skip over tf_trapno */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + FAKE_MCOUNT(13*4(%esp)) + call syscall + MEXITCOUNT + jmp doreti /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) @@ -203,7 +216,6 @@ IDTVEC(lcall_syscall) SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ -syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s index 89bfb13..8eeacbc 100644 --- a/sys/amd64/amd64/exception.s +++ b/sys/amd64/amd64/exception.s @@ -191,7 +191,20 @@ IDTVEC(lcall_syscall) pushfl /* save eflags */ popl 8(%esp) /* shuffle into tf_eflags */ pushl $7 /* sizeof "lcall 7,0" */ - jmp syscall_with_err_pushed + subl $4,%esp /* skip over tf_trapno */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + FAKE_MCOUNT(13*4(%esp)) + call syscall + MEXITCOUNT + jmp doreti /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) @@ -203,7 +216,6 @@ IDTVEC(lcall_syscall) SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ -syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds |