Nographic mode, fix userspace transition by setting kernel TLS back on syscall
This commit is contained in:
parent
fb0df8530d
commit
a5d79d7957
1 changed files with 48 additions and 16 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue