summaryrefslogtreecommitdiffstats
path: root/sys/amd64/ia32/ia32_syscall.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-08-14 12:13:27 +0000
committerkib <kib@FreeBSD.org>2012-08-14 12:13:27 +0000
commit11621fbf7f3f18c2e71e0074b0e680b15336b0bf (patch)
tree7bb420f2d577b4d2e7bfc7cfc550520c2900bbad /sys/amd64/ia32/ia32_syscall.c
parentce7012daf678de596b53c1e821e48de660277708 (diff)
downloadFreeBSD-src-11621fbf7f3f18c2e71e0074b0e680b15336b0bf.zip
FreeBSD-src-11621fbf7f3f18c2e71e0074b0e680b15336b0bf.tar.gz
Real hardware, as opposed to QEMU, does not allow to have a call gate
in long mode which transfers control to 32bit code segment. Unbreak the lcall $7,$0 implementation on amd64 by putting the 64bit user code segment' selector into call gate, and execute the 64bit trampoline which converts the return frame into 32bit format and switches back to 32bit mode for executing int $0x80 trampoline. Note that all jumps over the hoops are performed in the user mode. MFC after: 1 week
Diffstat (limited to 'sys/amd64/ia32/ia32_syscall.c')
-rw-r--r--sys/amd64/ia32/ia32_syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c
index d79272a..0cdec6f 100644
--- a/sys/amd64/ia32/ia32_syscall.c
+++ b/sys/amd64/ia32/ia32_syscall.c
@@ -244,7 +244,7 @@ setup_lcall_gate(void)
bzero(ssd, sizeof(*ssd));
ssd->gd_looffset = lcall_addr;
ssd->gd_hioffset = lcall_addr >> 16;
- ssd->gd_selector = _ucode32sel;
+ ssd->gd_selector = _ucodesel;
ssd->gd_type = SDT_SYSCGT;
ssd->gd_dpl = SEL_UPL;
ssd->gd_p = 1;
OpenPOWER on IntegriCloud