summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-05-22 13:00:41 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-05-22 13:00:41 -0400
commitace65b453151845bc361f21f3e5b651c35f9f126 (patch)
tree262ebd29b0ca1d8584f0b6f1efa7a00d9f4f3e43 /sys
parentf004c1ade8d617a82cea2fe249434cccb47a2358 (diff)
downloadjove-kernel-master.tar.gz
jove-kernel-master.tar.bz2
jove-kernel-master.zip
massive refactor for mp and organizationHEADmaster
Diffstat (limited to 'sys')
-rw-r--r--sys/errno.h10
-rw-r--r--sys/permission.h11
-rw-r--r--sys/syscall.h69
-rw-r--r--sys/types.h32
4 files changed, 0 insertions, 122 deletions
diff --git a/sys/errno.h b/sys/errno.h
deleted file mode 100644
index 8d0c980..0000000
--- a/sys/errno.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _SYS_ERRNO_H
-#define _SYS_ERRNO_H 1
-
-#define ENOPERM 1
-#define EFAULT 2
-#define EINVAL 3
-#define ENOSYS 4
-#define ENOTFOUND 5
-
-#endif
diff --git a/sys/permission.h b/sys/permission.h
deleted file mode 100644
index 08bb765..0000000
--- a/sys/permission.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _SYS_PERMISSION_H
-#define _SYS_PERMISSION_H 1
-
-#define PERM_MEM_PHYS_RESV 1 /* Reserve physical memory. */
-#define PERM_MEM_PHYS_FREE 2 /* Free physical memory. */
-#define PERM_MEM_PHYS_ALLOC 4 /* Allocate physical memory. */
-
-#define PERM_MEM_VIRT_PD 8 /* Work on any PD. */
-#define PERM_MEM_VIRT_MAP 0x10 /* Map physical memory to virtual memory. */
-
-#endif
diff --git a/sys/syscall.h b/sys/syscall.h
deleted file mode 100644
index d8b64bb..0000000
--- a/sys/syscall.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _SYS_SYSCALL_H
-#define _SYS_SYSCALL_H 1
-
-#include <stdint.h>
-#include <stddef.h>
-#include "types.h"
-
-typedef struct syscall {
- int id;
-} syscall_t;
-
-struct syscall_log {
- syscall_t syscall;
- const char *message;
-};
-
-struct syscall_mem_phys_range_op {
- syscall_t syscall;
- uintptr_t base;
- uintptr_t limit;
-};
-
-struct syscall_mem_phys_alloc {
- syscall_t syscall;
- size_t npages;
- uintptr_t *result;
-};
-
-struct syscall_mem_virt_mapping {
- syscall_t syscall;
- linear_address_t addr;
- page_mapping_t *result;
-};
-
-struct syscall_mem_virt_map {
- syscall_t syscall;
- linear_address_t addr;
- page_mapping_t map;
-};
-
-struct syscall_mem_virt_alloc {
- syscall_t syscall;
- linear_address_t from;
- uintptr_t to;
- page_flags_t flg;
-};
-
-enum
-{
- SYSCALL_LOG = 0,
- SYSCALL_TID,
-
- SYSCALL_MEM_PHYS_RESV,
- SYSCALL_MEM_PHYS_FREE,
- SYSCALL_MEM_PHYS_ALLOC,
-
- SYSCALL_MEM_VIRT_MAPPING,
- SYSCALL_MEM_VIRT_MAP,
- SYSCALL_MEM_VIRT_ALLOC,
-
- SYSCALL_COUNT
-};
-
-#define _SYSCALL(data) \
- intmax_t ax; \
- __asm__ volatile("movq %0, %%rdi\nsyscall": "=a"(ax): "r"(data): "memory"); \
- return ax
-
-#endif
diff --git a/sys/types.h b/sys/types.h
deleted file mode 100644
index 0a519c5..0000000
--- a/sys/types.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _SYS_TYPES_H
-#define _SYS_TYPES_H 1
-
-#include <stdint.h>
-#include <stddef.h>
-#include <stdbool.h>
-
-typedef intmax_t tid_t;
-
-typedef struct {
- intmax_t tid;
- uintmax_t addr;
-} linear_address_t;
-
-typedef uintptr_t physptr_t;
-
-typedef struct page_flags
-{
- bool present;
- bool writeable;
- bool useraccess;
- bool executable;
-} page_flags_t;
-
-typedef struct page_mapping
-{
- physptr_t phys;
- page_flags_t pf;
-} page_mapping_t;
-
-
-#endif