summaryrefslogtreecommitdiff
path: root/kernel/syscalls
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-26 21:24:22 +0200
committerAnton Kling <anton@kling.gg>2024-06-26 21:24:22 +0200
commit2e2f89c7508dede2c970e6061c2f66d4536162ca (patch)
tree63b7e2aaad1ecd1ed99b814fe967954f0687acfa /kernel/syscalls
parentedf86881446717b633dbb2aaac7b25dbc4630c3f (diff)
Kernel: Remove unused syscalls
Diffstat (limited to 'kernel/syscalls')
-rw-r--r--kernel/syscalls/install_irq.c23
-rw-r--r--kernel/syscalls/map_frames.c6
-rw-r--r--kernel/syscalls/port.c14
-rw-r--r--kernel/syscalls/virtual_to_physical.c6
4 files changed, 0 insertions, 49 deletions
diff --git a/kernel/syscalls/install_irq.c b/kernel/syscalls/install_irq.c
deleted file mode 100644
index 5ad2ee6..0000000
--- a/kernel/syscalls/install_irq.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <sched/scheduler.h>
-#include <syscalls.h>
-
-process_t *tmp;
-void *handler;
-
-void jump_signal_handler(void *func, u32 esp);
-
-void test_handler(reg_t *regs) {
- tmp->interrupt_handler = handler;
- signal_t sig;
- sig.handler_ip = (uintptr_t)handler;
- process_push_signal(tmp, sig);
- return;
-}
-
-int syscall_install_irq(void (*irq_handler)(), u8 irq) {
- // TODO: This should be able to fail if the handler is already set
- tmp = current_task;
- handler = irq_handler;
- install_handler(test_handler, INT_32_INTERRUPT_GATE(0x0), 0x20 + irq);
- return 1;
-}
diff --git a/kernel/syscalls/map_frames.c b/kernel/syscalls/map_frames.c
deleted file mode 100644
index 1b0d097..0000000
--- a/kernel/syscalls/map_frames.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <mmu.h>
-#include <syscalls.h>
-
-u32 syscall_map_frames(u32 address, u32 size) {
- return (u32)mmu_map_user_frames((void *)address, size);
-}
diff --git a/kernel/syscalls/port.c b/kernel/syscalls/port.c
deleted file mode 100644
index 0a27a5e..0000000
--- a/kernel/syscalls/port.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <syscalls.h>
-
-// FIXME: PERMISSION CHECKS
-void syscall_outw(u16 port, u16 word) {
- outw(port, word);
-}
-
-void syscall_outl(u16 port, u32 l) {
- outl(port, l);
-}
-
-u32 syscall_inl(u16 port) {
- return inl(port);
-}
diff --git a/kernel/syscalls/virtual_to_physical.c b/kernel/syscalls/virtual_to_physical.c
deleted file mode 100644
index e5b3eba..0000000
--- a/kernel/syscalls/virtual_to_physical.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <mmu.h>
-#include <syscalls.h>
-
-u32 syscall_virtual_to_physical(u32 virtual) {
- return (u32)virtual_to_physical((void *)virtual, NULL);
-}