Nographic mode, fix userspace transition by setting kernel TLS back on syscall

This commit is contained in:
Jeremy Soller 2016-09-08 15:45:26 -06:00
commit a5d79d7957

View file

@ -22,8 +22,19 @@ pub unsafe extern fn syscall() {
asm!("xchg bx, bx" : : "{rax}"(a) : : "intel", "volatile");
}
asm!("xchg bx, bx
push fs
push rax
mov rax, 0x18
mov fs, ax
pop rax"
: : : : "intel", "volatile");
inner();
// Interrupt return
asm!("iretq" : : : : "intel", "volatile");
asm!("xchg bx, bx
pop fs
iretq"
: : : : "intel", "volatile");
}