summaryrefslogtreecommitdiffstats
path: root/abi
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-03-19 13:03:52 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-03-19 13:03:52 -0400
commitf004c1ade8d617a82cea2fe249434cccb47a2358 (patch)
tree34571e76039cf2ee2fee93c3f1bdb1bc6d2de5f6 /abi
parentdd5d9e1d48396cbc226ff14fe557a55613c91fcb (diff)
downloadjove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.gz
jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.bz2
jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.zip
rename abi to sys. better memory allocation
Diffstat (limited to 'abi')
-rw-r--r--abi/permission.h8
-rw-r--r--abi/syscall.h48
2 files changed, 0 insertions, 56 deletions
diff --git a/abi/permission.h b/abi/permission.h
deleted file mode 100644
index 10bc6a3..0000000
--- a/abi/permission.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef JOVE_ABI_PERMISSION_H
-#define JOVE_ABI_PERMISSION_H 1
-
-#define PERM_MEM_PD 1 /* Permission to write to any PD. */
-#define PERM_MEM_MAP 2 /* Permission to map physical pages. */
-#define PERM_MEM_ALLOC 4 /* Permission to allocate and free physical memory.*/
-
-#endif
diff --git a/abi/syscall.h b/abi/syscall.h
deleted file mode 100644
index e336fe6..0000000
--- a/abi/syscall.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef JOVE_ABI_SYSCALL_H
-#define JOVE_ABI_SYSCALL_H 1
-
-#include <stdint.h>
-
-typedef struct syscall {
- int id;
-} syscall_t;
-
-struct syscall_log {
- syscall_t syscall;
- const char *message;
-};
-
-struct syscall_mem_takefree {
- syscall_t syscall;
- uintptr_t npages;
-};
-
-enum
-{
- SYSCALL_LOG = 0,
- SYSCALL_TID,
-
- SYSCALL_MEM_TAKEFREE,
-
- SYSCALL_COUNT
-};
-
-#define _SYSCALL(data) \
- intmax_t ax; \
- __asm__ volatile("movq %0, %%rdi\nsyscall": "=a"(ax): "r"(data): "memory"); \
- return ax
-
-int _syscall_log(const char *message) {
- struct syscall_log syscall_data = {
- .syscall = (syscall_t){ .id = SYSCALL_LOG },
- .message = message
- };
- _SYSCALL(&syscall_data);
-}
-
-intmax_t _syscall_tid(void) {
- syscall_t syscall_data = { SYSCALL_TID };
- _SYSCALL(&syscall_data);
-}
-
-#endif