matos/core/syscall.c
Mathieu Maret 75dbbdb53b Wrap IRQ, Exception, cpu_context to be ready for user
Fix ASM where ebp was push 2 times.
One by pushw ebp
One by pushal later
2021-10-27 00:14:22 +02:00

22 lines
403 B
C

#include "syscall.h"
#include "irq.h"
#include "idt.h"
extern void syscallHandler();
int syscallSetup(){
uint32_t flags, ret;
disable_IRQs(flags);
ret = idt_set_handler(SYSCALL_INTR_NB, (vaddr_t)syscallHandler, 3);
restore_IRQs(flags);
return ret;
}
int syscall_execute(int syscallId, const struct cpu_state *user_ctx){
(void)syscallId;
(void)user_ctx;
return 0;
}