1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

disable syscall interface, HermitCore is a libOS...

This commit is contained in:
Stefan Lankes 2016-05-14 22:15:44 +02:00
parent 6e9e4782c0
commit 07fc5e2881
2 changed files with 6 additions and 0 deletions

View file

@ -384,6 +384,8 @@ extern finish_task_switch
extern syscall_handler
extern kernel_stack
; libos => no syscall interface required
%if 0
global isrsyscall
align 16
; used to realize system calls
@ -457,6 +459,7 @@ isrsyscall:
; EFLAGS (and IF flag) will be restored by sysret
; sti
o64 sysret
%endif
global switch_context
align 16

View file

@ -438,6 +438,8 @@ int cpu_detection(void) {
kprintf("Set XCR0 to 0x%llx\n", xgetbv(0));
}
// libos => currently no support of syscalls
#if 0
if (cpu_info.feature3 & CPU_FEATURE_SYSCALL) {
wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_LMA | EFER_LME | EFER_SCE);
wrmsr(MSR_STAR, (0x1BULL << 48) | (0x08ULL << 32));
@ -445,6 +447,7 @@ int cpu_detection(void) {
// clear IF flag during an interrupt
wrmsr(MSR_SYSCALL_MASK, EFLAGS_TF|EFLAGS_DF|EFLAGS_IF|EFLAGS_AC|EFLAGS_NT);
} else kputs("Processor doesn't support syscalls\n");
#endif
if (has_nx())
wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_NXE);