summaryrefslogtreecommitdiff
path: root/src/init/main.c
AgeCommit message (Collapse)Author
2021-09-12force init's main to be in .text.startupdzwdz
for some reason it's only there by default if you compile with `-O2`. because of this, you couldn't compile camellia with `-O1`
2021-09-12init: allocate bss at runtimedzwdz
2021-09-12barebones `memflag()` implementation - letting the user allocate pagesdzwdz
2021-09-12remove some useless code from initdzwdz
2021-09-12implement most of fs_waitdzwdz
awaited_req is a garbage name but i couldn't come up with a better one. i also have no idea how to handle all the failure states
2021-09-09basic _syscall_fs_wait() impl, doesn't pass the req yetdzwdz
2021-09-07reimplement _syscall_mountdzwdz
2021-09-07implement fs_create(), front/back fs handlesdzwdz
2021-09-05remove the fd_ / fs_ prefixes from syscall namesdzwdz
2021-08-27make vfs_mount_resolve pass all the testsdzwdz
2021-08-25reorganise init/main.c, add some "tests"dzwdz
2021-08-25remove FD_STDOUTdzwdz
init can just open `/tty` instead
2021-08-25implement open() for FD_SPECIAL_TTY (`/tty`)dzwdz
2021-08-25implement vfs_mount_seed, which creates the vfs passed to initdzwdz
2021-08-25change the signature of _syscall_fd_mountdzwdz
2021-08-24switch to using user_ptr for pointers coming from userlanddzwdz
this avoid accidental dereferences, and now it's easy to tell apart which pointers are safe to directly read and which aren't. cons: - const is completely discarded
2021-08-24replace () with (void) in function definitionsdzwdz
`()` means that any amt of arguments will be accepted, which isn't what i want
2021-08-24move syscalls.h to shared/syscalls.hdzwdz
2021-08-24implement FD_SPECIAL_TTY, an stdout equaliventdzwdz
2021-08-22basic mount resolvingdzwdz
2021-08-22fs_open() stubdzwdz
2021-08-22fix almost all compiler warningsdzwdz
2021-08-22await() 2: pass the exit messagedzwdz
2021-08-18await() 1: wait for child to die, without message passingdzwdz
The length is a int, because the syscall will have a signed output. A negative return value will mean an error (such as when it gets called by a childless process).
2021-08-18fork() now has a return value; you can tell the child and parent apartdzwdz
2021-08-18store the processes as a tree instead of a listdzwdz
I'm about to need that for waits(). There's no single list of processes for simplicity's sake, but the search will now be even slower and it might even introduce a potential vuln! How fun! Someone could override stuff in .bss with random values. I'll either make gcc check if it hasn't gone past the end of the stack, or turn this into a non recursive function.
2021-08-14init: add multipageify(), so i can test virt_iter in an simpler waydzwdz
2021-08-11read _syscall_debuglog arguments across page boundariesdzwdz
2021-07-31change the syscall naming convention; same one in kernel and userlanddzwdz
2021-07-26exit() now switches to the first running processdzwdz
i used a linked list because it's the simplest way to implement this
2021-07-26fork() pt 1: cloning process memorydzwdz
2021-07-24fix some warningsdzwdz
2021-07-23add a barebones exit() syscalldzwdz
2021-07-22don't map the VGA console buffer in user processesdzwdz
2021-07-22implement the debuglog() syscalldzwdz
2021-07-21syscall parameter & return value passingdzwdz
Sadly, sysenter on i386 limits me to only 4 arguments (so, 1 for the syscall id + 3 real args). If that turns out to be an issue I'll either just switch to interrupts, or switch to x64.
2021-07-21barebones syscalldzwdz
2021-07-20per-process virtual memorydzwdz
VGA is only mapped into the virtual memory because there are no other ways of interacting with the OS.
2021-07-18basic executable loadingdzwdz