summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/sys
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/sys')
-rw-r--r--arch/x86_64/sys/syscall.c6
-rw-r--r--arch/x86_64/sys/syscall_serial.c33
2 files changed, 4 insertions, 35 deletions
diff --git a/arch/x86_64/sys/syscall.c b/arch/x86_64/sys/syscall.c
index 1e06e61..2a5ce08 100644
--- a/arch/x86_64/sys/syscall.c
+++ b/arch/x86_64/sys/syscall.c
@@ -6,7 +6,7 @@
#include "syscall.h"
syscall_handle_t s_arch_handles[128] = {
- [JOVE_OBJ_SERIAL_COM-0x80] = _syscall_handle_serial
+ NULL
};
int
@@ -50,5 +50,7 @@ void _syscall_entry(void)
sysretq"
::
[pcb] "i"(offsetof(processor_t, pcb)),
- [ksp] "i"(offsetof(struct pcb_header, ksp)));
+ [ksp] "i"(offsetof(struct pcb_header, ksp))
+ : "memory");
}
+
diff --git a/arch/x86_64/sys/syscall_serial.c b/arch/x86_64/sys/syscall_serial.c
deleted file mode 100644
index 786a78b..0000000
--- a/arch/x86_64/sys/syscall_serial.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "jove.h"
-#include "lib/printf.h"
-#include "sys/syscall.h"
-#include "syscall.h"
-#include "arch/x86_64/hal/serial_com.h"
-
-static int
-s_syscall_serial_write(
- jove_owned_obj_t *serial_com,
- size_t payload_bytes,
- void *payload_data)
-{
- size_t bytes_needed = sizeof(struct syscall_generic_write);
- CHECK_TOOSMALL(bytes_needed, payload_bytes, "Message is too small for this syscall!");
-
- struct syscall_generic_write *payload = payload_data;
- bytes_needed += payload->len * 2;
- CHECK_TOOSMALL(bytes_needed, payload_bytes, "Message is too small for write buffer!");
-
- return serial_com_write(serial_com, payload->data, payload->len);
-}
-
-int
-_syscall_handle_serial(syscall_context_t *ctx)
-{
- switch(ctx->header->callid) {
- case SYSCALL_SERIAL_COM_WRITE:
- return s_syscall_serial_write(ctx->target.obj, ctx->bytes_left, ctx->payload);
- default:
- kprintf("syscall_serial: serial com object does not support syscall %i\n", ctx->header->callid);
- return -EBADCALL;
- }
-}