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

remove obsolete code to handle classical syscalls

This commit is contained in:
Stefan Lankes 2016-09-22 12:30:05 +02:00
parent 754ba6c8fe
commit 01f0862aa7
2 changed files with 0 additions and 98 deletions

View file

@ -416,83 +416,6 @@ extern finish_task_switch
extern syscall_handler
extern kernel_stack
; libos => no syscall interface required
%if 0
global isrsyscall
align 64
; used to realize system calls
isrsyscall:
; IF flag is already cleared
; cli
; only called from user space => get kernel-level selector
swapgs
; get kernel stack
xchg rsp, [gs:kernel_stack]
; push old rsp and restore [gs:kernel_stack]
push QWORD [gs:kernel_stack]
mov QWORD [gs:kernel_stack], rsp
; save registers accross function call
push r8
push r9
push r10
push r11
push rdx
push rcx
push rdi
push rsi
; syscall stores in rcx the return address
; => using of r10 for the temporary storage of the 4th argument
mov rcx, r10
; during a system call, HermitCore allows interrupts
sti
extern syscall_table
call [rax*8+syscall_table]
push rax ; result, which we have to return
%ifdef DYNAMIC_TICKS
extern check_ticks
call check_ticks
%endif
extern check_timers
call check_timers
extern check_scheduling
call check_scheduling
cli
; restore return value
pop rax
; restore registers
pop rsi
pop rdi
pop rcx
pop rdx
pop r11
pop r10
pop r9
pop r8
; restore user-level stack
mov rsp, [rsp]
; set user-level selector
swapgs
; EFLAGS (and IF flag) will be restored by sysret
; sti
o64 sysret
%endif
global getcontext
align 64
getcontext:

View file

@ -643,24 +643,3 @@ int sys_signal(signal_handler_t handler)
{
return hermit_signal(handler);
}
static int default_handler(void)
{
#if 1
kprintf("Invalid system call\n");
#else
uint64_t rax;
asm volatile ("mov %%rax, %0" : "=m"(rax) :: "memory");
kprintf("Invalid system call: %zd\n", rax);
#endif
return -ENOSYS;
}
/*
* Currently our sytemcall table is a dummy table for
* future developments.
*/
size_t syscall_table[] = {
(size_t) default_handler
};