Initial commit

This commit is contained in:
2026-02-04 01:58:49 +01:00
commit 0e01345abf
117 changed files with 5076 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#include <zinnia/channel.h>
#include <zinnia/status.h>
#include <kernel/compiler.h>
zn_status_t syscall_channel_create(
enum zn_channel_flags flags,
__user zn_handle_t* endpoint0,
__user zn_handle_t* endpoint1
) {
return ZN_ERR_UNSUPPORTED;
}
zn_status_t syscall_channel_open(
zn_handle_t channel,
size_t num_handles,
size_t num_bytes,
__user zn_handle_t** out_handle_buf,
__user void** out_data_buf
) {
return ZN_ERR_UNSUPPORTED;
}
+18
View File
@@ -0,0 +1,18 @@
#include <zinnia/status.h>
#include <zinnia/syscall_numbers.h>
#include <kernel/compiler.h>
#include <kernel/syscalls.h>
#include <kernel/types.h>
zn_status_t syscall_dispatch(reg_t num, reg_t a0, reg_t a1, reg_t a2, reg_t a3, reg_t a4, reg_t a5, reg_t a6) {
switch (num) {
case ZN_SYSCALL_PANIC:
syscall_panic((zn_status_t)a0);
case ZN_SYSCALL_LOG:
return syscall_log((__user const char*)a0, a1);
case ZN_SYSCALL_ARCHCTL:
return syscall_archctl(a0, a1);
}
return ZN_ERR_BAD_SYSCALL;
}
+22
View File
@@ -0,0 +1,22 @@
#include <zinnia/handle.h>
#include <zinnia/status.h>
#include <kernel/percpu.h>
#include <kernel/syscalls.h>
zn_status_t zn_handle_clone(zn_handle_t handle, zn_rights_t cloned_rights, zn_handle_t* cloned) {
struct task* current = percpu_get()->sched.current;
current->process;
return ZN_ERR_UNSUPPORTED;
}
zn_status_t zn_handle_drop(zn_handle_t handle) {
struct task* current = percpu_get()->sched.current;
return ZN_ERR_UNSUPPORTED;
}
zn_status_t zn_handle_validate(zn_handle_t handle) {
struct task* current = percpu_get()->sched.current;
return ZN_ERR_UNSUPPORTED;
}
View File
+6
View File
@@ -0,0 +1,6 @@
kernel_sources += files(
'channel.c',
'dispatch.c',
'handle.c',
'log.c',
)