summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2024-03-26kernel: filedesc: Create MAX_RW_SIZE defineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-26kernel: Add copyinstr() routineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-25kernel: filedesc: Return status in fd_alloc()Ian Moffett
It is better for fd_alloc() to return the status and have one of the arguments point to an output than have fd_alloc() return the allocated file descriptor just like that. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-25kernel: vfs_lookup: Return -EINVAL instead of -1Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-22kernel: filedesc: Handle count of 0Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-21kernel: sched: Fix stack init codeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-20kernel: Require len in vcons_putstr()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-19kernel: syscall: Add sys_write()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-19kernel: syslog: Make syslog_screen externIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-18kernel: sched: Fix PID assignmentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-18kernel: Add copyin() and copyout() routinesIan Moffett
This commit adds two new functions, copyin() and copyout() for kernel to userspace access and vice versa. These functions ensure the userspace address being accessed actually belongs to the process running by performing address range checks, thereby preventing bad addresses being passed to syscalls. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-17kernel: loader: Keep track of program addr rangeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-16kernel,libc: syscall: Improve syscall codeIan Moffett
- Remove the SYS_debug syscall - First syscall starts at 1 Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-16kernel: syscall: Remove syscall_args.retIan Moffett
It is better to just return a value within the syscall handler and have that passed down to __syscall() like that Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-16kernel: sched: Cleanup context switch commentsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: Add basic file descriptor supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: sched: Use this_td() to get threadIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: sched: Add routine to get current threadIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: vfs: Implement vfs_path_to_node()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: vfs: Allow optional fs store within vnodeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-15kernel: vfs: Fix typo in commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-14kernel: sched: Remove useless declarationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-14kernel: sched: Rework sched_init()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-14kernel: Add support for syscallsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-14kernel: sched: Add exit routineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-14kernel: sched: Keep track of stack and privilegeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-13kernel/amd64: machdep: Add context switch helperIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-13kernel/amd64: machdep: Add pcb init codeIan Moffett
This commit adds a processor specific routine which sets up the Process Control Block for a thread Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-13kernel: sched: Improve stack init codeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-10kernel: loader: CleanupIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-07kernel: sched: Add support for user threadsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-07kern: sched: Refactor queue and ctx switch codeQuinn Stephens
Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-07kernel: loader: Only load user programsIan Moffett
This commit ensures user programs are loaded only. This can be changed in the future if support for ELFs that will run in kernel space is added. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-07kernel: Require VAS arg in vm + loader refactorIan Moffett
This commit adds vas argument to VM mapping functions as well as changing how mapping is done in the loader. This commit also fixes weird error handling and parses needed PHDRs within the loader Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs: Add wrappers over VFS operationsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs_init: Add root vnodeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs_mount: Allocate vnode per mountpointIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel/amd64: vfs_subr: Add path parsing helperIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs_subr: Add '.' to valid path charsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs: Return -1 on vfs_hash_path() failureIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs_init: Make "filesystems" staticIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs: Simplify mounting logicIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-03-01kernel: vfs: Fix logic bug in vfs_hash_path()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-29kernel: vfs_subr: Update commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-28kernel: vfs_cache: Fix type bugIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-28kernel: vfs: Move mountlist_entry to vfs_cache.cIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-28kernel: vfs: Do not leak memoryIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-28kernel: vfs: Add more documentationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-28kernel: Add initial VFS implementationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-02-26kernel: Add initial ELF loader implementationIan Moffett
This is the initial ELF loader implementation, this will obviously need some fixups and refactoring in the future but it works as of now. Signed-off-by: Ian Moffett <ian@osmora.org>