aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall
diff options
context:
space:
mode:
authorMarvin Borner2019-12-21 22:22:03 +0100
committerMarvin Borner2019-12-21 22:22:03 +0100
commit499784a824c541001c2fd52ae95eba88dcfc952b (patch)
treec3c26d7c8a3b9291d909f4655b7d27a5ae2369bc /src/kernel/syscall
parent38610cd06dc0b5a3a4ee46f5fe7c341191aa2bc1 (diff)
Many debugging/serial improvements
Sorry for the little information, but I did many things :)
Diffstat (limited to 'src/kernel/syscall')
-rw-r--r--src/kernel/syscall/actions/sys_paging_alloc.c1
-rw-r--r--src/kernel/syscall/actions/sys_read.c1
-rw-r--r--src/kernel/syscall/actions/sys_write.c2
-rw-r--r--src/kernel/syscall/syscall.c7
4 files changed, 4 insertions, 7 deletions
diff --git a/src/kernel/syscall/actions/sys_paging_alloc.c b/src/kernel/syscall/actions/sys_paging_alloc.c
index fb4e415..57ffd39 100644
--- a/src/kernel/syscall/actions/sys_paging_alloc.c
+++ b/src/kernel/syscall/actions/sys_paging_alloc.c
@@ -1,6 +1,5 @@
#include <stdint.h>
#include <kernel/paging/paging.h>
-#include <kernel/io/io.h>
uint32_t sys_paging_alloc(uint32_t count)
{
diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c
index 83e645c..ed2cca8 100644
--- a/src/kernel/syscall/actions/sys_read.c
+++ b/src/kernel/syscall/actions/sys_read.c
@@ -3,7 +3,6 @@
#include <kernel/input/input.h>
#include <kernel/lib/lib.h>
#include <kernel/lib/string.h>
-#include <kernel/io/io.h>
uint32_t sys_read(char *buf)
{
diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c
index d395384..76d88b8 100644
--- a/src/kernel/syscall/actions/sys_write.c
+++ b/src/kernel/syscall/actions/sys_write.c
@@ -1,7 +1,6 @@
#include <stdint.h>
#include <kernel/lib/stdio.h>
#include <kernel/lib/string.h>
-#include <kernel/io/io.h>
uint32_t sys_write(char *buf)
{
@@ -11,7 +10,6 @@ uint32_t sys_write(char *buf)
uint32_t sys_writec(char ch)
{
- serial_write_hex(ch);
writec((char) ch);
return 0;
} \ No newline at end of file
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c
index 7d5420d..5f32c42 100644
--- a/src/kernel/syscall/syscall.c
+++ b/src/kernel/syscall/syscall.c
@@ -1,9 +1,8 @@
#include <stdint.h>
#include <kernel/syscall/syscall.h>
#include <kernel/interrupts/interrupts.h>
-#include <kernel/io/io.h>
-#include <kernel/paging/paging.h>
#include <kernel/system.h>
+#include <kernel/lib/stdio.h>
typedef uint32_t (*syscall_func)(unsigned int, ...);
@@ -20,7 +19,7 @@ uint32_t (*syscalls[])() = {
void syscall_handler(struct regs *r)
{
- serial_write("Received syscall!\n");
+ serial_printf("Received syscall!");
if (r->eax >= sizeof(syscalls) / sizeof(*syscalls))
return;
@@ -29,6 +28,8 @@ void syscall_handler(struct regs *r)
if (!location)
return;
+ //serial_printf("[SYSCALL] %d (0x%x) 0x%x 0x%x 0x%x 0x%x 0x%x", r->eax, location, r->ebx, r->ecx, r->edx, r->esi, r->edi);
+
r->eax = location(r->ebx, r->ecx, r->edx, r->esi, r->edi);
}