]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Real hardware, as opposed to QEMU, does not allow to have a call gate
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 14 Aug 2012 12:13:27 +0000 (12:13 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 14 Aug 2012 12:13:27 +0000 (12:13 +0000)
commit95fd15898b4a6d6f0195c86d74bd34dbf0238813
tree7bb420f2d577b4d2e7bfc7cfc550520c2900bbad
parentee4116b8f7aab38071f1ff2c0d184dd1bad58e64
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
sys/amd64/ia32/ia32_sigtramp.S
sys/amd64/ia32/ia32_syscall.c