syscall: set MSR_IA32_FMASK to disable RFLAGS.IF
This commit is contained in:
parent
d67c828c6f
commit
8b6e1c6342
3 changed files with 3 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
#define MSR_IA32_EFER 0xC0000080
|
#define MSR_IA32_EFER 0xC0000080
|
||||||
#define MSR_IA32_STAR 0xC0000081
|
#define MSR_IA32_STAR 0xC0000081
|
||||||
#define MSR_IA32_LSTAR 0xC0000082
|
#define MSR_IA32_LSTAR 0xC0000082
|
||||||
|
#define MSR_IA32_FMASK 0xC0000084
|
||||||
|
|
||||||
#ifndef __ASM__
|
#ifndef __ASM__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,6 @@ irq 0x0F
|
||||||
|
|
||||||
.global gate_syscall
|
.global gate_syscall
|
||||||
gate_syscall:
|
gate_syscall:
|
||||||
cli
|
|
||||||
pushq %r11
|
pushq %r11
|
||||||
pushq %rcx
|
pushq %rcx
|
||||||
movq %r10, %rcx
|
movq %r10, %rcx
|
||||||
|
|
|
||||||
|
|
@ -192,4 +192,6 @@ void syscall_init()
|
||||||
|
|
||||||
uint64_t efer = rdmsr(MSR_IA32_EFER);
|
uint64_t efer = rdmsr(MSR_IA32_EFER);
|
||||||
wrmsr(MSR_IA32_EFER, efer | 0x1);
|
wrmsr(MSR_IA32_EFER, efer | 0x1);
|
||||||
|
|
||||||
|
wrmsr(MSR_IA32_FMASK, 0x200); /* disable interrupts */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue